/* =========================================================
   Bình Dương & Phương Anh — thiệp cưới online (khung photobooth từ thiệp Lộc & Nhung)
   Concept: photobooth · burgundy · olive
   ========================================================= */

:root {
  /* Một màu đỏ duy nhất cho cả thiệp và màn chào: lấy đúng màu phông đỏ trong
     bộ ảnh cưới (đo trên 22 ảnh p15–p36, vùng tường được chiếu sáng). Trùng
     theme-color nên đầu trang liền một khối với thanh trình duyệt. */
  --wine: #481612;
  --wine-2: #481612;
  --wine-3: #481612;
  --cream: #f7f0e6;
  --paper: #fbf7f1;
  --ink: #36100c;
  --muted: #8a6a66;
  --gold: #d2b07a;
  --line: rgba(54, 16, 12, .14);

  --f-script: "Great Vibes", "Snell Roundhand", cursive;
  --f-serif: "Cormorant Garamond", "Times New Roman", serif;
  --f-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --w: 480px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--cream);
  background: #481612;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
/* Đang ở màn chào (nền kem): nền trang cũng kem, để Safari mới — vốn lấy màu
   nền trang tô thanh trạng thái — cũng ra kem như theme-color. */
html.on-welcome, html.on-welcome body { background: #f4f0e7; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
svg { width: 1em; height: 1em; }

.script { font-family: var(--f-script); font-weight: 400; font-style: normal; }

/* Desktop backdrop — blurred photo behind the phone-width page */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background: url("../assets/photos/sm/p35.jpg") center/cover no-repeat;
  filter: blur(28px) brightness(.45) saturate(1.1);
  transform: scale(1.15);
}

.page {
  position: relative;
  max-width: var(--w);
  margin: 0 auto;
  background: var(--wine);
  /* clip thay vì hidden: hidden biến .page thành khung cuộn riêng khiến chữ
     "dính" (sticky) ở hero máy tính không bám theo khi cuộn trang */
  overflow: hidden;
  overflow: clip;
  box-shadow: 0 0 80px rgba(0, 0, 0, .55);
}

/* ---------- Hoạ tiết nét vẽ tay ---------- */
/* Một tông mực duy nhất: xanh olive đậm trên nền kem, và chính màu đó pha sáng
   lên thành xanh sage khi đặt trên nền đỏ, để nét vẫn đọc được mà không lạc tông. */
:root { --ink-green: #3f5626; --sage: #9fae70; }
.doodle {
  width: auto; height: auto;
  fill: none; stroke: currentColor; stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
  color: var(--ink-green);
  filter: url(#inkWobble);
}
.sec--paper .doodle, .modal .doodle, .doodle--ink { color: var(--ink-green); }
.hero .doodle, .album .doodle, .countdown .doodle { color: var(--sage); }

/* chi tiết nhỏ đặt trên tiêu đề mục */
.doodle--top { display: block; height: 66px; margin: 0 auto 14px; opacity: .9; }
.doodle--tall { height: 92px; }

/* Hoạ tiết rải quanh mục thiệp mời: bám hai mép, trải dần xuống theo nội dung.
   Trên điện thoại hai mép gần như không còn chỗ nên chỉ giữ lại vài món ở các
   khoảng trống giữa các khối, tránh đè lên chữ. */
.invite { position: relative; }
.decor {
  position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 1040px);   /* bám sát cột nội dung, không văng ra mép màn hình rộng */
  z-index: 0; pointer-events: none;
}
.decor .doodle { position: absolute; opacity: .75; }
.invite > *:not(.decor) { position: relative; z-index: 1; }

/* điện thoại: hai mép hẹp nên chỉ giữ 6 món, nhét vào đúng các khoảng trống */
.d1 { left: 1%;  top: .5%;  height: 30px; transform: rotate(-14deg); }  /* nho */
.d2 { display: none; }                                                  /* chai rượu */
.d3 { left: 2%;  top: 4.5%; height: 36px; transform: rotate(-5deg); }   /* nến */
.d4 { right: 0;  top: 15%;  height: 34px; transform: rotate(10deg); }   /* hai ly */
.d10 { right: -10%; top: 0; width: 62%; height: auto; transform: rotate(8deg); }  /* dây đèn */
.d5 { left: 1%;  top: 36%;  height: 46px; transform: rotate(-8deg); }   /* lọ hoa */
.d6 { display: none; }                                                  /* lát cam */
.d7 { display: none; }                                                  /* bánh mì */
.d9 { display: none; }                                                  /* quả lê */
.d8 { display: none; }                                                  /* bánh kem */

/* nhành hoa lấp ô trống cạnh ảnh chú rể */
.couple__d { grid-column: 2; grid-row: 1; place-self: center; height: 84px; opacity: .5; transform: rotate(5deg); }

/* hoạ tiết đứng hai bên mục — chỉ bật khi màn hình đủ rộng để có lề */
.side { display: none; }

/* chi tiết chìm ở góc: mục cha tạo lớp riêng (isolation) nên z-index âm vẫn nằm
   trên nền của mục, không chìm mất sau nền trang */
.hero, .album { isolation: isolate; }
.doodle--hero, .doodle--album { position: absolute; z-index: -1; pointer-events: none; opacity: .5; }
.doodle--hero {
  height: 150px; left: 8px; bottom: 60px;
  transform-origin: 50% 90%;
  animation: oliveSway 8s ease-in-out infinite;
  --rot: -10deg;
}
.doodle--album { height: 120px; right: -18px; top: 8px; transform: rotate(12deg); }
@keyframes oliveSway {
  0%, 100% { transform: rotate(var(--rot)); }
  50% { transform: rotate(calc(var(--rot) + 5deg)); }
}
@keyframes sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(3deg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 24px;
  border: 1px solid var(--wine-2); border-radius: 999px;
  background: var(--wine-2); color: var(--cream);
  font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none;
  transition: transform .25s var(--ease), background .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.2); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn--light { background: var(--cream); color: var(--wine); border-color: var(--cream); }
.btn--ghost { background: transparent; color: var(--wine); }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 11px; letter-spacing: .1em; }
.btn:focus-visible, .ic:focus-visible, .chip input:focus-visible + span, .tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 24px 72px;
  text-align: center;
  background: var(--wine);
}
.hero__std {
  margin: 0;
  font-size: clamp(48px, 15vw, 64px); line-height: 1.1;
  color: var(--cream);
}
.hero__names {
  display: grid; gap: 0;
  width: min(100%, 330px); margin: 18px auto 34px;
  font-family: var(--f-serif); font-weight: 500;
  font-size: clamp(24px, 7.4vw, 31px); letter-spacing: .06em; text-transform: uppercase;
  line-height: 1.2;
}
.hero__n1 { justify-self: start; }
.hero__n2 { justify-self: end; margin-top: -6px; }
.hero__and { position: relative; justify-self: start; display: flex; align-items: center; margin-top: -4px; }
.hero__and i { display: block; width: 58px; height: 1px; background: linear-gradient(90deg, transparent, var(--cream)); }
.hero__and em { font-size: 34px; text-transform: none; letter-spacing: 0; margin-left: -4px; color: var(--cream); }

.hero__date { display: none; }

/* Photobooth printer */
.booth { position: relative; width: 220px; margin: 0 auto; }
.booth__slot {
  position: relative; z-index: 3;
  height: 42px; margin: 0 -26px;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .35), inset 0 -2px 0 rgba(0, 0, 0, .06);
  display: grid; place-items: center;
}
.booth__slot span {
  width: 85%; height: 7px; border-radius: 6px;
  background: #210808;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .8);
}
.booth__mask { position: relative; z-index: 2; margin-top: -20px; overflow: hidden; padding: 0 0 20px; }
/* Dải ảnh "in" ra khỏi khe theo từng nấc — js/main.js (printStrip) điều khiển */
.strip {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 30px 12px 16px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .35);
  transform: translateY(-100%);
  transform-origin: 50% 0;
}
/* mép dưới răng cưa như tờ giấy vừa xé khỏi máy in */
.strip::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6'%3E%3Cpath d='M0 0H8L4 6Z' fill='%23fbf7f1'/%3E%3C/svg%3E") repeat-x 0 0 / 8px 6px;
}
/* in xong thì xé rời: bỏ cắt để dải ảnh rơi & nghiêng lộ ra dưới khe */
.booth.is-torn .booth__mask { overflow: visible; }
.booth.is-torn .booth__slot span { height: 9px; transition: height .3s; }
.booth.is-torn .strip { animation: tearOff 1.1s ease-out forwards; }
@keyframes tearOff {
  from { transform: translateY(0) rotate(0deg); }
  55% { transform: translateY(40px) rotate(3.4deg); }
  to { transform: translateY(30px) rotate(2.2deg); }
}
.strip__title { margin: 0; font-size: 36px; line-height: .95; color: var(--ink); }
.strip__song { margin: 10px 0 0; font-weight: 600; font-size: 13px; letter-spacing: .02em; }
.strip__artist { margin: 0; font-size: 11px; color: var(--muted); }

.player { margin-top: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.player__bar { position: relative; height: 14px; cursor: pointer; display: flex; align-items: center; }
.player__bar::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: rgba(54, 16, 12, .15); border-radius: 2px; }
.player__fill { position: relative; height: 2px; width: 0; background: var(--ink); border-radius: 2px; }
.player__fill span { position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--ink); }
.player__time { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 2px; }
.player__ctrl { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 0 2px; }
.ic {
  display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink);
  opacity: .55; transition: opacity .2s, transform .2s;
}
.ic svg { width: 17px; height: 17px; }
.ic.is-on, .ic:hover { opacity: 1; }
.ic--main { width: 40px; height: 40px; opacity: 1; background: var(--ink); color: var(--cream); box-shadow: 0 6px 14px rgba(72, 22, 18, .35); }
.ic--main svg { width: 18px; height: 18px; }
.ic:active { transform: scale(.92); }

.strip__photos { display: grid; gap: 10px; margin-top: 14px; }
/* ô ảnh trống màu xám trước; ảnh được "in" từ trên xuống, đủ màu và nét ngay
   từng dòng — như đầu in chạy qua, không mờ rồi mới rõ */
.shot { display: block; position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: #e6e1da; }
.shot img {
  width: 100%; height: 100%; object-fit: cover; cursor: zoom-in;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.8s linear;
}
.shot.is-dev img { clip-path: inset(0 0 0 0); }
/* vệt đầu in chạy theo mép ảnh đang in */
.shot::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, .6);
  opacity: 0; pointer-events: none;
}
.shot.is-dev::after { animation: printHead 1.8s linear forwards; }
@keyframes printHead {
  0% { top: 0; opacity: 1; }
  92% { opacity: 1; }
  100% { top: calc(100% - 2px); opacity: 0; }
}
.strip__foot { margin: 14px 0 0; font-family: var(--f-serif); font-size: 12px; letter-spacing: .18em; font-weight: 600; line-height: 1.5; }
.strip__foot span { color: var(--wine-3); }
.strip__foot small { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .3em; }

/* ---------- Generic sections ---------- */
.sec { position: relative; padding: 72px 24px; text-align: center; }
.sec--paper { background: var(--paper); color: var(--ink); }
.title-script { margin: 0; font-size: clamp(38px, 10.5vw, 50px); line-height: 1.1; }
.sub { margin: 6px auto 0; max-width: 340px; font-size: 13px; color: rgba(247, 240, 230, .72); }
.sec--paper .sub, .modal .sub { color: var(--muted); }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: .42em; text-transform: uppercase; color: var(--wine-3); }

/* Invitation */
/* Hai họ — ảnh chú rể trên trái, ảnh cô dâu lệch xuống phải, tên và cha mẹ dưới ảnh */
.couple {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px;
  max-width: 420px; margin: 40px auto 0; text-align: left;
}
.couple__ph { margin: 0; border-radius: 14px; overflow: hidden; background: #e9e0d6; }
.couple__ph img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.couple__ph--l { grid-column: 1; grid-row: 1; margin-top: 26px; }
.couple__ph--r { grid-column: 2; grid-row: 2; margin-top: -46px; }
.couple__side { grid-column: 1; grid-row: 2; padding: 14px 0 0 2px; }
.couple__side--r { grid-column: 2; grid-row: 3; padding: 14px 2px 0 0; text-align: right; }
.couple__name { margin: 0; white-space: nowrap; font-family: var(--f-serif); font-size: 20px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); line-height: 1.2; }
.couple__role { margin: 2px 0 0; font-size: 24px; line-height: 1.2; color: var(--wine); }
.couple__parents {
  margin: 12px 0 0; font-family: var(--f-serif); font-size: 15px; font-weight: 500;
  line-height: 1.7; letter-spacing: .01em; color: var(--ink);
}
.couple__amp {
  grid-column: 1 / -1; grid-row: 1 / span 2; place-self: center;
  font-size: 54px; line-height: 1; color: var(--wine); opacity: .28; pointer-events: none;
  z-index: -1;   /* chìm xuống dưới hai tấm ảnh */
}

/* Countdown */
.countdown { background: var(--wine); }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 340px; margin: 28px auto 0; }
.cd div { padding: 14px 0 10px; border: 1px solid rgba(210, 176, 122, .4); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.cd b { display: block; font-family: var(--f-serif); font-size: 32px; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.cd span { display: block; margin-top: 6px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

.cal { max-width: 320px; margin: 36px auto 0; padding: 20px 18px; background: var(--paper); color: var(--ink); border-radius: 14px; box-shadow: 0 16px 30px rgba(0, 0, 0, .3); }
.cal__head { margin: 0 0 12px; font-family: var(--f-serif); font-size: 20px; font-weight: 600; letter-spacing: .08em; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 0; font-size: 12px; }
.cal__grid .dow { font-size: 10px; font-weight: 600; letter-spacing: .05em; color: var(--muted); padding-bottom: 4px; }
.cal__grid span { position: relative; display: grid; place-items: center; height: 32px; }
.cal__grid .mark { color: var(--cream); font-weight: 600; z-index: 0; }
.cal__grid .mark svg { position: absolute; z-index: -1; width: 32px; height: 32px; color: var(--wine-3); animation: beat 1.6s ease-in-out infinite; }
.cal__grid .mark.main svg { color: var(--wine); }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.14); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }

/* Events — ticket cards */
.tickets { margin-top: 40px; }
.tickets .ticket:first-child { margin-top: 0; }

/* Thông tin hai họ — thay cho tiêu đề "Wedding Events" */
.sprig { display: flex; align-items: center; justify-content: center; }
.families__invite {
  margin: 26px auto 0; max-width: 360px;
  font-family: var(--f-serif); font-size: 15px; font-weight: 600; line-height: 1.75;
  letter-spacing: .1em; text-transform: uppercase; color: var(--wine);
}
.families__note {
  margin: 12px auto 0; font-family: var(--f-serif); font-style: italic; line-height: 1.5; color: var(--muted);
  white-space: nowrap; font-size: clamp(11px, 3.3vw, 21px);   /* luôn gọn một hàng */
}

.ticket {
  position: relative; margin: 34px auto 0; max-width: 380px;
  background: #fff; border-radius: 16px; overflow: hidden; text-align: center;
  box-shadow: 0 18px 40px rgba(54, 16, 12, .12);
}
.ticket__photo { aspect-ratio: 16 / 10; overflow: hidden; }
.ticket__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.ticket__body { position: relative; padding: 26px 20px 24px; border-top: 2px dashed var(--line); }
.ticket__body::before, .ticket__body::after {
  content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper);
}
.ticket__body::before { left: -12px; }
.ticket__body::after { right: -12px; }
.ticket__kicker { margin: 0; font-family: var(--f-serif); font-size: 28px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wine); }
.ticket__date { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.ticket__date i { width: 1px; height: 14px; background: var(--line); }
.ticket__venue { margin: 0; font-family: var(--f-serif); font-size: 19px; font-weight: 600; }
.ticket__addr { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.ticket__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* Album — photobooth strips */
.album { padding-bottom: 60px; }
.album__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; margin-top: 34px; align-items: start; }
.pstrip {
  background: var(--paper); padding: 8px 8px 0; box-shadow: 0 14px 26px rgba(0, 0, 0, .35);
  transform: rotate(var(--r, 0deg));
  transition: transform .4s var(--ease);
}
.pstrip:nth-child(even) { margin-top: 36px; }
.pstrip:hover { transform: rotate(0deg) scale(1.02); }
.pstrip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 7px; cursor: zoom-in; background: #e9e0d6; }
.pstrip p { margin: 0; padding: 4px 0 8px; font-family: var(--f-script); font-size: 18px; color: var(--ink); line-height: 1.2; }
.album__more { margin-top: 36px; }
.rail__btn, .album__all { display: none; }

/* ---------- RSVP (bố cục theo thiệp Đức Nhất & Thúy Linh) ---------- */
.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; }
.rsvp__lead {
  margin: 14px auto 0; max-width: 360px;
  font-family: var(--f-serif); font-style: italic; font-size: 17px; line-height: 1.6; color: var(--wine-3);
}
.form { display: grid; gap: 12px; max-width: 400px; margin: 26px auto 0; text-align: left; }
.fld {
  width: 100%; padding: 13px 20px;
  font: 400 15px/1.5 var(--f-sans); color: var(--ink);
  background: #fff; border: 1px solid rgba(54, 16, 12, .25); border-radius: 999px;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.fld::placeholder { color: rgba(54, 16, 12, .45); }
.fld:focus { outline: none; border-color: var(--wine-3); box-shadow: 0 0 0 3px rgba(72, 22, 18, .1); }
.fld--area { border-radius: 20px; min-height: 108px; resize: vertical; }
.fld.is-bad { border-color: #b3261e; }
.fld:disabled { opacity: .65; }
.sel { position: relative; }
.sel::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg); opacity: .7;
}
.sel select { padding-right: 46px; cursor: pointer; }
.sel select.is-empty { color: rgba(54, 16, 12, .45); }
.sel select option { color: var(--ink); }
.err { margin: 2px 0 0; text-align: center; font-size: 13px; color: #b3261e; }

.bbtn {
  display: block; width: 100%; min-height: 50px; padding: 0 20px; margin-top: 4px;
  border-radius: 999px; cursor: pointer;
  font: 500 16px/1 var(--f-serif); letter-spacing: .16em; text-align: center;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .25s var(--ease);
}
.bbtn:active { transform: scale(.98); }
.bbtn--solid { background: var(--wine-2); color: var(--cream); border: 1px solid var(--wine-2); }
.bbtn--solid:hover { filter: brightness(1.25); }
.bbtn--solid[disabled] { opacity: .6; cursor: default; }
.bbtn--line { background: transparent; color: var(--wine); border: 1px solid rgba(54, 16, 12, .4); }
.bbtn--line:hover { border-color: var(--wine); background: rgba(54, 16, 12, .04); }
.form__done { margin: 8px 0 0; text-align: center; font-size: 26px; line-height: 1.3; color: var(--wine-3); }

/* Thanks */
.thanks { position: relative; background: var(--wine); }
.thanks img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: 50% 30%;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}
.thanks__over {
  position: relative; margin-top: -40px;
  padding: 0 24px calc(64px + env(safe-area-inset-bottom));
  text-align: center;
}
.thanks h2 { margin: 0; font-size: 64px; line-height: 1; }
.thanks__note { margin: 14px auto 0; max-width: 340px; font-size: 13.5px; line-height: 1.85; color: rgba(247, 240, 230, .88); }
.thanks__sign { margin: 14px 0 0; font-size: 30px; color: var(--gold); }

/* ---------- Modal: hộp mừng cưới & lời cảm ơn ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 18px;
  background: rgba(28, 8, 6, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fade .3s ease;
}
.modal__box {
  position: relative; width: min(460px, 100%);
  max-height: 88vh; max-height: 88svh; overflow-y: auto;
  padding: 34px 22px 26px; border-radius: 18px;
  background: var(--paper); color: var(--ink); text-align: center;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7);
  animation: rise .45s var(--ease);
}
.modal__x, .lb__x {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink);
}
.modal__x svg, .lb__x svg { width: 22px; height: 22px; }
.mseal { display: block; width: 58px; height: 58px; margin: 0 auto 10px; filter: drop-shadow(0 4px 5px rgba(40, 5, 10, .35)); }
.mseal svg { width: 100%; height: 100%; overflow: visible; }
.modal__title { margin: 0 0 6px; font-size: 38px; line-height: 1.15; color: var(--wine); }
.modal__sub { margin: 0 auto 22px; max-width: 34ch; font-size: 13.5px; line-height: 1.75; color: var(--muted); }

.modal__row { display: grid; gap: 22px; }
@media (min-width: 440px) { .modal__row { grid-template-columns: 1fr 1fr; gap: 16px; } }
.qr__who { margin: 0 0 12px; font-size: 10.5px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--wine-3); }
.qr__frame {
  width: min(160px, 70%); margin: 0 auto 12px; padding: 8px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 10px 22px -12px rgba(54, 16, 12, .55);
}
.qr__frame img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; }
.qr__name { margin: 0 0 8px; font-family: var(--f-script); font-size: 24px; line-height: 1.2; color: var(--wine); }
.copy {
  display: block; width: 100%; padding: 8px; margin: 0 auto 8px;
  background: none; border: 1px dashed rgba(72, 22, 18, .45); border-radius: 10px; cursor: pointer;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.copy:hover { border-color: var(--wine-3); background: rgba(72, 22, 18, .05); }
.copy__num { display: block; font-size: 15px; font-weight: 500; letter-spacing: .1em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.copy__hint { display: block; margin-top: 4px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.qr__bank { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.modal__done { margin-top: 24px; }

/* lời cảm ơn từ dâu rể */
.modal__box--thanks { padding-top: 26px; }
.tk__ph { position: relative; width: min(220px, 70%); margin: 0 auto 24px; }
.tk__ph img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; background: #e9e0d6; }
.mseal--ph { position: absolute; right: -16px; bottom: -18px; margin: 0; width: 62px; height: 62px; transform: rotate(-8deg); }
.tk__msg { margin: 0 auto 10px; max-width: 32ch; font-size: 14px; line-height: 1.8; color: var(--ink); }
.tk__sign { margin: 0 0 20px; font-size: 26px; color: var(--wine-3); }

/* thông báo nhỏ (chép số tài khoản…) */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 95;
  transform: translate(-50%, 18px);
  padding: 10px 20px; border-radius: 999px;
  background: var(--wine); color: var(--cream); font-size: 13.5px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  background: rgba(22, 7, 5, .94);
  animation: fade .3s ease;
  touch-action: pan-y;
}
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lb__x { color: var(--cream); top: calc(10px + env(safe-area-inset-top)); }
.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: var(--cream);
}
.lb__nav svg { width: 22px; height: 22px; }
.lb__prev { left: 10px; }
.lb__next { right: 10px; }
.lb__count { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0; text-align: center; font-size: 12px; letter-spacing: .2em; color: rgba(247, 240, 230, .7); }

/* ---------- Floating buttons ---------- */
.fab {
  position: fixed; z-index: 55;
  right: max(14px, calc(50vw - var(--w) / 2 + 14px));
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: grid; gap: 10px;
}
.fab__btn {
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 1px solid rgba(210, 176, 122, .5); border-radius: 50%;
  background: rgba(72, 22, 18, .82); color: var(--cream);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
}
.fab__btn svg { width: 20px; height: 20px; }
.fab__music.is-playing svg { animation: spin 4s linear infinite; }
/* chưa có tiếng: nhấp nháy nhẹ để khách biết chạm vào là có nhạc */
.fab__music:not(.is-playing) { animation: musicHint 1.8s ease-in-out infinite; }
@keyframes musicHint { 0%, 100% { box-shadow: 0 8px 18px rgba(0,0,0,.35), 0 0 0 0 rgba(210,176,122,.55); } 50% { box-shadow: 0 8px 18px rgba(0,0,0,.35), 0 0 0 10px rgba(210,176,122,0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Language link */
.fab__lang {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .5px;
  line-height: 1;
  text-decoration: none;
}
.fab__lang .lang__label {
  display: block;
}

/* YouTube player kept alive but invisible */
.yt-hidden { position: fixed; width: 200px; height: 200px; left: 0; bottom: 0; z-index: -2; opacity: .01; pointer-events: none; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

.pstrip.is-in { transform: rotate(var(--r, 0deg)); }
.pstrip.is-in:hover { transform: rotate(0deg) scale(1.02); }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.98); } }

/* =========================================================
   RESPONSIVE — điện thoại là bản gốc ở trên; từ 600px trở lên
   trang trải hết bề ngang, nội dung mỗi mục căn giữa trong khung vừa mắt.
   ========================================================= */

/* ---------- Máy tính bảng (≥ 600px) ---------- */
@media (min-width: 600px) {
  :root { --w: 100%; }
  .backdrop { display: none; }
  .page { max-width: none; box-shadow: none; }
  .fab { right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); }

  .sec { padding: 96px 40px; }
  .title-script { font-size: 60px; }
  .sub { max-width: 460px; font-size: 14px; }

  .hero { padding: 88px 40px 96px; }
  .hero__std { font-size: 84px; }
  .hero__names { width: 420px; font-size: 38px; margin-bottom: 44px; }
  .hero__and em { font-size: 42px; }
  .hero__and i { width: 80px; }
  .booth { width: 260px; }
  .strip__title { font-size: 42px; }
  .doodle--hero { height: 240px; left: 34px; }

  /* máy tính bảng & máy tính: có lề hai bên nên trải đủ 8 món dọc hai mép */
  .d1 { left: 4%;   top: 2%;  height: 52px; }
  .d2 { display: block; right: 6%; top: 11%; height: 92px; }
  .d3 { left: 7%;   top: 12%; height: 74px; }
  .d4 { right: 3%;  top: 24%; height: 66px; }
  .d5 { left: 3%;   top: 38%; height: 88px; }
  .d6 { display: block; right: 6%; top: 40%; height: 34px; }
  .d7 { display: block; left: 5%;  top: 60%; height: 32px; }
  .d8 { display: block; right: 4%; top: 63%; height: 52px; }
  .d9 { display: block; left: 8%;  top: 25%; height: 44px; transform: rotate(9deg); }
  .d10 { right: -6%; top: 0; width: 46%; transform: rotate(9deg); }
  .doodle--top { height: 84px; margin-bottom: 18px; }
  .doodle--tall { height: 118px; }
  .doodle--hero { height: 210px; left: 20px; }
  .doodle--album { height: 170px; right: -30px; }
  .families__invite { max-width: 560px; font-size: 18px; }

  .tickets { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 820px; margin: 56px auto 0; align-items: stretch; }
  .tickets .ticket { margin: 0; max-width: none; display: flex; flex-direction: column; }
  .ticket__body { flex: 1; }
  .ticket__kicker { font-size: 26px; }

  .cd { max-width: 520px; gap: 16px; }
  .cd div { padding: 22px 0 16px; }
  .cd b { font-size: 46px; }
  .cal { max-width: 380px; }

  .couple { max-width: 620px; column-gap: 30px; margin-top: 58px; }
  .couple__ph--r { margin-top: -70px; }
  .couple__name { font-size: 34px; }
  .couple__role { font-size: 32px; }
  .couple__parents { font-size: 19px; }
  .couple__d { height: 120px; }
  .couple__amp { font-size: 76px; }

  /* Album: một hàng dải ảnh trượt ngang */
  .album__rail { position: relative; max-width: 1200px; margin: 34px auto 0; }
  .album__grid {
    display: flex; gap: 22px; margin: 0;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: 8px;
    padding: 18px 8px 30px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  }
  .album__grid::-webkit-scrollbar { display: none; }
  .pstrip { flex: 0 0 calc((100% - 22px * 2.4) / 3.4); scroll-snap-align: start; }
  .pstrip:nth-child(even) { margin-top: 0; }
  .rail__btn {
    display: grid; place-items: center;
    position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -24px;
    border: 1px solid rgba(210, 176, 122, .5); border-radius: 50%;
    background: var(--paper); color: var(--wine);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
    transition: opacity .3s, transform .3s var(--ease);
  }
  .rail__btn svg { width: 22px; height: 22px; }
  .rail__btn:hover { transform: scale(1.06); }
  .rail__btn:disabled { opacity: 0; pointer-events: none; }
  .rail__btn--prev { left: -6px; }
  .rail__btn--next { right: -6px; }
  .album__all { display: inline-flex; margin-top: 30px; }
  .doodle--album { height: 200px; right: -24px; }

  .rsvp__lead { max-width: 520px; font-size: 20px; }
  .form { max-width: 520px; gap: 14px; }

  .thanks img { aspect-ratio: auto; height: min(80vh, 820px); }
  .thanks__over { margin-top: 8px; }
  .thanks h2 { font-size: 88px; }
  .thanks__note { max-width: 520px; font-size: 15px; }
  .thanks__sign { font-size: 38px; }
}

/* ---------- Máy tính (≥ 1024px) ---------- */
@media (min-width: 1024px) {
  .sec { padding: 120px max(48px, calc((100% - 1120px) / 2)); }

  /* hero hai cột: chữ bên trái đứng yên theo khi cuộn, dải ảnh in ra bên phải */
  .hero {
    display: grid; grid-template-columns: 1fr 1fr; align-items: start; column-gap: 40px;
    padding: 110px max(48px, calc((100% - 1120px) / 2)) 140px;
    min-height: 100vh;
  }
  .hero__text { position: sticky; top: 22vh; align-self: start; padding-top: 60px; }
  .hero__std { font-size: 108px; }
  .hero__names { width: 460px; font-size: 42px; margin: 26px auto 0; }
  .hero__date {
    display: block; margin: 34px 0 0;
    font-family: var(--f-serif); font-size: 20px; letter-spacing: .4em; color: var(--gold);
    font-variant-numeric: lining-nums;
  }
  .booth { width: 300px; margin-top: 40px; }
  .strip { padding: 34px 16px 20px; }
  .strip__title { font-size: 48px; }
  .strip__song { font-size: 15px; }
  .doodle--hero { height: 280px; left: 46px; bottom: 140px; }

  .tickets { max-width: 960px; gap: 32px; }

  .countdown .cd { max-width: 620px; }

  .couple { max-width: 760px; column-gap: 48px; }
  .couple__ph--r { margin-top: -90px; }

  .pstrip { flex-basis: calc((100% - 22px * 4) / 5); }
  .rail__btn--prev { left: -24px; }
  .rail__btn--next { right: -24px; }

}

/* Thank you: từ 900px ảnh bên trái, lời cảm ơn bên phải — không đè lên tấm bảng trong ảnh */
@media (min-width: 900px) {
  .countdown, .rsvp { position: relative; }
  .side { display: block; position: absolute; z-index: 0; pointer-events: none; opacity: .4; }
  .side--l { left: 7%; }
  .side--r { right: 7%; }
  .countdown .side { top: 22%; height: 150px; color: var(--sage); }
  .countdown .side--r { top: 34%; transform: scaleX(-1) rotate(6deg); }
  .rsvp .side--l { top: 26%; height: 170px; }
  .rsvp .side--r { top: 22%; height: 160px; transform: scaleX(-1) rotate(-5deg); }

  .thanks { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .thanks img {
    height: min(100vh, 960px); object-position: 50% 30%;
    -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 70%, transparent 100%);
  }
  .thanks__over { margin: 0; padding: 60px max(40px, calc((100vw - 1120px) / 2)) 60px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* nút "Chỉ đường" khi chưa có link: thuộc tính hidden phải thắng display của .btn */
[hidden] { display: none !important; }
