/* =========================================================================
 *  Thiệp cưới — hồng · trắng · be, hiệu ứng cuộn trang
 * ========================================================================= */
:root {
  /* bảng màu hồng · trắng · be */
  --paper: #fffaf8;    /* nền chính: trắng kem */
  --white: #ffffff;
  --cream: #fbf3ec;
  --blush: #fbe1e7;    /* hồng phấn */
  --blush-2: #fef3f5;  /* hồng phấn rất nhạt */
  --pink: #f2b8c6;
  --rose: #c0647f;     /* nhấn phụ: nhãn, chữ nghiêng */
  --wine: #b4587a;     /* nhấn chính: tên, nút, giờ (đủ tương phản với chữ trắng) */
  --beige: #f1e4d6;
  --beige-2: #f8f0e7;  /* be sữa */
  --sand: #e3cfb8;
  --ink: #5c4a4c;      /* chữ nội dung: nâu xám dịu */
  --muted: #7d6a6c;
  --line: rgba(180, 88, 122, .16);
  /* màu ảnh kiểu phim những năm 90: ấm, hơi phai */
  --film: sepia(.2) saturate(.9) contrast(.94) brightness(1.04) hue-rotate(-6deg);

  --f-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(16px, calc(5 * var(--cw)), 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
.js body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--blush); color: var(--wine); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.ic { width: 1em; height: 1em; vertical-align: -.12em; }

/* ---------- chữ dùng chung ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 18px;
  font: 600 .74rem/1.3 var(--f-body);
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--rose);
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.h2 { margin: 0; font: 500 clamp(2.2rem, calc(6 * var(--cw)), 4.4rem)/1.08 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.h2 i { font-style: italic; font-weight: 400; color: var(--rose); }
.lead { max-width: 560px; margin: 18px 0 0; font-size: 1.05rem; color: var(--muted); }
.head { max-width: 1180px; margin: 0 auto clamp(40px, calc(6 * var(--cw)), 72px); padding: 0 var(--gutter); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .9em 1.6em; border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
  font: 500 .82rem/1 var(--f-body); letter-spacing: .06em;
  transition: background .3s, color .3s, border-color .3s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-fill { background: var(--wine); border-color: var(--wine); color: #fff; }
.btn-fill:hover { background: var(--ink); border-color: var(--ink); }
.btn-ghost { border-color: var(--wine); color: var(--wine); }
.btn-ghost:hover { background: var(--wine); border-color: var(--wine); color: #fff; }

/* ---------- vân giấy + thanh tiến độ ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 300; pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--rose)); transform-origin: left; transform: scaleX(0); }

/* =========================================================================
 *  MÀN MỞ THIỆP
 * ========================================================================= */
.leader { display: none; }
.js .leader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, var(--blush) 0%, transparent 70%),
    radial-gradient(ellipse 70% 55% at 50% 100%, var(--beige) 0%, transparent 70%),
    var(--paper);
  transition: opacity 1s ease, visibility 1s;
}
.leader.is-gone { opacity: 0; visibility: hidden; }
.leader-start {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 22px;
  padding: 0 20px; text-align: center;
  opacity: 0; transform: translateY(16px);
  transition: opacity 1.2s ease, transform 1.2s var(--ease);
}
.leader.is-ready .leader-start { opacity: 1; transform: none; }
.leader-guest { margin: 0; font: italic 400 clamp(1.2rem, calc(4 * var(--cw)), 1.5rem)/1.4 var(--f-display); color: var(--muted); }
.leader-guest b { display: block; margin-top: 6px; font-style: normal; font-weight: 500; font-size: 1.45em; color: var(--ink); }
.play-btn {
  display: inline-flex; align-items: center; gap: 16px;
  margin-top: 6px;
  padding: 10px 30px 10px 10px;
  border: 1px solid var(--pink); border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  font: 600 .85rem/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--wine);
  box-shadow: 0 16px 40px -20px rgba(180, 88, 122, .5);
  transition: border-color .3s, transform .3s var(--ease);
}
.play-btn:hover { border-color: var(--rose); transform: translateY(-2px); }
.play-ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--wine); color: #fff; animation: ping 2s ease-out infinite; }
.play-ic svg { width: 22px; height: 22px; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(207, 129, 149, .55); } 100% { box-shadow: 0 0 0 20px rgba(207, 129, 149, 0); } }
.leader-hint { margin: 0; font-size: .8rem; letter-spacing: .1em; color: var(--muted); }

/* ---------- topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gutter);
  color: var(--wine);
  background: rgba(251, 246, 241, .78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tb-brand { font: 700 1.2rem/1 var(--f-display); text-decoration: none; }


/* thanh điều hướng dưới đáy — chỉ trên điện thoại */
.tabbar { display: none; }
  .tabbar {
    position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 85;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column;
    padding: 6px;
    border: 1px solid var(--line); border-radius: 20px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 14px 40px -18px rgba(180, 88, 122, .45);
    transform: translateY(140%); transition: transform .5s var(--ease);
  }
  .tabbar.is-shown { transform: none; }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 7px 2px; border-radius: 14px; text-decoration: none; color: var(--muted); font: 500 .68rem/1.2 var(--f-body); transition: background .3s, color .3s; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a.is-active { background: var(--blush-2); color: var(--wine); }
  body { padding-bottom: 80px; }


/* =========================================================================
 *  1. MỞ ĐẦU — ảnh hiện qua lòng chữ
 * ========================================================================= */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: var(--paper); }
.hero-photo { position: absolute; inset: 0; background: linear-gradient(160deg, var(--pink), var(--beige) 55%, var(--rose)); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
/* lớp phủ nền kem với chữ màu đỏ hồng — cuộn xuống thì chữ phóng to và mờ dần, lộ ra ảnh bên dưới */
.hero-mask {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--wine);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, var(--blush) 0%, transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 100%, var(--beige) 0%, transparent 70%),
    var(--paper);
  will-change: transform, opacity;
}
.hero-title {
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  font: 800 min(calc(24 * var(--cw)), 29vh)/.9 var(--f-display);
  letter-spacing: -.03em; text-transform: uppercase; text-align: center;
}
.hero-title .amp { font: italic 400 .42em/1 var(--f-display); text-transform: none; margin: .06em 0 .02em; color: var(--rose); }
.hero-pre, .hero-scroll { position: absolute; left: 0; right: 0; z-index: 2; margin: 0; text-align: center; }
.hero-pre { top: max(11vh, 76px); font: 600 .76rem/1 var(--f-body); letter-spacing: .4em; text-transform: uppercase; color: var(--rose); }
.hero-scroll { bottom: 5vh; display: flex; flex-direction: column; align-items: center; gap: 10px; font: 500 .66rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.hero-scroll span { width: 1px; height: 44px; background: linear-gradient(transparent, var(--rose)); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
/* thẻ tên + ngày cưới trên ảnh: nền kem, chữ đậm — đọc rõ trên mọi loại ảnh */
.hero-card {
  position: absolute; left: 50%; bottom: max(7vh, 40px); z-index: 2;
  width: min(calc(92 * var(--cw)), 620px); transform: translateX(-50%);
  padding: clamp(20px, calc(4 * var(--cw)), 32px) clamp(20px, calc(4 * var(--cw)), 40px);
  text-align: center;
  background: rgba(251, 246, 241, .9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 22px;
  box-shadow: 0 30px 60px -30px rgba(92, 74, 76, .45);
}
.motion .hero-card { opacity: 0; }
html:not(.motion) .hero-card { display: none; }
.hc-kicker { margin: 0; font: 600 .72rem/1.4 var(--f-body); letter-spacing: .26em; text-transform: uppercase; color: var(--rose); }
.hc-names { margin: 8px 0 6px; font: 600 clamp(2.4rem, calc(8 * var(--cw)), 4rem)/1.05 var(--f-display); color: var(--wine); }
.hc-names i { font-weight: 400; color: var(--rose); }
.hc-date { margin: 0; font-size: .95rem; color: var(--ink); }

/* =========================================================================
 *  2. LỜI NGỎ
 * ========================================================================= */
.logline { max-width: 1100px; margin: 0 auto; padding: clamp(110px, calc(18 * var(--cw)), 220px) var(--gutter); }
.logline-text { margin: 0; font: 400 clamp(1.7rem, calc(4.4 * var(--cw)), 3.3rem)/1.35 var(--f-display); letter-spacing: -.005em; color: var(--ink); }
.logline-text .w { display: inline; }
.logline-sign { margin: 36px 0 0; font: italic 400 1.3rem/1.3 var(--f-display); color: var(--rose); }
/* có ảnh nen-1: chữ một bên, ảnh khung vòm một bên */
.logline.has-bg { max-width: 1240px; display: grid; gap: clamp(40px, calc(6 * var(--cw)), 88px); align-items: center; }

.logline-photo { margin: 0; position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 999px 999px 26px 26px; background: var(--blush); box-shadow: 0 30px 60px -30px rgba(180, 88, 122, .45); }
.logline-photo::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 999px 999px 18px 18px; pointer-events: none; }
.logline-photo img { width: 100%; height: 100%; object-fit: cover; filter: var(--film); }
 .logline-photo { order: -1; width: min(calc(72 * var(--cw)), 340px); justify-self: center; } 


/* ảnh nền mờ (nen-2, nen-3): phủ lớp màu dày để chữ luôn dễ đọc */
.has-bg { position: relative; overflow: hidden; isolation: isolate; }
.sec-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.sec-bg img { width: 100%; height: 120%; margin-top: -10%; object-fit: cover; }
.sec-bg::after { content: ""; position: absolute; inset: 0; background: rgba(254, 243, 245, .86); }
.credits .sec-bg::after { background: linear-gradient(180deg, rgba(255, 250, 248, .93) 0%, rgba(248, 240, 231, .88) 50%, rgba(251, 225, 231, .86) 100%); }

/* =========================================================================
 *  4. CÔ DÂU & CHÚ RỂ
 * ========================================================================= */
.cast { padding: clamp(100px, calc(14 * var(--cw)), 180px) 0; background: var(--white); }
.cast-grid { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 64px; }

.role-photo { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: linear-gradient(160deg, var(--blush), var(--beige)); }
.role-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: var(--film); transform: scale(1.04); transition: transform 1.4s var(--ease); }
.role:hover .role-photo img, .role.in-view .role-photo img { transform: none; }
.p-empty { position: absolute; inset: 0; display: grid; place-items: center; font: italic 400 9rem/1 var(--f-display); color: rgba(255, 255, 255, .85); }
.role-info { padding-top: 24px; border-top: 1px solid var(--line); margin-top: 24px; }
.role-as { margin: 0 0 8px; font: 600 .76rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--rose); }
.role-name { margin: 0 0 14px; font: 500 clamp(2rem, calc(4.6 * var(--cw)), 3.2rem)/1.1 var(--f-display); }
.role-family { margin: 0; color: var(--muted); }
.role-family b { font-weight: 500; color: var(--ink); }
.role-addr { margin: 6px 0 0; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--rose); }

/* =========================================================================
 *  5. NGÀY CƯỚI
 * ========================================================================= */
.premiere { padding: clamp(100px, calc(14 * var(--cw)), 180px) 0; background: var(--blush-2); text-align: center; }
.premiere .head { text-align: center; margin-bottom: 10px; }
.bigdate { display: flex; justify-content: center; align-items: flex-start; font: 500 clamp(6rem, calc(25 * var(--cw)), 20rem)/.9 var(--f-display); letter-spacing: -.05em; color: var(--wine); }
.bd-sep { color: var(--rose); }
.bd-m { color: transparent; -webkit-text-stroke: 2px var(--wine); }
.bd-y { margin: .18em 0 0 .12em; font: 600 clamp(.8rem, calc(2 * var(--cw)), 1.3rem)/1 var(--f-body); letter-spacing: .3em; writing-mode: vertical-rl; color: var(--rose); }
.pm-when { margin: 28px 0 0; font: italic 500 clamp(1.5rem, calc(4 * var(--cw)), 2.4rem)/1.2 var(--f-display); color: var(--wine); }
.pm-lunar { margin: 6px 0 0; color: var(--muted); }
.countdown { margin: 56px auto 0; padding: 0 var(--gutter); }
.cd-label { margin: 0 0 18px; font: 600 .74rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.cd-cells { display: inline-grid; grid-template-columns: repeat(4, auto); border: 1px solid var(--line); background: var(--white); }
.cd-cells div { padding: 18px clamp(14px, calc(4 * var(--cw)), 38px); border-right: 1px solid var(--line); }
.cd-cells div:last-child { border-right: 0; }
.cd-cells b { display: block; font: 500 clamp(2rem, calc(7 * var(--cw)), 3.6rem)/1 var(--f-display); font-variant-numeric: tabular-nums lining-nums; }
.cd-cells span { display: block; margin-top: 8px; font: 500 .68rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--rose); }
.cd-done { margin: 40px 0 0; font: italic 400 1.8rem/1.3 var(--f-display); color: var(--wine); }

/* =========================================================================
 *  6. LỊCH TRÌNH
 * ========================================================================= */
.shows { padding: clamp(100px, calc(14 * var(--cw)), 180px) 0; background: var(--paper); }
.sides { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 28px; align-items: start; }


/* nút chuyển Nhà trai | Nhà gái — chỉ trên điện thoại */
.side-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--beige); position: sticky; top: 64px; z-index: 5; }
.side-tabs button { padding: 12px 8px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font: 600 .95rem/1 var(--f-body); color: var(--muted); transition: background .3s, color .3s; }
.side-tabs button[aria-selected="true"] { background: var(--white); color: var(--wine); box-shadow: 0 6px 16px -10px rgba(180, 88, 122, .6); }
  .sides[data-active="trai"] .side-gai, .sides[data-active="gai"] .side-trai { display: none; }


.side { background: var(--white); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; }
.side.is-mine { border-color: var(--rose); box-shadow: 0 0 0 3px var(--blush); }
.side-head { position: relative; padding: clamp(24px, calc(4 * var(--cw)), 34px); }
.side-trai .side-head { background: linear-gradient(135deg, var(--blush) 0%, var(--blush-2) 100%); }
.side-gai .side-head { background: linear-gradient(135deg, var(--beige) 0%, var(--beige-2) 100%); }
.side-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 6px 12px; border-radius: 999px; background: var(--wine); color: #fff; font: 600 .72rem/1 var(--f-body); letter-spacing: .04em; }
.side-label { margin: 0 0 12px; font: 600 clamp(1.9rem, calc(5 * var(--cw)), 2.5rem)/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; color: var(--wine); }
.side-parents { margin: 0; font-size: 1.05rem; line-height: 1.7; color: var(--muted); }
.side-parents b { font-weight: 600; color: var(--ink); }
.side-addr { margin: 12px 0 0; display: flex; align-items: center; gap: 6px; font-size: .92rem; color: var(--ink); }
.side-addr .ic { color: var(--rose); }
a.side-addr { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }

.show-list { list-style: none; margin: 0; padding: 0; }
.show { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 24px clamp(20px, calc(4 * var(--cw)), 34px); border-top: 1px solid var(--line); }
.show-when { display: grid; align-content: start; gap: 6px; }
.show-time { font: 500 2.2rem/1 var(--f-display); color: var(--wine); font-variant-numeric: lining-nums; }
.show-date { font: 600 .74rem/1.45 var(--f-body); color: var(--rose); }
.show-title { margin: 0 0 6px; font: 600 1.4rem/1.2 var(--f-display); color: var(--ink); }
.show-meta { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
.show-meta b { font-weight: 600; color: var(--ink); }
.show-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm { padding: .72em 1.15em; font-size: .78rem; }
.show-empty { padding: 24px 34px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 420px) { .show { grid-template-columns: 1fr; gap: 8px; } .show-when { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 12px; } .show-date br { display: none; } }

/* =========================================================================
 *  6b. LƯU Ý CHO KHÁCH
 * ========================================================================= */
.notes { padding: clamp(100px, calc(14 * var(--cw)), 160px) 0; background: var(--beige-2); }
.note-grid { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.note { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 28px 26px; background: var(--white); border: 1px solid var(--line); border-radius: 22px; }
.note p { margin: 0; color: var(--muted); }
.note .btn { margin-top: auto; }
.note-ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--blush-2); color: var(--wine); }
.note-ic svg { width: 22px; height: 22px; }
.note-title { margin: 4px 0 0; font: 500 1.5rem/1.2 var(--f-display); }
.swatches { display: flex; gap: 8px; margin-top: 4px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); box-shadow: inset 0 0 0 3px #fff; }
.contact { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border-top: 1px solid var(--line); }
.contact small { display: block; font: 600 .66rem/1.2 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--rose); }
.contact b { font-weight: 500; }
.contact-actions { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--wine); transition: background .3s, color .3s; }
.icon-btn:hover { background: var(--wine); color: #fff; }
.icon-btn svg { width: 18px; height: 18px; }

/* =========================================================================
 *  7. ALBUM — lưới ảnh giữ nguyên tỉ lệ
 * ========================================================================= */
.album { padding: clamp(100px, calc(14 * var(--cw)), 170px) 0; background: var(--white); }
.gallery { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); columns: 2; column-gap: 10px; }


.g-item {
  position: relative;
  display: block; width: 100%;
  margin: 0 0 14px; padding: 7px; border: 0;
  border-radius: 3px; overflow: hidden;
  break-inside: avoid;
  cursor: zoom-in;
  background: #fff;
  box-shadow: 0 1px 2px rgba(92, 74, 76, .12), 0 14px 26px -18px rgba(92, 74, 76, .45);
  min-height: 140px;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .4s var(--ease), box-shadow .4s;
}
.g-item:nth-child(3n+1) { --tilt: -.9deg; }
.g-item:nth-child(3n+2) { --tilt: .7deg; }
.g-item:nth-child(5n) { --tilt: -.4deg; }
.g-item:hover { transform: rotate(0deg) scale(1.02); box-shadow: 0 2px 4px rgba(92, 74, 76, .12), 0 24px 40px -20px rgba(92, 74, 76, .5); z-index: 1; }

.g-item img { width: 100%; height: auto; opacity: 0; filter: var(--film); transition: opacity .7s ease; }
.g-item.is-loaded { min-height: 0; }
.g-item.is-loaded img { opacity: 1; }
.gallery-more { text-align: center; margin-top: 36px; }
.gallery-empty { max-width: 560px; margin: 0 auto; padding: 48px var(--gutter); text-align: center; border: 1px dashed var(--sand); border-radius: 22px; background: var(--blush-2); }
.gallery-empty p { margin: 0 0 6px; font: italic 400 1.8rem/1.3 var(--f-display); color: var(--wine); }
.gallery-empty small { color: var(--muted); }
.gallery-empty code { padding: 2px 6px; background: #fff; color: var(--wine); }

/* =========================================================================
 *  8. MỪNG CƯỚI
 * ========================================================================= */
.gift { padding: clamp(100px, calc(14 * var(--cw)), 180px) 0; background: var(--blush-2); }
.gifts { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.gift-item { display: grid; gap: 18px; justify-items: start; }
/* phong bì mừng cưới: lá thư rút lên một nửa, nắp mở phía sau, con dấu sáp ở nếp gấp */
.envelope { position: relative; width: 100%; max-width: 400px; padding-top: 14px; isolation: isolate; }
.env-back { position: absolute; left: 0; right: 0; top: 70px; bottom: 0; z-index: -1; border-radius: 10px; background: var(--env); box-shadow: 0 26px 44px -24px rgba(0, 0, 0, .5); }
.env-back::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 58px; background: var(--env-flap); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.env-letter { position: relative; z-index: 1; display: grid; gap: 12px; margin: 0 22px; padding: 18px 20px 134px; border-radius: 6px; background: var(--letter); box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .4); overflow: hidden; }
.env-front {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 124px;
  display: grid; place-items: end center; padding-bottom: 14px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), transparent 45%), var(--env);
  clip-path: polygon(0 0, 50% 44%, 100% 0, 100% 100%, 0 100%);
}
.env-label { font: italic 400 1.1rem/1.2 var(--f-display); }
.env-seal { position: absolute; z-index: 3; left: 50%; bottom: 44px; width: 56px; height: 56px; margin-left: -28px; display: grid; place-items: center; border-radius: 50%; font: 700 1.5rem/1 serif; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .55), inset 0 0 0 4px rgba(255, 255, 255, .18); }
.bc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bc-top svg { width: 22px; height: 22px; }
.bc-bank { font: 700 1rem/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.bc-number { position: relative; z-index: 1; font: 500 clamp(1.3rem, calc(5.4 * var(--cw)), 1.75rem)/1 var(--f-body); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.bc-bottom { display: grid; gap: 4px; }
.bc-bottom small { font: 500 .58rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.bc-bottom b { font: 600 .92rem/1.2 var(--f-body); letter-spacing: .1em; }
.gift-qr { width: 170px; padding: 10px; background: #fff; border: 1px solid var(--line); }

/* =========================================================================
 *  9. LỜI KẾT
 * ========================================================================= */
.credits {
  text-align: center;
  padding: clamp(120px, calc(18 * var(--cw)), 220px) var(--gutter) clamp(100px, calc(14 * var(--cw)), 160px);
  background: linear-gradient(180deg, var(--paper) 0%, var(--beige-2) 45%, var(--blush) 100%);
}
.credits-roll { display: grid; gap: clamp(44px, calc(7 * var(--cw)), 64px); max-width: 720px; margin: 0 auto; }
.cr-block { margin: 0; }
.cr-role { margin: 0 0 12px; font: 600 .72rem/1.5 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--rose); }
.cr-names { margin: 0; font: 400 clamp(1.4rem, calc(3.6 * var(--cw)), 2rem)/1.45 var(--f-display); color: var(--ink); }
.cr-names small { display: block; font: 400 .95rem/1.6 var(--f-body); color: var(--muted); }
.cr-guest .cr-names { font-style: italic; color: var(--wine); font-size: clamp(1.8rem, calc(5 * var(--cw)), 2.8rem); }
.the-end { margin-top: clamp(100px, calc(16 * var(--cw)), 200px); }
.te-title { margin: 0; font: italic 400 clamp(4rem, calc(15 * var(--cw)), 10rem)/1 var(--f-display); color: var(--wine); letter-spacing: -.02em; }
.te-sub { margin: 16px 0 0; font: italic 400 1.4rem/1.4 var(--f-display); color: var(--rose); }
.te-date { margin: 40px 0 0; font: 600 .74rem/1.6 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

/* ---------- hiện dần khi cuộn (chỉ khi có hiệu ứng) ---------- */
.motion [data-reveal] { opacity: 0; transform: translateY(40px); }

/* =========================================================================
 *  FAB, LIGHTBOX, TOAST
 * ========================================================================= */
.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 95; display: flex; flex-direction: column; gap: 10px; }
.fab-btn { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--wine); box-shadow: 0 10px 24px -12px rgba(180,88,122,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; transition: transform .3s var(--ease), opacity .3s; }
.fab-btn:hover { transform: scale(1.08); }
.fab-btn svg { width: 20px; height: 20px; }
#to-top { opacity: 0; pointer-events: none; }
#to-top.is-shown { opacity: 1; pointer-events: auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.lightbox { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; background: var(--paper); animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; } }
.lb-stage { margin: 0; padding: 64px 16px; width: 100%; height: 100%; display: grid; place-items: center; }
.lb-stage img { max-width: min(1300px, 100%); max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 60px -30px rgba(92, 74, 76, .45); animation: zoomIn .45s var(--ease); }
@keyframes zoomIn { from { opacity: 0; transform: scale(.97); } }
.lb-btn { position: absolute; z-index: 1; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--wine); box-shadow: 0 8px 20px -12px rgba(180, 88, 122, .5); cursor: pointer; transition: background .3s, color .3s; }
.lb-btn:hover { background: var(--wine); color: #fff; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -24px; }
.lb-next { right: 16px; top: 50%; margin-top: -24px; }
.lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font: 500 .75rem/1 var(--f-body); letter-spacing: .3em; color: var(--muted); }
 .lb-prev, .lb-next { top: auto; bottom: 8px; margin: 0; } .lb-count { bottom: 26px; } 


.toast { position: fixed; left: 50%; bottom: 30px; z-index: 260; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .88rem; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: .4s var(--ease); }
.toast.is-shown { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .grain, .play-ic, .hero-scroll span { animation: none; }
  .leader-start { transition: none; }
}

/* điện thoại: nút nổi nằm trên thanh điều hướng dưới đáy; nút "lên đầu" không cần vì đã có thanh điều hướng */
  .fab { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 84px); }
  #to-top { display: none; }

 .hc-kicker { letter-spacing: .14em; font-size: .66rem; } 


/* =========================================================================
 *  HOÀI NIỆM THẬP NIÊN 90
 * ========================================================================= */
/* dấu ngày màu cam kiểu máy ảnh phim */
[data-stamp]::before {
  content: attr(data-stamp);
  position: absolute; right: 16px; bottom: 12px; z-index: 2;
  font: 400 clamp(1rem, calc(2.4 * var(--cw)), 1.35rem)/1 "VT323", ui-monospace, monospace;
  letter-spacing: .06em;
  color: #ff9a4d;
  text-shadow: 0 0 3px rgba(255, 120, 40, .9), 0 0 10px rgba(255, 120, 40, .45);
  pointer-events: none;
}
.g-item[data-stamp]::before { right: 16px; bottom: 14px; font-size: 1.05rem; }
.logline-photo[data-stamp]::before { right: 50%; transform: translateX(50%); bottom: 22px; }

/* cuộn băng cassette */
.cassette {
  --w: 280px;
  position: relative;
  width: var(--w); aspect-ratio: 1.6;
  padding: calc(var(--w) * .055) calc(var(--w) * .06) 0;
  border-radius: calc(var(--w) * .045);
  background: linear-gradient(160deg, #fde6ec 0%, #f5c3cf 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 22px 40px -22px rgba(180, 88, 122, .65);
  text-align: center;
}
.cassette::before, .cassette::after { /* 4 con ốc ở góc */
  content: ""; position: absolute; top: 5%; width: 4%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #e9b3c0 30%, #fff 32%);
  box-shadow: 0 calc(var(--w) * .5) 0 0 #fff;
}
.cassette::before { left: 2.5%; } .cassette::after { right: 2.5%; }
.cs-label {
  position: relative;
  display: grid; justify-items: center; align-content: start;
  height: 72%;
  padding: 5% 8% 0;
  border-radius: 6px;
  background: repeating-linear-gradient(180deg, #fffaf8 0 calc(var(--w) * .075), #fbe1e7 calc(var(--w) * .075) calc(var(--w) * .079));
}
.cs-side { position: absolute; left: 5%; top: 6%; font: 700 calc(var(--w) * .075)/1 var(--f-body); color: var(--wine); }
.cs-title { max-width: 86%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: italic 500 calc(var(--w) * .07)/1.25 var(--f-display); color: var(--wine); }
.cs-sub { position: absolute; left: 0; right: 0; bottom: 6%; font: 600 calc(var(--w) * .038)/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cs-window {
  display: flex; align-items: center; justify-content: space-between;
  width: 64%; height: calc(var(--w) * .17); margin-top: 3%;
  padding: 0 4%;
  border-radius: 999px;
  background: #6b5557;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35);
}
.cs-reel {
  width: calc(var(--w) * .12); aspect-ratio: 1; border-radius: 50%;
  background: repeating-conic-gradient(#fffaf8 0 18deg, #f2b8c6 18deg 60deg);
  box-shadow: 0 0 0 calc(var(--w) * .012) #fffaf8, 0 0 0 calc(var(--w) * .022) #4a3a3c;
}
.cs-tape { flex: 1; height: 40%; margin: 0 6%; border-radius: 3px; background: #3d2f31; opacity: .8; }
.cs-foot { position: absolute; left: 22%; right: 22%; bottom: 0; height: 17%; background: rgba(255, 255, 255, .45); clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%); }
.cassette.is-playing .cs-reel, .tape-btn.is-playing .cs-reel { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cassette-lg { --w: min(calc(78 * var(--cw)), 320px); margin-bottom: 10px; transform: rotate(-3deg); }

/* nút nhạc = cuộn băng nhỏ ở góc dưới bên trái */
.tape-btn {
  position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 95;
  padding: 0; border: 0; background: none; cursor: pointer;
  transform: rotate(-4deg); transition: transform .3s var(--ease);
}
.tape-btn:hover { transform: rotate(0deg) scale(1.04); }
.cassette-sm { --w: 150px; }
.cassette-sm .cs-title { font-size: calc(var(--w) * .075); }
.cassette-sm .cs-sub { letter-spacing: .04em; text-transform: none; font-size: calc(var(--w) * .058); }
.tape-btn:not(.is-playing) .cassette-sm { filter: saturate(.75); }
  .tape-btn { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 84px); left: 10px; }
  .cassette-sm { --w: 100px; }
  .cassette-sm .cs-sub { display: none; }

@media (prefers-reduced-motion: reduce) { .cs-reel { animation: none !important; } }

/* =========================================================================
 *  HAI GIAO DIỆN: CỔ ĐIỂN (mặc định) & HIỆN ĐẠI
 * ========================================================================= */
/* nút chọn giao diện */
.theme-switch { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 999px; background: var(--beige); }
.theme-switch button { padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font: 600 .78rem/1 var(--f-body); color: var(--muted); white-space: nowrap; transition: background .3s, color .3s; }
.theme-switch button[aria-checked="true"] { background: var(--white); color: var(--wine); box-shadow: 0 4px 12px -8px rgba(180, 88, 122, .7); }
.theme-switch-sm button { padding: 6px 10px; font-size: .7rem; }
.tb-right { display: flex; align-items: center; gap: 18px; }

.leader-theme { display: grid; justify-items: center; gap: 8px; margin-top: 8px; }
.leader-theme > span { font: 600 .66rem/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* chữ lồng H & T — chỉ ở giao diện hiện đại */
.leader-mono { margin: 0 0 6px; font: italic 400 clamp(4rem, calc(16 * var(--cw)), 6.5rem)/1 var(--f-display); color: var(--wine); }
[data-theme="classic"] .leader-mono { display: none; }

/* đôi chim bồ câu — chỉ ở giao diện cổ điển */
.hero-doves { display: none; }
[data-theme="classic"] .hero-doves { display: block; width: min(calc(64 * var(--cw)), 330px); aspect-ratio: 400 / 230; margin: 0 auto -1vh; animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.dv-heart { transform-origin: 200px 180px; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.07); } }

/* giao diện hiện đại: tắt các chi tiết hoài niệm */
[data-theme="modern"] { --film: none; }
[data-theme="modern"] [data-stamp]::before { content: none; }
[data-theme="modern"] .cassette-lg { display: none; }
[data-theme="modern"] .g-item { padding: 0; border-radius: 14px; box-shadow: none; transform: none; background: linear-gradient(135deg, var(--blush-2), var(--beige-2)); }
[data-theme="modern"] .g-item:hover { transform: none; box-shadow: none; }
[data-theme="modern"] .g-item:hover img { transform: scale(1.03); }
[data-theme="modern"] .g-item img { transition: opacity .7s ease, transform .8s var(--ease); }
[data-theme="modern"] .logline-photo { border-radius: 26px; }
[data-theme="modern"] .logline-photo::after { border-radius: 18px; }

/* nút nhạc: cuộn băng (cổ điển) / nút tròn (hiện đại) */
.tape-ic { display: none; width: 20px; height: 20px; }
[data-theme="modern"] .tape-btn {
  left: auto; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 56px);
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--wine);
  box-shadow: 0 10px 24px -12px rgba(180, 88, 122, .5);
  transform: none;
}
[data-theme="modern"] .tape-btn .cassette { display: none; }
[data-theme="modern"] .tape-ic { display: block; }
[data-theme="modern"] .tape-btn.is-playing { background: var(--wine); border-color: var(--wine); color: #fff; }
[data-theme="modern"] .tape-btn.is-playing .tape-ic { animation: spin 3s linear infinite; }
 [data-theme="modern"] .tape-btn { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 84px); left: auto; right: 12px; } 

@media (prefers-reduced-motion: reduce) { .hero-doves, .dv-heart { animation: none !important; } }

/* =========================================================================
 *  CỔ ĐIỂN — đám cưới Việt thập niên 80–90: phông vải xanh, chữ cắt dán
 *  đỏ/vàng, chăn con công, xe đạp, lá cọ
 * ========================================================================= */
[data-theme="classic"] {
  --f-display: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif;
  --navy: #1c3f94;
  --red: #d8262f;
  --yellow: #ffd23f;
  --paper: #fbf4e6;
  --white: #fffdf8;
  --cream: #f6ecd8;
  --blush: #fde9a8;
  --blush-2: #fbf4e6;
  --beige: #efe2c8;
  --beige-2: #f6ecd8;
  --pink: #ffd23f;
  --rose: #1c3f94;
  --wine: #d8262f;
  --ink: #22305a;
  --muted: #56607a;
  --line: rgba(28, 63, 148, .2);
  --drape: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(0, 0, 0, .22)),
           repeating-linear-gradient(90deg, #1b3c8f 0 22px, #2447a3 34px, #1b3c8f 48px, #16337c 60px);
  --blanket: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect width='120' height='120' fill='%23c8173a'/%3E%3Crect x='3' y='3' width='114' height='114' fill='none' stroke='%23ffd23f' stroke-width='1.2' stroke-dasharray='4 3' opacity='.6'/%3E%3Cpath d='M60 60 L112.0 60.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L110.2 75.5' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L105.0 90.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L96.8 102.4' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L86.0 112.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L73.5 118.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L60.0 120.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L46.5 118.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L34.0 112.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L23.2 102.4' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L15.0 90.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L9.8 75.5' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L8.0 60.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L9.8 44.5' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L15.0 30.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L23.2 17.6' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L34.0 8.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L46.5 2.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L60.0 0.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L73.5 2.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L86.0 8.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L96.8 17.6' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L105.0 30.0' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 60 L110.2 44.5' stroke='%23ffd23f' stroke-width='1.2' opacity='.55'/%3E%3Cellipse cx='60' cy='60' rx='26' ry='33' fill='%231f9e5a'/%3E%3Cellipse cx='60' cy='62' rx='20' ry='25' fill='%23ffd23f'/%3E%3Cellipse cx='60' cy='64' rx='14' ry='18' fill='%2318a3b6'/%3E%3Cellipse cx='60' cy='66' rx='8' ry='11' fill='%231c3f94'/%3E%3Cellipse cx='57' cy='61' rx='2.5' ry='4' fill='%23fff' opacity='.8'/%3E%3Cellipse cx='12.0' cy='0.0' rx='11.0' ry='7.6' transform='rotate%280 12.0 0.0%29' fill='%23f78fb3'/%3E%3Cellipse cx='3.7' cy='11.4' rx='11.0' ry='7.6' transform='rotate%2872 3.7 11.4%29' fill='%23f78fb3'/%3E%3Cellipse cx='-9.7' cy='7.1' rx='11.0' ry='7.6' transform='rotate%28144 -9.7 7.1%29' fill='%23f78fb3'/%3E%3Cellipse cx='-9.7' cy='-7.1' rx='11.0' ry='7.6' transform='rotate%28216 -9.7 -7.1%29' fill='%23f78fb3'/%3E%3Cellipse cx='3.7' cy='-11.4' rx='11.0' ry='7.6' transform='rotate%28288 3.7 -11.4%29' fill='%23f78fb3'/%3E%3Ccircle cx='0' cy='0' r='6.0' fill='%23ffd23f'/%3E%3Cellipse cx='132.0' cy='0.0' rx='11.0' ry='7.6' transform='rotate%280 132.0 0.0%29' fill='%23f78fb3'/%3E%3Cellipse cx='123.7' cy='11.4' rx='11.0' ry='7.6' transform='rotate%2872 123.7 11.4%29' fill='%23f78fb3'/%3E%3Cellipse cx='110.3' cy='7.1' rx='11.0' ry='7.6' transform='rotate%28144 110.3 7.1%29' fill='%23f78fb3'/%3E%3Cellipse cx='110.3' cy='-7.1' rx='11.0' ry='7.6' transform='rotate%28216 110.3 -7.1%29' fill='%23f78fb3'/%3E%3Cellipse cx='123.7' cy='-11.4' rx='11.0' ry='7.6' transform='rotate%28288 123.7 -11.4%29' fill='%23f78fb3'/%3E%3Ccircle cx='120' cy='0' r='6.0' fill='%23ffd23f'/%3E%3Cellipse cx='12.0' cy='120.0' rx='11.0' ry='7.6' transform='rotate%280 12.0 120.0%29' fill='%23f78fb3'/%3E%3Cellipse cx='3.7' cy='131.4' rx='11.0' ry='7.6' transform='rotate%2872 3.7 131.4%29' fill='%23f78fb3'/%3E%3Cellipse cx='-9.7' cy='127.1' rx='11.0' ry='7.6' transform='rotate%28144 -9.7 127.1%29' fill='%23f78fb3'/%3E%3Cellipse cx='-9.7' cy='112.9' rx='11.0' ry='7.6' transform='rotate%28216 -9.7 112.9%29' fill='%23f78fb3'/%3E%3Cellipse cx='3.7' cy='108.6' rx='11.0' ry='7.6' transform='rotate%28288 3.7 108.6%29' fill='%23f78fb3'/%3E%3Ccircle cx='0' cy='120' r='6.0' fill='%23ffd23f'/%3E%3Cellipse cx='132.0' cy='120.0' rx='11.0' ry='7.6' transform='rotate%280 132.0 120.0%29' fill='%23f78fb3'/%3E%3Cellipse cx='123.7' cy='131.4' rx='11.0' ry='7.6' transform='rotate%2872 123.7 131.4%29' fill='%23f78fb3'/%3E%3Cellipse cx='110.3' cy='127.1' rx='11.0' ry='7.6' transform='rotate%28144 110.3 127.1%29' fill='%23f78fb3'/%3E%3Cellipse cx='110.3' cy='112.9' rx='11.0' ry='7.6' transform='rotate%28216 110.3 112.9%29' fill='%23f78fb3'/%3E%3Cellipse cx='123.7' cy='108.6' rx='11.0' ry='7.6' transform='rotate%28288 123.7 108.6%29' fill='%23f78fb3'/%3E%3Ccircle cx='120' cy='120' r='6.0' fill='%23ffd23f'/%3E%3Cellipse cx='65.4' cy='0.0' rx='5.0' ry='3.4' transform='rotate%280 65.4 0.0%29' fill='%23ff9f1c'/%3E%3Cellipse cx='61.7' cy='5.1' rx='5.0' ry='3.4' transform='rotate%2872 61.7 5.1%29' fill='%23ff9f1c'/%3E%3Cellipse cx='55.6' cy='3.2' rx='5.0' ry='3.4' transform='rotate%28144 55.6 3.2%29' fill='%23ff9f1c'/%3E%3Cellipse cx='55.6' cy='-3.2' rx='5.0' ry='3.4' transform='rotate%28216 55.6 -3.2%29' fill='%23ff9f1c'/%3E%3Cellipse cx='61.7' cy='-5.1' rx='5.0' ry='3.4' transform='rotate%28288 61.7 -5.1%29' fill='%23ff9f1c'/%3E%3Ccircle cx='60' cy='0' r='2.7' fill='%23ffd23f'/%3E%3Cellipse cx='65.4' cy='120.0' rx='5.0' ry='3.4' transform='rotate%280 65.4 120.0%29' fill='%23ff9f1c'/%3E%3Cellipse cx='61.7' cy='125.1' rx='5.0' ry='3.4' transform='rotate%2872 61.7 125.1%29' fill='%23ff9f1c'/%3E%3Cellipse cx='55.6' cy='123.2' rx='5.0' ry='3.4' transform='rotate%28144 55.6 123.2%29' fill='%23ff9f1c'/%3E%3Cellipse cx='55.6' cy='116.8' rx='5.0' ry='3.4' transform='rotate%28216 55.6 116.8%29' fill='%23ff9f1c'/%3E%3Cellipse cx='61.7' cy='114.9' rx='5.0' ry='3.4' transform='rotate%28288 61.7 114.9%29' fill='%23ff9f1c'/%3E%3Ccircle cx='60' cy='120' r='2.7' fill='%23ffd23f'/%3E%3Cellipse cx='5.4' cy='60.0' rx='5.0' ry='3.4' transform='rotate%280 5.4 60.0%29' fill='%23ff9f1c'/%3E%3Cellipse cx='1.7' cy='65.1' rx='5.0' ry='3.4' transform='rotate%2872 1.7 65.1%29' fill='%23ff9f1c'/%3E%3Cellipse cx='-4.4' cy='63.2' rx='5.0' ry='3.4' transform='rotate%28144 -4.4 63.2%29' fill='%23ff9f1c'/%3E%3Cellipse cx='-4.4' cy='56.8' rx='5.0' ry='3.4' transform='rotate%28216 -4.4 56.8%29' fill='%23ff9f1c'/%3E%3Cellipse cx='1.7' cy='54.9' rx='5.0' ry='3.4' transform='rotate%28288 1.7 54.9%29' fill='%23ff9f1c'/%3E%3Ccircle cx='0' cy='60' r='2.7' fill='%23ffd23f'/%3E%3Cellipse cx='125.4' cy='60.0' rx='5.0' ry='3.4' transform='rotate%280 125.4 60.0%29' fill='%23ff9f1c'/%3E%3Cellipse cx='121.7' cy='65.1' rx='5.0' ry='3.4' transform='rotate%2872 121.7 65.1%29' fill='%23ff9f1c'/%3E%3Cellipse cx='115.6' cy='63.2' rx='5.0' ry='3.4' transform='rotate%28144 115.6 63.2%29' fill='%23ff9f1c'/%3E%3Cellipse cx='115.6' cy='56.8' rx='5.0' ry='3.4' transform='rotate%28216 115.6 56.8%29' fill='%23ff9f1c'/%3E%3Cellipse cx='121.7' cy='54.9' rx='5.0' ry='3.4' transform='rotate%28288 121.7 54.9%29' fill='%23ff9f1c'/%3E%3Ccircle cx='120' cy='60' r='2.7' fill='%23ffd23f'/%3E%3C/svg%3E");
}
/* chữ cắt dán: mỗi ký tự lệch một chút */
[data-theme="classic"] .cl { display: inline-block; transform: translateY(var(--y)) rotate(var(--r)); }

/* ---------- tiêu đề & nhãn ---------- */
[data-theme="classic"] .head { text-align: center; }
[data-theme="classic"] .lead { margin-left: auto; margin-right: auto; }
[data-theme="classic"] .h2 { font-weight: 800; color: var(--red); letter-spacing: .01em; text-shadow: 2px 3px 0 rgba(28, 63, 148, .16); }
[data-theme="classic"] .h2 i { font-style: normal; font-weight: 800; color: var(--navy); }
[data-theme="classic"] .eyebrow {
  padding: 5px 14px 3px;
  font: 700 .95rem/1.2 var(--f-display); letter-spacing: .06em;
  color: var(--yellow); background: var(--navy);
  transform: rotate(-2deg);
  box-shadow: 2px 3px 0 rgba(0, 0, 0, .14);
}
[data-theme="classic"] .eyebrow::before { display: none; }
[data-theme="classic"] .btn { border-radius: 6px; border-width: 2px; border-color: var(--navy); color: var(--navy); font: 700 .9rem/1 var(--f-display); letter-spacing: .02em; }
[data-theme="classic"] .btn:hover { background: var(--navy); color: var(--yellow); }
[data-theme="classic"] .btn-fill { background: var(--red); border-color: var(--red); color: #fff; }

/* dải hoa văn chăn con công ngăn cách các phần */
[data-theme="classic"] .cast, [data-theme="classic"] .shows, [data-theme="classic"] .notes,
[data-theme="classic"] .album, [data-theme="classic"] .gift { position: relative; }
[data-theme="classic"] .cast::before, [data-theme="classic"] .shows::before, [data-theme="classic"] .notes::before,
[data-theme="classic"] .album::before, [data-theme="classic"] .gift::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 20px;
  background: var(--blanket) 0 0 / 60px;
  box-shadow: inset 0 -3px 0 var(--yellow);
}
[data-theme="classic"] .cast, [data-theme="classic"] .album { background: #fffdf8; }
[data-theme="classic"] .notes, [data-theme="classic"] .gift { background: var(--cream); }

/* ---------- màn mở thiệp: chăn con công ---------- */
/* màn mở thiệp: thiệp đỏ, chữ Song Hỷ vàng in mờ, khung viền đôi vàng */
[data-theme="classic"] .leader {
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, #c8202c 0%, #a3121d 70%, #8a0f18 100%) !important;
  overflow: hidden;
}
[data-theme="classic"] .leader::before {
  content: "囍";
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font: 700 min(calc(92 * var(--cw)), 78vh)/1 "Noto Serif SC", "Songti SC", "SimSun", serif;
  color: rgba(255, 210, 63, .1);
  pointer-events: none;
}
[data-theme="classic"] .leader::after {
  content: ""; position: absolute; inset: clamp(12px, calc(3 * var(--cw)), 28px);
  border: 4px double rgba(255, 210, 63, .75); border-radius: 6px;
  box-shadow: inset 0 0 0 8px transparent, inset 0 0 0 9px rgba(255, 210, 63, .35);
  pointer-events: none;
}
[data-theme="classic"] .leader-start { z-index: 1; width: min(calc(92 * var(--cw)), 440px); }
[data-theme="classic"] .leader-guest { font-family: var(--f-body); font-style: normal; color: #fbe7c0; }
[data-theme="classic"] .leader-guest b { font: 800 2rem/1.2 var(--f-display); color: var(--yellow); text-shadow: 2px 3px 0 rgba(0, 0, 0, .25); }
[data-theme="classic"] .play-btn { border: 2px solid var(--yellow); border-radius: 8px; background: #fff6df; color: var(--red); font-family: var(--f-display); font-size: 1rem; box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .6); }
[data-theme="classic"] .play-ic { background: var(--red); border-radius: 6px; }
[data-theme="classic"] .leader-hint { color: rgba(251, 231, 192, .85); }
[data-theme="classic"] .leader-theme > span { color: rgba(251, 231, 192, .85); }
[data-theme="classic"] .leader .theme-switch { background: rgba(0, 0, 0, .18); }
[data-theme="classic"] .leader .theme-switch button { color: #fbe7c0; }
[data-theme="classic"] .leader .theme-switch button[aria-checked="true"] { background: var(--yellow); color: var(--red); }

/* ---------- mở đầu: phông vải xanh ---------- */
[data-theme="classic"] .hero-mask { background: var(--drape); align-content: center; }
[data-theme="classic"] .hero-pre { display: none; }
[data-theme="classic"] .hero-scroll { color: rgba(255, 255, 255, .8); }
[data-theme="classic"] .hero-scroll span { background: linear-gradient(transparent, #fff); }
.hero-banner, .hero-date, .hero-palm, .hero-bike { display: none; }
[data-theme="classic"] .hero-banner {
  display: block; margin: 0 0 .1em;
  font: 800 clamp(2.6rem, calc(9 * var(--cw)), 5.6rem)/1 var(--f-display);
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--red);
  -webkit-text-stroke: 4px #fff; paint-order: stroke fill;
  text-shadow: 3px 4px 0 rgba(0, 0, 0, .28);
}
[data-theme="classic"] .hero-doves { width: min(calc(44 * var(--cw)), 210px); margin: 0 auto; }
[data-theme="classic"] .hero-title {
  font: 800 min(calc(15 * var(--cw)), 14vh)/1 var(--f-display);
  font-style: normal; text-transform: uppercase; letter-spacing: .02em;
  color: var(--yellow);
  text-shadow: 3px 4px 0 rgba(0, 0, 0, .3);
}
[data-theme="classic"] .hero-title .amp { font: 800 .55em/1 var(--f-display); color: #fff; margin: .05em 0; }

[data-theme="classic"] .hero-date {
  display: block; margin: .35em 0 0;
  font: 700 clamp(1.5rem, calc(4.4 * var(--cw)), 2.6rem)/1 var(--f-display); letter-spacing: .08em;
  color: var(--yellow); text-shadow: 2px 3px 0 rgba(0, 0, 0, .28);
}
[data-theme="classic"] .hero-palm { display: block; position: absolute; top: max(6vh, 56px); width: min(calc(38 * var(--cw)), 330px); aspect-ratio: 210 / 190; pointer-events: none; }
[data-theme="classic"] .hero-palm-l { left: calc(-3 * var(--cw)); transform: rotate(-8deg); }
[data-theme="classic"] .hero-palm-r { right: calc(-3 * var(--cw)); transform: scaleX(-1) rotate(-8deg); }
[data-theme="classic"] .hero-bike { display: block; position: absolute; left: calc(3 * var(--cw)); bottom: 9vh; width: min(calc(34 * var(--cw)), 220px); aspect-ratio: 200 / 112; }
[data-theme="classic"] .bk-wheel { transform-box: fill-box; transform-origin: center; animation: spin 1.8s linear infinite; }
[data-theme="classic"] .hero-card { background: var(--drape); border: 3px solid var(--yellow); border-radius: 8px; }
[data-theme="classic"] .hc-kicker { color: var(--yellow); }
[data-theme="classic"] .hc-names { font-style: normal; font-weight: 800; color: var(--yellow); text-shadow: 2px 3px 0 rgba(0, 0, 0, .28); }
[data-theme="classic"] .hc-names i { font-style: normal; color: #fff; }
[data-theme="classic"] .hc-date { color: #fff; }

/* ---------- lời ngỏ ---------- */
[data-theme="classic"] .logline-text { font-family: var(--f-body); font-weight: 500; color: var(--ink); }
[data-theme="classic"] .logline-sign { font: 800 1.4rem/1.3 var(--f-display); color: var(--red); }
[data-theme="classic"] .logline-photo { border: 7px solid #fff; box-shadow: 0 0 0 3px var(--yellow), 0 24px 50px -24px rgba(0, 0, 0, .45); }

/* ---------- cô dâu chú rể ---------- */
[data-theme="classic"] .role-photo { border: 9px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15), 0 20px 40px -24px rgba(0, 0, 0, .5); }
[data-theme="classic"] .role-as { display: inline-block; padding: 4px 10px 2px; color: var(--yellow); background: var(--red); font: 700 .85rem/1.2 var(--f-display); letter-spacing: .06em; }
[data-theme="classic"] .role-name { font-weight: 800; color: var(--navy); }

/* ---------- ngày cưới & lời kết: phông xanh chữ vàng ---------- */
[data-theme="classic"] .premiere, [data-theme="classic"] .credits { background: var(--drape); color: #fff; }
[data-theme="classic"] .premiere .eyebrow, [data-theme="classic"] .credits .eyebrow { color: var(--navy); background: var(--yellow); }
[data-theme="classic"] .bigdate { font-weight: 800; color: var(--yellow); text-shadow: 4px 5px 0 rgba(0, 0, 0, .28); }
[data-theme="classic"] .bd-m { -webkit-text-stroke: 3px var(--yellow); text-shadow: none; }
[data-theme="classic"] .bd-sep { color: var(--red); }
[data-theme="classic"] .bd-y { color: #fff; }
[data-theme="classic"] .pm-when { font: 800 clamp(1.6rem, calc(4 * var(--cw)), 2.4rem)/1.2 var(--f-display); color: #fff; }
[data-theme="classic"] .pm-lunar, [data-theme="classic"] .cd-label { color: rgba(255, 255, 255, .85); }
[data-theme="classic"] .cd-cells { background: var(--yellow); border: 3px solid #fff; border-radius: 8px; }
[data-theme="classic"] .cd-cells div { border-color: rgba(28, 63, 148, .25); }
[data-theme="classic"] .cd-cells b { font-weight: 800; color: var(--navy); }
[data-theme="classic"] .cd-cells span { color: var(--red); font-weight: 700; }
[data-theme="classic"] .cd-done { color: var(--yellow); }
[data-theme="classic"] .sec-bg::after { background: rgba(27, 60, 143, .88); }
[data-theme="classic"] .cr-role { color: var(--yellow); }
[data-theme="classic"] .cr-names { font-family: var(--f-display); font-weight: 700; color: #fff; }
[data-theme="classic"] .cr-names small { font-family: var(--f-body); color: rgba(255, 255, 255, .8); }
[data-theme="classic"] .cr-guest .cr-names { color: var(--yellow); font-style: normal; }
[data-theme="classic"] .te-title { font-weight: 800; font-style: normal; color: var(--red); -webkit-text-stroke: 4px #fff; paint-order: stroke fill; text-shadow: 4px 5px 0 rgba(0, 0, 0, .28); }
[data-theme="classic"] .te-sub { font: 700 1.4rem/1.3 var(--f-display); color: var(--yellow); }
[data-theme="classic"] .te-date { color: rgba(255, 255, 255, .85); }

/* ---------- lịch trình hai bên ---------- */
[data-theme="classic"] .side { border: 3px solid var(--navy); border-radius: 10px; }
[data-theme="classic"] .side.is-mine { border-color: var(--red); box-shadow: 0 0 0 4px var(--yellow); }
[data-theme="classic"] .side-trai .side-head { background: var(--drape); }
[data-theme="classic"] .side-gai .side-head { background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .18)), repeating-linear-gradient(90deg, #c8212b 0 22px, #d93440 34px, #c8212b 48px, #b31b25 60px); }
[data-theme="classic"] .side-label { font-weight: 800; color: var(--yellow); text-shadow: 2px 3px 0 rgba(0, 0, 0, .25); }
[data-theme="classic"] .side-parents, [data-theme="classic"] .side-addr { color: rgba(255, 255, 255, .88); }
[data-theme="classic"] .side-parents b { color: #fff; }
[data-theme="classic"] .side-addr .ic { color: var(--yellow); }
[data-theme="classic"] .side-badge { background: var(--yellow); color: var(--navy); }
[data-theme="classic"] .show-time { font-weight: 800; color: var(--red); }
[data-theme="classic"] .show-date { color: var(--navy); }
[data-theme="classic"] .show-title { font-weight: 800; color: var(--navy); }
[data-theme="classic"] .side-tabs, [data-theme="classic"] .theme-switch { background: var(--beige); border-radius: 8px; }
[data-theme="classic"] .side-tabs button, [data-theme="classic"] .theme-switch button { border-radius: 6px; font-family: var(--f-display); font-weight: 700; }
[data-theme="classic"] .side-tabs button[aria-selected="true"], [data-theme="classic"] .theme-switch button[aria-checked="true"] { background: var(--navy); color: var(--yellow); }

/* ---------- lưu ý, mừng cưới, thanh điều hướng ---------- */
[data-theme="classic"] .note { border: 2px solid var(--navy); border-radius: 10px; box-shadow: 4px 5px 0 rgba(28, 63, 148, .15); }
[data-theme="classic"] .note-ic { background: var(--yellow); color: var(--navy); border-radius: 8px; }
[data-theme="classic"] .note-title { font-weight: 800; color: var(--red); }
[data-theme="classic"] .icon-btn { border-color: var(--navy); color: var(--navy); }
[data-theme="classic"] .topbar { background: rgba(251, 244, 230, .94); }
[data-theme="classic"] .tb-brand { color: var(--red); font-family: var(--f-display); font-weight: 800; }
[data-theme="classic"] .tabbar { border: 2px solid var(--navy); border-radius: 12px; }
[data-theme="classic"] .tabbar a.is-active { background: var(--yellow); color: var(--navy); }
[data-theme="classic"] .progress span { background: linear-gradient(90deg, var(--red), var(--yellow)); }
@media (prefers-reduced-motion: reduce) { [data-theme="classic"] .bk-wheel { animation: none; } }

/* =========================================================================
 *  THANH LỊCH (modern) — thiệp cưới fine-art: nền ngà, chữ có chân mảnh,
 *  đường kẻ mảnh, hồng phấn trầm, nhiều khoảng trắng
 * ========================================================================= */
[data-theme="modern"] {
  --f-display: "Cormorant Garamond", Georgia, serif;
  --paper: #fbf8f5;
  --white: #ffffff;
  --cream: #f6f1eb;
  --blush: #f1e2e2;
  --blush-2: #f8f1ef;
  --pink: #d9b3b9;
  --rose: #a86f7d;
  --wine: #8c5563;
  --beige: #ece3d9;
  --beige-2: #f4eee7;
  --sand: #d8c9b8;
  --ink: #3d3435;
  --muted: #847876;
  --line: rgba(61, 52, 53, .14);
}
[data-theme="modern"] .grain { display: none; }
[data-theme="modern"] body { font-weight: 400; }

/* tiêu đề mảnh, nhãn chữ in hoa nhỏ giãn rộng */
[data-theme="modern"] .h2 { font-weight: 400; font-size: clamp(2.6rem, calc(6.4 * var(--cw)), 5rem); letter-spacing: -.01em; line-height: 1.02; }
[data-theme="modern"] .h2 i { font-weight: 300; font-style: italic; color: var(--rose); }
[data-theme="modern"] .eyebrow { padding: 0; background: none; border-radius: 0; font: 500 .68rem/1.3 var(--f-body); letter-spacing: .36em; color: var(--muted); }
[data-theme="modern"] .eyebrow::before { display: block; width: 44px; background: var(--rose); }
[data-theme="modern"] .lead { font-weight: 400; }
[data-theme="modern"] .btn { border-width: 1px; border-color: var(--ink); color: var(--ink); font: 500 .7rem/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; padding: 1.15em 1.9em; }
[data-theme="modern"] .btn:hover { background: var(--ink); color: var(--paper); }
[data-theme="modern"] .btn-fill { background: var(--ink); border-color: var(--ink); color: var(--paper); }
[data-theme="modern"] .btn-fill:hover { background: var(--wine); border-color: var(--wine); }
[data-theme="modern"] .btn-sm { padding: .95em 1.3em; font-size: .64rem; }

/* màn mở thiệp: chữ lồng trong vòng tròn mảnh */
[data-theme="modern"] .leader { background: var(--paper) !important; }
[data-theme="modern"] .leader-mono {
  display: grid; place-items: center;
  width: clamp(150px, calc(42 * var(--cw)), 190px); aspect-ratio: 1; margin: 0 0 10px;
  border: 1px solid var(--rose); border-radius: 50%;
  box-shadow: 0 0 0 8px var(--paper), 0 0 0 9px var(--line);
  font: italic 300 clamp(3rem, calc(12 * var(--cw)), 4.2rem)/1 var(--f-display); letter-spacing: 0; color: var(--wine);
}
[data-theme="modern"] .leader-guest { font: italic 300 1.35rem/1.4 var(--f-display); }
[data-theme="modern"] .leader-guest b { font: 400 2rem/1.2 var(--f-display); letter-spacing: 0; color: var(--ink); }
[data-theme="modern"] .play-btn { padding: 16px 30px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; box-shadow: none; color: var(--ink); font: 500 .7rem/1 var(--f-body); letter-spacing: .3em; }
[data-theme="modern"] .play-btn:hover { background: var(--ink); color: var(--paper); transform: none; }
[data-theme="modern"] .play-ic { display: none; }

/* mở đầu: nền ngà, tên chữ mảnh cỡ lớn, dòng ngày giữa hai đường kẻ */
[data-theme="modern"] .hero-mask { background: radial-gradient(ellipse 60% 45% at 50% 50%, var(--blush-2) 0%, var(--paper) 70%); }
[data-theme="modern"] .hero-pre { color: var(--muted); font: 500 .66rem/1 var(--f-body); letter-spacing: .5em; }
[data-theme="modern"] .hero-title { font: 300 min(calc(21 * var(--cw)), 22vh)/.95 var(--f-display); letter-spacing: -.02em; text-transform: none; color: var(--ink); }
[data-theme="modern"] .hero-title .amp { font: italic 300 .5em/1 var(--f-display); color: var(--rose); margin: .05em 0; }
[data-theme="modern"] .hero-date {
  display: block; margin: 1.8em 0 0; white-space: nowrap;
  font: 500 .72rem/1 var(--f-body); letter-spacing: .4em; color: var(--muted);
}
[data-theme="modern"] .hero-date::before, [data-theme="modern"] .hero-date::after { content: ""; display: inline-block; vertical-align: middle; width: 44px; height: 1px; margin: 0 18px; background: var(--rose); }
[data-theme="modern"] .hero-mask { align-content: center; }
[data-theme="modern"] .hero-card { background: rgba(251, 248, 245, .94); border: 1px solid rgba(255, 255, 255, .8); border-radius: 2px; text-align: center; }
[data-theme="modern"] .hc-kicker { color: var(--muted); letter-spacing: .36em; font-weight: 500; }
[data-theme="modern"] .hc-names { font: 300 clamp(2.6rem, calc(8 * var(--cw)), 4.2rem)/1 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
[data-theme="modern"] .hc-names i { font-style: italic; color: var(--rose); }
[data-theme="modern"] .hc-date { font-weight: 400; letter-spacing: .08em; }

[data-theme="modern"] .logline-text { font: 300 clamp(1.8rem, calc(4.2 * var(--cw)), 3.2rem)/1.3 var(--f-display); letter-spacing: 0; }
[data-theme="modern"] .logline-sign { font: italic 400 1.5rem/1.3 var(--f-display); color: var(--rose); }
[data-theme="modern"] .logline-photo { border-radius: 999px 999px 0 0; box-shadow: none; }
[data-theme="modern"] .logline-photo::after { border-radius: 999px 999px 0 0; }

/* cô dâu chú rể */
[data-theme="modern"] .role-photo { border-radius: 0; }
[data-theme="modern"] .role-as { font: 500 .66rem/1 var(--f-body); letter-spacing: .36em; color: var(--muted); }
[data-theme="modern"] .role-name { font: 400 clamp(2.2rem, calc(4.6 * var(--cw)), 3.4rem)/1.05 var(--f-display); letter-spacing: 0; }
[data-theme="modern"] .role-family { font-weight: 400; }

/* ngày cưới: số mảnh cỡ lớn, đếm ngược ngăn bằng đường kẻ */
[data-theme="modern"] .premiere { background: var(--blush-2); color: var(--ink); }
[data-theme="modern"] .premiere .eyebrow { background: none; color: var(--muted); }
[data-theme="modern"] .bigdate { font-weight: 300; letter-spacing: -.03em; color: var(--ink); }
[data-theme="modern"] .bd-m { -webkit-text-stroke: 1px var(--ink); }
[data-theme="modern"] .bd-sep { color: var(--rose); }
[data-theme="modern"] .bd-y { color: var(--muted); font-weight: 500; }
[data-theme="modern"] .pm-when { font: italic 400 clamp(1.7rem, calc(4 * var(--cw)), 2.4rem)/1.2 var(--f-display); color: var(--wine); }
[data-theme="modern"] .pm-lunar, [data-theme="modern"] .cd-label { color: var(--muted); }
[data-theme="modern"] .cd-cells { gap: 0; border: 0; background: none; }
[data-theme="modern"] .cd-cells div { border: 0; border-radius: 0; border-right: 1px solid var(--line); background: none; padding: 6px clamp(18px, calc(5 * var(--cw)), 44px); }
[data-theme="modern"] .cd-cells b { font: 300 clamp(2.4rem, calc(7 * var(--cw)), 3.8rem)/1 var(--f-display); color: var(--ink); }
[data-theme="modern"] .cd-cells span { color: var(--muted); font-weight: 500; letter-spacing: .3em; font-size: .6rem; }
[data-theme="modern"] .premiere .sec-bg::after, [data-theme="modern"] .credits .sec-bg::after { background: rgba(248, 241, 239, .9); }

/* lịch trình & lưu ý: thẻ phẳng viền mảnh */
[data-theme="modern"] .side, [data-theme="modern"] .note { border: 1px solid var(--line); border-radius: 2px; box-shadow: none; background: var(--white); }
[data-theme="modern"] .side.is-mine { border-color: var(--rose); box-shadow: inset 0 3px 0 var(--rose); }
[data-theme="modern"] .side-trai .side-head, [data-theme="modern"] .side-gai .side-head { background: none; border-bottom: 1px solid var(--line); }
[data-theme="modern"] .side-label { font: 400 clamp(1.9rem, calc(4.6 * var(--cw)), 2.5rem)/1 var(--f-display); letter-spacing: .12em; color: var(--ink); }
[data-theme="modern"] .side-badge { background: none; color: var(--rose); padding: 0; font-weight: 500; letter-spacing: .1em; }
[data-theme="modern"] .side-parents b { font-weight: 500; }
[data-theme="modern"] .show { border-top-color: var(--line); }
[data-theme="modern"] .show-time { font: 300 2.4rem/1 var(--f-display); letter-spacing: 0; color: var(--ink); }
[data-theme="modern"] .show-date { color: var(--muted); font-weight: 500; }
[data-theme="modern"] .show-title { font: 500 1.55rem/1.15 var(--f-display); letter-spacing: 0; }
[data-theme="modern"] .side-tabs, [data-theme="modern"] .theme-switch { background: none; border: 1px solid var(--line); }
[data-theme="modern"] .side-tabs button[aria-selected="true"], [data-theme="modern"] .theme-switch button[aria-checked="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
[data-theme="modern"] .notes { background: var(--paper); }
[data-theme="modern"] .note-ic { background: none; border: 1px solid var(--line); color: var(--rose); }
[data-theme="modern"] .note-title { font: 500 1.7rem/1.1 var(--f-display); letter-spacing: 0; }
[data-theme="modern"] .note p { font-weight: 400; }
[data-theme="modern"] .icon-btn { border-color: var(--line); color: var(--ink); }

/* album, mừng cưới, lời kết */
[data-theme="modern"] .album { background: var(--white); }
[data-theme="modern"] .g-item { border-radius: 0; }
[data-theme="modern"] .gift { background: var(--blush-2); }
[data-theme="modern"] .bc-number { font: 400 clamp(1.8rem, calc(6 * var(--cw)), 2.4rem)/1 var(--f-display); letter-spacing: .08em; }
[data-theme="modern"] .credits { background: var(--paper); }
[data-theme="modern"] .cr-role { color: var(--muted); letter-spacing: .36em; font-weight: 500; }
[data-theme="modern"] .cr-names { font: 400 clamp(1.6rem, calc(3.8 * var(--cw)), 2.2rem)/1.35 var(--f-display); }
[data-theme="modern"] .cr-guest .cr-names { font-style: italic; color: var(--wine); }
[data-theme="modern"] .te-title { font: italic 300 clamp(4.5rem, calc(16 * var(--cw)), 10rem)/1 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
[data-theme="modern"] .te-sub { font: italic 400 1.5rem/1.4 var(--f-display); color: var(--rose); }

/* thanh trên, thanh dưới, nút nhạc */
[data-theme="modern"] .topbar { background: rgba(251, 248, 245, .9); }
[data-theme="modern"] .tb-brand { font: italic 400 1.5rem/1 var(--f-display); letter-spacing: 0; color: var(--ink); }
[data-theme="modern"] .tabbar { border-radius: 2px; box-shadow: 0 14px 40px -24px rgba(61, 52, 53, .45); }
[data-theme="modern"] .tabbar a { border-radius: 0; font-weight: 400; }
[data-theme="modern"] .tabbar a.is-active { background: none; color: var(--wine); box-shadow: inset 0 -2px 0 var(--rose); }
[data-theme="modern"] .tape-btn { border-color: var(--line); color: var(--ink); box-shadow: none; }
[data-theme="modern"] .tape-btn.is-playing { background: var(--ink); border-color: var(--ink); color: var(--paper); }
[data-theme="modern"] .progress span { background: var(--rose); }

/* cổ điển: cuộn băng màu kem–vàng, đặt ở góc phải để không che xe đạp */
[data-theme="classic"] .cassette { background: linear-gradient(160deg, #fff4d8 0%, #f0d687 100%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 22px 40px -22px rgba(0, 0, 0, .45); }
[data-theme="classic"] .cs-label { background: repeating-linear-gradient(180deg, #fffdf6 0 calc(var(--w) * .075), #fde9a8 calc(var(--w) * .075) calc(var(--w) * .079)); border-top: calc(var(--w) * .02) solid var(--red); }
[data-theme="classic"] .cs-side, [data-theme="classic"] .cs-title { color: var(--red); font-family: var(--f-display); font-style: normal; font-weight: 800; }
[data-theme="classic"] .cs-reel { background: repeating-conic-gradient(#fffdf6 0 18deg, #ffd23f 18deg 60deg); }
[data-theme="classic"] .tape-btn { left: auto; right: max(14px, env(safe-area-inset-right)); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 58px); transform: rotate(4deg); }
 [data-theme="classic"] .tape-btn { right: 10px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 84px); } 


/* không xuống dòng giữa các ký tự của một từ (chữ cắt dán) */
.cw { white-space: nowrap; }
/* Thanh lịch: dùng số thẳng hàng (Cormorant mặc định là số kiểu cổ, "10" trông như "IO") */
[data-theme="modern"] .bigdate, [data-theme="modern"] .show-time, [data-theme="modern"] .cd-cells b,
[data-theme="modern"] .bc-number, [data-theme="modern"] .pm-when, [data-theme="modern"] .cr-names,
[data-theme="modern"] .hc-date, [data-theme="modern"] .show-date { font-feature-settings: "lnum" 1; font-variant-numeric: lining-nums; }

/* =========================================================================
 *  GEN Z — điểm nhấn riêng: màn hình khoá, sticker, now playing, bento
 * ========================================================================= */
.lockscreen, .stk, .np { display: none; }
[data-theme="modern"] .eyebrow::before { content: "✦"; width: auto; height: auto; background: none; color: var(--rose); font-size: .95rem; letter-spacing: 0; }

/* ---------- màn hình khoá ---------- */
[data-theme="modern"] .leader {
  background:
    radial-gradient(circle at 18% 22%, #f6d3db 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, #e9c6cf 0%, transparent 50%),
    linear-gradient(165deg, #fbeff1 0%, #efd9de 100%) !important;
}
[data-theme="modern"] .leader::before {
  content: ""; position: absolute; inset: -40px;
  background: var(--wall, none) center / cover;
  filter: blur(18px) saturate(1.05); opacity: .55;
}
[data-theme="modern"] .leader::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(61, 52, 53, .1), rgba(61, 52, 53, .28)); }
[data-theme="modern"] .leader-start { z-index: 1; width: min(calc(92 * var(--cw)), 420px); min-height: min(100svh, 860px); align-content: space-between; padding: max(9vh, 60px) 0 26px; }
[data-theme="modern"] .leader-mono, [data-theme="modern"] .leader-guest,
[data-theme="modern"] .play-btn, [data-theme="modern"] .leader-hint { display: none; }
[data-theme="modern"] .lockscreen { display: grid; justify-items: center; gap: 4px; width: 100%; color: #fff; text-shadow: 0 2px 20px rgba(61, 52, 53, .25); }
.ls-date { margin: 0; font: 600 1.05rem/1.3 var(--f-body); letter-spacing: .01em; }
.ls-time { margin: 0 0 clamp(40px, 12vh, 110px); font: 700 clamp(5.5rem, calc(26 * var(--cw)), 7.5rem)/1 var(--f-body); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.ls-note {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 14px 16px; border: 0; border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 16px 40px -20px rgba(61, 52, 53, .55);
  color: var(--ink); text-align: left; text-shadow: none; cursor: pointer;
  animation: notif 1s var(--ease) .5s both, nudge 2.8s ease-in-out 2s infinite;
}
.ls-note:hover { background: rgba(255, 255, 255, .9); }
@keyframes notif { from { opacity: 0; transform: translateY(-18px) scale(.96); } }
@keyframes nudge { 0%, 100% { transform: none; } 8% { transform: translateY(-3px); } 16% { transform: none; } }
.ls-app { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg, #f3a6b8, var(--wine)); color: #fff; }
.ls-app svg { width: 20px; height: 20px; }
.ls-body { display: grid; gap: 1px; min-width: 0; flex: 1; }
.ls-head { display: flex; justify-content: space-between; font: 500 .72rem/1.3 var(--f-body); color: var(--muted); letter-spacing: .02em; }
.ls-head b { font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.ls-title { font: 700 .98rem/1.3 var(--f-body); }
.ls-text { font: 400 .92rem/1.4 var(--f-body); }
.ls-hint { margin: 14px 0 0; font: 500 .8rem/1 var(--f-body); opacity: .9; }
.ls-hint::after { content: ""; display: block; width: 134px; height: 5px; margin: 22px auto 0; border-radius: 3px; background: rgba(255, 255, 255, .85); }
[data-theme="modern"] .leader.is-opening .ls-note { animation: none; transform: scale(1.04); background: #fff; transition: transform .4s var(--ease); }
[data-theme="modern"] .leader-theme { margin-top: 18px; }
[data-theme="modern"] .leader-theme > span { color: #fff; }
[data-theme="modern"] .leader .theme-switch { background: rgba(255, 255, 255, .25); border-color: rgba(255, 255, 255, .5); }
[data-theme="modern"] .leader .theme-switch button { color: #fff; }
[data-theme="modern"] .leader .theme-switch button[aria-checked="true"] { background: #fff; color: var(--ink); }

/* ---------- sticker quanh tên ---------- */
[data-theme="modern"] .stk {
  display: inline-block; position: absolute; z-index: 2;
  padding: .55em 1.1em; border-radius: 999px;
  font: 600 clamp(.72rem, calc(1.6 * var(--cw)), .95rem)/1 var(--f-body); letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 10px 24px -12px rgba(61, 52, 53, .45);
  animation: bob 5s ease-in-out infinite;
}
[data-theme="modern"] .stk-a { left: 12%; top: 28%; background: var(--wine); color: #fff; transform: rotate(-9deg); }
[data-theme="modern"] .stk-b {
  right: 13%; top: 30%; width: 5.4em; aspect-ratio: 1; padding: 0; display: grid; place-items: center;
  border-radius: 50%; background: #fff; color: var(--ink); border: 1px dashed var(--rose);
  font: 400 clamp(1rem, calc(2.4 * var(--cw)), 1.35rem)/1 var(--f-display); font-feature-settings: "lnum" 1; transform: rotate(12deg); animation-delay: -1.5s;
}
[data-theme="modern"] .stk-c { right: 16%; bottom: 25%; background: var(--blush); color: var(--wine); transform: rotate(6deg); animation-delay: -3s; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
  [data-theme="modern"] .stk-a { left: 6%; top: 22%; }
  [data-theme="modern"] .stk-b { right: 6%; top: 18%; }
  [data-theme="modern"] .stk-c { right: 8%; bottom: 21%; }


/* ---------- now playing (thay cho nút nhạc tròn) ---------- */
[data-theme="modern"] .tape-btn {
  left: 50%; right: auto; bottom: max(16px, env(safe-area-inset-bottom));
  width: auto; height: auto; padding: 6px 16px 6px 6px;
  border: 0; border-radius: 999px;
  background: #1d1a1b; color: #fff;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .55);
  transform: translateX(-50%);
}
[data-theme="modern"] .tape-btn:hover { transform: translateX(-50%) scale(1.03); }
[data-theme="modern"] .tape-btn.is-playing { background: #1d1a1b; color: #fff; }
[data-theme="modern"] .tape-ic { display: none !important; }
[data-theme="modern"] .np { display: flex; align-items: center; gap: 10px; }
.np-art { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(from 20deg, #f3a6b8, #f6e1c9, #d9b3b9, #f3a6b8); color: #fff; }
.np-art svg { width: 16px; height: 16px; }
.tape-btn.is-playing .np-art { animation: spin 6s linear infinite; }
.np-txt { display: grid; text-align: left; line-height: 1.2; max-width: calc(46 * var(--cw)); }
.np-txt small { font: 500 .62rem/1.3 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #bfb3b5; }
.np-txt b { font: 600 .82rem/1.3 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; margin-left: 4px; }
.np-eq i { width: 3px; height: 30%; border-radius: 2px; background: #f3a6b8; }
.tape-btn.is-playing .np-eq i { animation: eq .9s ease-in-out infinite; }
.tape-btn.is-playing .np-eq i:nth-child(2) { animation-delay: -.3s; }
.tape-btn.is-playing .np-eq i:nth-child(3) { animation-delay: -.6s; }
.tape-btn.is-playing .np-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
 [data-theme="modern"] .tape-btn { left: 50%; right: auto; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 80px); } 


/* ---------- ngày cưới dạng lưới widget (bento) ---------- */
[data-theme="modern"] .premiere {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "head head" "date date" "when lunar" "cd cd" "done done";
  max-width: none; padding-left: var(--gutter); padding-right: var(--gutter);
  text-align: left;
}

[data-theme="modern"] .premiere > .head { grid-area: head; margin: 0 0 10px; padding: 0; text-align: left; }
[data-theme="modern"] .premiere > .bigdate { grid-area: date; }
[data-theme="modern"] .premiere > .pm-when { grid-area: when; }
[data-theme="modern"] .premiere > .pm-lunar { grid-area: lunar; }
[data-theme="modern"] .premiere > .countdown { grid-area: cd; }
[data-theme="modern"] .premiere > .cd-done { grid-area: done; }
[data-theme="modern"] .premiere > .bigdate, [data-theme="modern"] .premiere > .pm-when,
[data-theme="modern"] .premiere > .pm-lunar, [data-theme="modern"] .premiere > .countdown {
  margin: 0; padding: clamp(20px, calc(3 * var(--cw)), 32px);
  border-radius: 28px; background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -34px rgba(61, 52, 53, .45);
}
[data-theme="modern"] .premiere > .bigdate { justify-content: flex-start; align-items: center; font-size: clamp(5rem, calc(16 * var(--cw)), 12rem); }
[data-theme="modern"] .premiere > .pm-when { display: flex; flex-direction: column; justify-content: flex-end; font-size: clamp(1.4rem, calc(3 * var(--cw)), 2rem); }
[data-theme="modern"] .premiere > .pm-when::before { content: "Giờ làm lễ"; margin-bottom: auto; padding-bottom: 12px; font: 500 .66rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); font-style: normal; }
[data-theme="modern"] .premiere > .pm-lunar { display: flex; flex-direction: column; justify-content: flex-end; font: italic 400 1.2rem/1.3 var(--f-display); color: var(--ink); }
[data-theme="modern"] .premiere > .pm-lunar::before { content: "Âm lịch"; margin-bottom: auto; padding-bottom: 12px; font: 500 .66rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); font-style: normal; }
[data-theme="modern"] .premiere > .countdown { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
[data-theme="modern"] .premiere .cd-label { margin: 0; }
[data-theme="modern"] .premiere .cd-cells div:last-child { border-right: 0; }
[data-theme="modern"] .g-item { border-radius: 18px; }

/* =========================================================================
 *  HÌNH MINH HOẠ THAY ẢNH NỀN (khi chưa có nen-1/2/3)
 * ========================================================================= */
.is-illus::after { display: none !important; }
.il { position: absolute; inset: 0; overflow: hidden; }
[data-theme="classic"] .il-z, [data-theme="modern"] .il-y { display: none; }
.il svg { position: absolute; }

/* ---------- Gen Y: phông xanh, lá cọ, Song Hỷ, bồ câu, xe đạp ---------- */
.il-hy { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 700 min(calc(70 * var(--cw)), 60vh)/1 "Noto Serif SC", "Songti SC", "SimSun", serif; color: rgba(255, 210, 63, .1); pointer-events: none; }
.il-palm { width: 46%; aspect-ratio: 210 / 190; top: -4%; }
.il-palm-l { left: -8%; transform: rotate(-6deg); }
.il-palm-r { right: -8%; transform: scaleX(-1) rotate(-6deg); }
.il1-y { background: var(--drape); display: grid; place-items: center; align-content: center; }
.il1-y .il-hy { font-size: 150px; color: rgba(255, 210, 63, .16); top: 44%; }
.il1-y .il-doves { position: relative; width: 78%; aspect-ratio: 400 / 230; margin-top: 18%; }
.il-cap { position: relative; margin: 6px 0 0; text-align: center; font: 800 1.9rem/1.05 var(--f-display); color: var(--yellow); text-shadow: 2px 3px 0 rgba(0, 0, 0, .28); }
.il1-y .il-palm { width: 70%; top: auto; bottom: -10%; }
.il1-y .il-palm-l { left: -26%; transform: rotate(-70deg); }
.il1-y .il-palm-r { right: -26%; transform: scaleX(-1) rotate(-70deg); }
.il2-y .il-palm, .il3-y .il-palm { width: min(calc(30 * var(--cw)), 300px); opacity: .9; }
.il2-y .il-hy { font-size: min(calc(52 * var(--cw)), 44vh); }
.il-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(180deg, #3f8f4f, #2c6e3b); box-shadow: 0 -8px 0 rgba(255, 255, 255, .08); }
.il3-y .il-bike { width: min(calc(34 * var(--cw)), 240px); aspect-ratio: 200 / 112; left: 8%; bottom: 44px; animation: ride 16s linear infinite; }
@keyframes ride { from { left: -30%; } to { left: 110%; } }

/* ---------- Gen Z: mảng màu mềm, hoa vẽ nét mảnh ---------- */
.il-z { color: var(--rose); }
.il-blob { position: absolute; border-radius: 50%; filter: blur(36px); opacity: .75; }
.il-bloom { width: 90px; aspect-ratio: 120 / 260; opacity: .8; }
.il1-z { background: linear-gradient(170deg, #f8e4e7 0%, #efdccf 100%); }
.il1-z .b1 { width: 70%; aspect-ratio: 1; left: -10%; top: 10%; background: #f3c3cd; }
.il1-z .b2 { width: 60%; aspect-ratio: 1; right: -12%; bottom: 0; background: #e9d2bb; }
.il1-z .bl1 { width: 42%; left: 14%; bottom: -4%; }
.il1-z .bl2 { width: 30%; right: 12%; bottom: -8%; transform: rotate(12deg); }
.il-tag { position: absolute; left: 50%; top: 24%; transform: translateX(-50%) rotate(-6deg); padding: .5em 1.1em; border-radius: 999px; background: #fff; font: 600 .82rem/1 var(--f-body); color: var(--wine); box-shadow: 0 10px 24px -12px rgba(61, 52, 53, .45); white-space: nowrap; }
.il2-z .b1 { width: calc(40 * var(--cw)); aspect-ratio: 1; left: calc(-8 * var(--cw)); top: -10%; background: #f5cdd6; }
.il2-z .b2 { width: calc(34 * var(--cw)); aspect-ratio: 1; right: calc(-6 * var(--cw)); bottom: -12%; background: #eddcc7; }
.il2-z .b3 { width: calc(22 * var(--cw)); aspect-ratio: 1; right: 22%; top: 8%; background: #fbe6ea; }
.il2-z .bl1 { width: min(calc(16 * var(--cw)), 150px); left: 2%; bottom: -3%; }
.il2-z .bl2 { width: min(calc(12 * var(--cw)), 110px); right: 3%; bottom: -5%; transform: rotate(10deg); }
.il3-z .b1 { width: calc(44 * var(--cw)); aspect-ratio: 1; left: 28%; top: 20%; background: #f7d6dd; opacity: .5; }
.il3-z .b2 { width: calc(30 * var(--cw)); aspect-ratio: 1; right: calc(-8 * var(--cw)); top: -10%; background: #efdfcd; }
.il3-z .bl1 { width: min(calc(15 * var(--cw)), 140px); left: 3%; bottom: -3%; }
.il3-z .bl2 { width: min(calc(10 * var(--cw)), 96px); left: 12%; bottom: -7%; transform: rotate(-12deg); opacity: .6; }
.il3-z .bl3 { width: min(calc(14 * var(--cw)), 130px); right: 4%; bottom: -4%; transform: rotate(8deg); }
@media (prefers-reduced-motion: reduce) { .il3-y .il-bike { animation: none; } }
.il2-y .il-hy { color: rgba(255, 210, 63, .06); }

/* sửa thanh phát nhạc trên điện thoại: ảnh bìa không bị bóp méo, chữ không xuống dòng */
.np-art, .np-eq { flex: none; }
.np-txt { min-width: 0; max-width: min(calc(46 * var(--cw)), 220px); }
.np-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================================
 *  NÚT NHẠC GỌN HƠN
 *  - máy tính: Gen Z đặt ở góc trái dưới (không che nút ở giữa)
 *  - điện thoại: khi đã cuộn qua phần mở đầu, thu thành nút tròn nhỏ bên phải
 * ========================================================================= */

  .tape-btn.is-compact {
    left: auto !important; right: 12px !important; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 80px) !important;
    width: 46px; height: 46px; padding: 0 !important; display: grid; place-items: center;
    border-radius: 50% !important; transform: none !important;
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45);
  }
  .tape-btn.is-compact .cassette, .tape-btn.is-compact .np-txt, .tape-btn.is-compact .np-eq { display: none !important; }
  [data-theme="classic"] .tape-btn.is-compact { background: var(--red); color: var(--yellow); border: 2px solid var(--yellow); }
  [data-theme="classic"] .tape-btn.is-compact .tape-ic { display: block; }
  [data-theme="classic"] .tape-btn.is-compact.is-playing .tape-ic { animation: spin 3s linear infinite; }
  [data-theme="modern"] .tape-btn.is-compact { background: #1d1a1b; }
  [data-theme="modern"] .tape-btn.is-compact .np { gap: 0; }


/* Gen Y — lời kết: chừa chỗ cho dải cỏ & xe đạp dưới chân, không đè lên chữ */
[data-theme="classic"] .credits.has-bg { padding-bottom: clamp(170px, calc(22 * var(--cw)), 230px); }

/* Gen Z — bento ngày cưới: căn giữa cho cân đối */
[data-theme="modern"] .premiere > .bigdate { justify-content: center; }
[data-theme="modern"] .premiere > .countdown { flex-direction: column; align-items: stretch; gap: 14px; text-align: center; }
[data-theme="modern"] .premiere .cd-cells { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
[data-theme="modern"] .premiere .cd-cells div { padding: 4px 0; }
[data-theme="modern"] .premiere > .pm-lunar, [data-theme="modern"] .premiere > .pm-when { text-wrap: balance; }

/* ---------- tinh chỉnh chung ---------- */
/* lưu ý cho khách: 4 thẻ một hàng trên máy tính */
.note-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
/* số đếm ngược nhích lên nhẹ mỗi khi đổi */
.tick { animation: tick .45s var(--ease); }
@keyframes tick { from { opacity: .2; transform: translateY(-.25em); } }
/* đổi phong cách: mờ dần */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }
/* Gen Z: nút Nhà trai | Nhà gái dính trên đầu cần nền đặc */
[data-theme="modern"] .side-tabs { background: rgba(251, 248, 245, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
/* Gen Z: dòng nhỏ trên thẻ tên không rớt chữ trên điện thoại */
 [data-theme="modern"] .hc-kicker { letter-spacing: .16em; font-size: .6rem; } 

@media (prefers-reduced-motion: reduce) { .tick { animation: none; } }
.note-title { text-wrap: balance; }
.note .btn { white-space: nowrap; }

/* logo H & T = nút quay về màn mở thiệp */
.tb-brand { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; border: 0; background: none; cursor: pointer; color: inherit; }
.tb-env { width: 18px; height: 18px; opacity: .75; transition: transform .3s var(--ease), opacity .3s; }
.tb-brand:hover .tb-env { transform: translateY(-2px) rotate(-8deg); opacity: 1; }
.leader-guest, .leader-hint { text-wrap: balance; }

/* =========================================================================
 *  HIỆU ỨNG MỞ / ĐÓNG THIỆP
 * ========================================================================= */
.doors { display: none; }
.leader-start { transition: opacity .5s ease, transform .6s var(--ease), visibility .5s; }
/* đang mở: nội dung mờ đi; đang đóng: nội dung chỉ hiện lại sau khi hiệu ứng đóng xong */
.leader.is-opening .leader-start { opacity: 0; transform: scale(.96); transition-delay: .35s; }
.leader.is-closing:not(.is-opening) .leader-start { transition-delay: .15s; }

/* ---------- Gen Y: tấm thiệp đỏ gấp đôi, hai cánh mở ra 3D ---------- */
[data-theme="classic"] .leader { background: transparent !important; perspective: 2200px; }
[data-theme="classic"] .leader::before, [data-theme="classic"] .leader::after { display: none; }
[data-theme="classic"] .doors { display: block; position: absolute; inset: 0; transform-style: preserve-3d; }
.door {
  position: absolute; top: 0; bottom: 0; width: 50.1%; overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 45%, #c8202c 0%, #a3121d 70%, #8a0f18 100%);
  background-size: 200% 100%;
  backface-visibility: hidden;
  transition: transform 1.2s cubic-bezier(.65, 0, .25, 1), filter 1.2s;
}
.door-l { left: 0; background-position: left center; transform-origin: left center; box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25); }
.door-r { right: 0; background-position: right center; transform-origin: right center; box-shadow: inset 1px 0 0 rgba(255, 210, 63, .15); }
.door-hy { position: absolute; top: 50%; font: 700 min(calc(92 * var(--cw)), 78vh)/1 "Noto Serif SC", "Songti SC", "SimSun", serif; color: rgba(255, 210, 63, .1); transform: translate(-50%, -50%); pointer-events: none; }
.door-l .door-hy { left: 100%; }
.door-r .door-hy { left: 0; }
/* khung viền vàng chia đôi theo hai cánh */
.door::after { content: ""; position: absolute; top: clamp(12px, calc(3 * var(--cw)), 28px); bottom: clamp(12px, calc(3 * var(--cw)), 28px); border: 4px double rgba(255, 210, 63, .75); pointer-events: none; }
.door-l::after { left: clamp(12px, calc(3 * var(--cw)), 28px); right: 0; border-right: 0; border-radius: 6px 0 0 6px; }
.door-r::after { right: clamp(12px, calc(3 * var(--cw)), 28px); left: 0; border-left: 0; border-radius: 0 6px 6px 0; }
[data-theme="classic"] .leader.is-gone { opacity: 1; visibility: visible; pointer-events: none; transition: none; }
[data-theme="classic"] .leader.is-gone .door-l { transform: rotateY(100deg); filter: brightness(.7); }
[data-theme="classic"] .leader.is-gone .door-r { transform: rotateY(-100deg); filter: brightness(.7); }

/* ---------- Gen Z: màn hình khoá trượt lên (mở khoá) / trượt xuống (khoá) ---------- */
[data-theme="modern"] .leader { transition: transform 1.1s cubic-bezier(.7, 0, .2, 1), border-radius 1.1s; }
[data-theme="modern"] .leader.is-gone { opacity: 1; visibility: visible; pointer-events: none; transform: translateY(-104%); border-radius: 0 0 40px 40px; }
[data-theme="modern"] .leader.is-opening .leader-start { opacity: 1; transform: none; transition-delay: 0s; }
[data-theme="modern"] .leader.is-opening .ls-note { transform: scale(1.05); background: #fff; animation: none; transition: transform .4s var(--ease); }
[data-theme="modern"] .leader.is-opening .ls-hint { opacity: 0; transition: opacity .3s; }

@media (prefers-reduced-motion: reduce) {
  .door, [data-theme="modern"] .leader { transition: none !important; }
}

/* nút sang trang tạo link (chỉ cô dâu chú rể thấy) */
.admin-link { margin-top: 6px; padding: 6px 14px; border: 1px dashed currentColor; border-radius: 999px; font: 600 .74rem/1.2 var(--f-body); text-decoration: none; color: var(--muted); opacity: .85; }
.admin-link:hover { opacity: 1; }
[data-theme="classic"] .admin-link { color: #fbe7c0; }
[data-theme="modern"] .admin-link { color: #fff; }

/* ---------- tối ưu điện thoại ---------- */
  .grain { animation: none; }                 /* hạt phim đứng yên: đỡ vẽ lại toàn màn hình khi cuộn */


/* ngày âm lịch của từng sự kiện */
.show-lunar { margin: -2px 0 8px; font-size: .88rem; font-style: italic; color: var(--muted); }
[data-theme="modern"] .show-lunar { font-family: var(--f-display); font-size: 1rem; }

/* =========================================================================
 *  TOÀN MÀN HÌNH TRÊN ĐIỆN THOẠI — chừa chỗ cho tai thỏ / thanh trạng thái
 * ========================================================================= */
body { touch-action: manipulation; } /* chạm 2 lần không phóng to trang */
.topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
.lb-close { top: calc(16px + env(safe-area-inset-top)); }

/* =========================================================================
 *  HIỆU ỨNG DÙNG CHUNG: pháo giấy, emoji, tim, lấp lánh
 * ========================================================================= */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 260; pointer-events: none; }
.fx-emoji {
  position: fixed; z-index: 400; pointer-events: none;
  margin: -14px 0 0 -14px; font-size: 28px; line-height: 1;
  animation: emo 1.6s cubic-bezier(.15, .7, .3, 1) both;
}
@keyframes emo {
  0% { transform: translate(0, 0) scale(.3); opacity: 0; }
  12% { transform: translate(calc(var(--dx) * .15), calc(var(--dy) * .15)) scale(var(--s)); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(var(--s)); opacity: 0; }
}
.fx-like {
  position: fixed; z-index: 400; pointer-events: none;
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  color: #ff3d71; filter: drop-shadow(0 10px 20px rgba(255, 61, 113, .45));
  animation: like .95s var(--ease) forwards;
}
.fx-like svg { width: 100%; height: 100%; }
@keyframes like {
  0% { transform: scale(0) rotate(-14deg); opacity: 0; }
  15% { transform: scale(1.25) rotate(-8deg); opacity: 1; }
  30% { transform: scale(.92) rotate(-8deg); }
  45% { transform: scale(1.06) rotate(-8deg); }
  75% { transform: scale(1) rotate(-8deg); opacity: 1; }
  100% { transform: translateY(-70px) scale(.5) rotate(-8deg); opacity: 0; }
}
.fx-spark {
  position: fixed; z-index: 400; pointer-events: none;
  margin: -8px 0 0 -6px; font-size: 14px; line-height: 1;
  color: #e47ea0; text-shadow: 0 0 6px rgba(255, 160, 190, .9);
  animation: spark .8s ease-out forwards;
}
@keyframes spark { to { transform: translate(var(--dx), 28px) scale(.3) rotate(120deg); opacity: 0; } }

/* =========================================================================
 *  GEN Y — dây đèn nháy rạp cưới, đếm ngược kiểu lịch lật
 * ========================================================================= */
.lights { display: none; }
[data-theme="classic"] .lights {
  display: block; position: absolute; left: -1%; right: -1%; z-index: 1; height: 32px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 32' preserveAspectRatio='none'%3E%3Cpath d='M0 1Q50 61 100 1' fill='none' stroke='%231d1d1d' stroke-width='1.6' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 32px no-repeat;
}
[data-theme="classic"] .hero-mask .lights { top: max(8vh, 64px); }
[data-theme="classic"] .credits .lights { top: 16px; }
.credits { position: relative; }
.lights i {
  position: absolute; left: calc(var(--t) * 100%); top: calc(var(--y) - 1px);
  width: 10px; height: 14px; margin-left: -5px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c);
  box-shadow: 0 0 10px 3px var(--c);
  animation: twinkle 1.2s steps(1) infinite var(--d);
}
.lights i::before { content: ""; position: absolute; left: 2px; right: 2px; top: -4px; height: 5px; border-radius: 1px; background: #2a2a2a; }
@keyframes twinkle { 50% { opacity: .3; box-shadow: none; } }

/* đếm ngược: số lật xuống như tờ lịch / đồng hồ lật */
[data-theme="classic"] .cd-cells b { position: relative; }
[data-theme="classic"] .cd-cells b::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 2px; background: rgba(28, 63, 148, .2); }
[data-theme="classic"] .cd-cells b.tick { animation: flip .55s cubic-bezier(.3, 1.4, .5, 1); transform-origin: 50% 50%; }
@keyframes flip { from { transform: perspective(240px) rotateX(-95deg); opacity: .35; } }

/* =========================================================================
 *  GEN Z — chữ hologram, dải chữ chạy, tin nhắn, thẻ holo
 * ========================================================================= */
/* chữ nhấn đổi màu hologram */
[data-theme="modern"] .hero-title .amp, [data-theme="modern"] .h2 i, [data-theme="modern"] .te-title, [data-theme="modern"] .hc-names i {
  background: linear-gradient(100deg, #e8668f 0%, #a985e6 30%, #f0a35e 60%, #e8668f 100%) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: holo-text 8s linear infinite;
}
@keyframes holo-text { to { background-position: 300% 0; } }

/* hai dải chữ chạy bắt chéo nhau */
.ticker { display: none; }
[data-theme="modern"] .ticker { display: grid; position: relative; z-index: 2; padding: clamp(34px, calc(4.5 * var(--cw)), 80px) 0; overflow: hidden; background: var(--paper); }
[data-theme="modern"] .tk-band {
  grid-area: 1 / 1; margin: 0 calc(-6 * var(--cw)); padding: 14px 0; overflow: hidden;
  background: #1d1a1b; color: #fbe1e7;
  transform: rotate(-3deg);
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .55);
}
[data-theme="modern"] .tk-rev { background: linear-gradient(90deg, #f6b3c4, #dcc6f5, #f8dcc0); color: #1d1a1b; transform: rotate(2.5deg); }
[data-theme="modern"] .ticker-alt { background: var(--white); }
[data-theme="modern"] .ticker-alt .tk-band { background: var(--wine); color: #fff; transform: rotate(-2deg); }
.tk-track {
  display: flex; align-items: center; gap: 22px; width: max-content; padding-right: 22px;
  font: 700 clamp(1rem, calc(2.6 * var(--cw)), 1.5rem)/1 var(--f-body); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
  animation: marquee 28s linear infinite;
}
.tk-track b { font-weight: 400; color: #f3a6b8; }
.tk-rev .tk-track b { color: var(--wine); }
.ticker-alt .tk-track b { color: #ffd6e0; }
.tk-rev .tk-track { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* lời ngỏ = tin nhắn: đang nhập… rồi bong bóng chat bật lên */
.chat-head, .chat-typing { display: none; }
[data-theme="modern"] .chat-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.ch-ava {
  position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(from 30deg, #f6b3c4, #dcc6f5, #f8dcc0, #f6b3c4);
  font: italic 500 1rem/1 var(--f-display); color: var(--ink);
}
.ch-ava::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #31d158; box-shadow: 0 0 0 2.5px var(--paper); }
.ch-who { display: grid; line-height: 1.3; }
.ch-who b { font: 600 1rem/1.3 var(--f-body); color: var(--ink); }
.ch-who small { font-size: .78rem; color: var(--muted); }
/* "đang nhập" nằm đè lên chỗ bong bóng (không đẩy trang) */
[data-theme="modern"] .chat-typing {
  position: relative; z-index: 1; display: flex; gap: 5px; width: max-content; height: 46px; margin-bottom: -46px;
  padding: 0 18px; align-items: center;
  border-radius: 22px 22px 22px 6px; background: #efe4e7;
  transition: opacity .3s, transform .3s;
}
.chat-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: typing 1.2s ease-in-out infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
[data-theme="modern"] .is-sent .chat-typing { opacity: 0; transform: scale(.8); }
[data-theme="modern"] .logline-text {
  max-width: 640px; padding: clamp(18px, calc(3 * var(--cw)), 26px) clamp(20px, calc(3.4 * var(--cw)), 30px);
  border-radius: 28px 28px 28px 8px;
  background: linear-gradient(135deg, #ee7f9f 0%, #c672a8 100%); color: #fff;
  font: 400 clamp(1.08rem, calc(2.2 * var(--cw)), 1.35rem)/1.6 var(--f-body);
  box-shadow: 0 20px 40px -24px rgba(198, 114, 168, .8);
  transform-origin: 0 100%;
  transition: opacity .35s ease, transform .55s cubic-bezier(.3, 1.5, .5, 1);
}
[data-theme="modern"] .logline-sign { margin: 10px 0 0 8px; font: 500 .8rem/1.3 var(--f-body); color: var(--muted); transition: opacity .4s .5s; }
[data-theme="modern"] .logline-sign::after { content: " · đã gửi ✓✓"; color: var(--rose); }
[data-theme="modern"] .logline:not(.is-sent) .logline-text { opacity: 0; transform: translateY(12px) scale(.85); }
[data-theme="modern"] .logline:not(.is-sent) .logline-sign { opacity: 0; transition-delay: 0s; }

/* Gen Z: lá thư trong phong bì có ánh hologram chạy nhẹ */
[data-theme="modern"] .env-letter::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 22%, rgba(255, 160, 195, .35) 36%, rgba(180, 215, 255, .35) 46%, rgba(215, 195, 255, .35) 55%, rgba(255, 220, 180, .3) 64%, transparent 78%) 0 0 / 250% 100%;
  animation: holo 5s ease-in-out infinite alternate;
}
@keyframes holo { from { background-position: 0% 0; } to { background-position: 100% 0; } }

@media (prefers-reduced-motion: reduce) {
  .lights i, .tk-track, .chat-typing i, [data-theme="modern"] .env-letter::before { animation: none !important; }
  [data-theme="modern"] .hero-title .amp, [data-theme="modern"] .h2 i, [data-theme="modern"] .te-title, [data-theme="modern"] .hc-names i { animation: none; }
  [data-theme="classic"] .cd-cells b.tick { animation: none; }
}

/* chỉ hiện ở một phong cách */
[data-theme="modern"] .only-y, [data-theme="classic"] .only-z { display: none !important; }

/* =========================================================================
 *  CÀO SỐ TÀI KHOẢN — dải cào phủ lên dòng số trên thẻ mừng cưới
 *  Gen Y: dải bạc như vé số cào · Gen Z: dải hologram
 * ========================================================================= */
.bc-scratch { position: relative; z-index: 1; margin: 0 -10px; padding: 8px 10px; }
.sc-cover { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border-radius: 8px; touch-action: none; cursor: grab; transition: opacity .7s ease; }
.sc-cover:active { cursor: grabbing; }
.bc-scratch.is-revealed .sc-cover { opacity: 0; pointer-events: none; }
.bc-scratch.is-revealed .bc-number { animation: prize .7s cubic-bezier(.3, 1.5, .5, 1); transform-origin: left center; }
@keyframes prize { from { transform: scale(.85); opacity: .3; } }
.sc-hint { margin: -6px 0 0; font-size: .82rem; color: var(--muted); }
.gift-item.is-revealed .sc-hint { display: none; }
[data-theme="classic"] .sc-hint { color: var(--navy); font-weight: 600; }
[data-theme="modern"] .sc-cover { border-radius: 12px; }

/* =========================================================================
 *  PHOTOBOOTH
 * ========================================================================= */
.booth { padding: clamp(100px, calc(14 * var(--cw)), 170px) 0; background: var(--paper); }
.pb { max-width: calc(460px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 14px; justify-items: center; }
.pb-stage { position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: var(--beige); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45); }
.pb-canvas, .pb-result { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pb-video { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.pb-count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font: 800 9rem/1 var(--f-display); color: #fff; text-shadow: 0 6px 30px rgba(0, 0, 0, .45); }
.pb-count.pop { animation: count .8s var(--ease); }
@keyframes count { from { transform: scale(1.8); opacity: 0; } 40% { opacity: 1; } }
.pb-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.pb-flash.go { animation: flash .7s ease-out; }
@keyframes flash { from { opacity: 1; } }
.pb-msg { margin: 0; min-height: 1.4em; text-align: center; font-size: .9rem; color: var(--muted); text-wrap: balance; }
.pb-msg:empty { display: none; }
.pb-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pb-actions label { cursor: pointer; }
.pb-shoot { padding: 1.1em 2.2em; font-size: 1rem; }

[data-theme="classic"] .booth { position: relative; background: var(--cream); }
[data-theme="classic"] .booth::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 20px; background: var(--blanket) 0 0 / 60px; box-shadow: inset 0 -3px 0 var(--yellow); }
[data-theme="classic"] .pb-stage { border: 3px solid var(--yellow); border-radius: 6px; transform: rotate(-1deg); }
[data-theme="classic"] .pb-count { font-family: var(--f-display); color: var(--yellow); }
[data-theme="modern"] .pb-stage { border-radius: 28px; }
[data-theme="modern"] .booth { background: var(--blush-2); }
@media (prefers-reduced-motion: reduce) { .pb-count.pop, .pb-flash.go, .bc-scratch.is-revealed .bc-number { animation: none; } }

/* album ít ảnh: số cột theo số ảnh, canh giữa (không dồn hết sang trái) */
.gallery[data-n="1"] { columns: 1; max-width: calc(520px + 2 * var(--gutter)); }
.gallery[data-n="2"] { columns: 2; max-width: calc(820px + 2 * var(--gutter)); }


/* tiêu đề, dòng chữ in hoa: ngắt dòng cân, không để một chữ lẻ loi */
.h2, .cr-role, .cr-names, .lead { text-wrap: balance; }

/* Gen Y: tiêu đề canh giữa thì thẻ mừng cưới cũng canh giữa */
[data-theme="classic"] .gift-item { justify-items: center; }

/* =========================================================================
 *  KHUNG MỘT CỘT (max-w-md của Tailwind 28rem, nới rộng 20% → 33.6rem ≈ 538px)
 *  Màn to: thiệp hiển thị như một màn hình điện thoại ở giữa, hai bên là phông nền.
 *  --cw thay cho 1vw để mọi kích thước theo bề rộng cột, không theo màn hình.
 * ========================================================================= */
:root {
  --app: 538px; /* số nguyên: tránh vạch lệch nửa pixel ở mép thiệp */
  --cw: min(1vw, calc(var(--app) / 100));
  --side: max(0px, calc((100% - var(--app)) / 2)); /* khoảng trống mỗi bên cột (100% = bề rộng màn, không tính thanh cuộn) */
}
html {
  overflow-x: hidden;
  scrollbar-gutter: stable; /* cột không xê dịch khi khoá/mở cuộn */
  background: #efe3dc;
}
html[data-theme="classic"] {
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(0, 0, 0, .22)), repeating-linear-gradient(90deg, #1b3c8f 0 22px, #2447a3 34px, #1b3c8f 48px, #16337c 60px) fixed;
}
html[data-theme="modern"] { background: #f3e6e2; }
/* nền Gen Z vẽ trên một lớp cố định riêng: background-attachment: fixed làm trình duyệt vẽ lại gradient mỗi lần cuộn (giật ~10 fps) */
html[data-theme="modern"]::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 15% 20%, #f3d3da 0%, transparent 40%), radial-gradient(circle at 85% 80%, #e6d7ef 0%, transparent 42%), linear-gradient(160deg, #f8ece9, #efe1d8);
}
body {
  max-width: var(--app);
  margin: 0 auto;
  overflow-x: clip;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 30px 80px -20px rgba(0, 0, 0, .35);
}
/* khoá cuộn khi đang ở màn mở thiệp / xem ảnh: JS gắn class lên cả <html> (không dùng :has vì lỗi trên WebKit/iPhone) */
html.js.is-locked { overflow: hidden; }

/* các thành phần cố định bám theo cột */
.leader, .topbar, .progress { left: var(--side) !important; right: var(--side) !important; }
.tabbar { left: calc(var(--side) + 10px); right: calc(var(--side) + 10px); }
.fab { right: calc(var(--side) + max(16px, env(safe-area-inset-right))); }
.tape-btn.is-compact { right: calc(var(--side) + 12px) !important; }
[data-theme="classic"] .tape-btn { right: calc(var(--side) + 10px); }
.lightbox { left: var(--side); right: var(--side); }
/* thẻ tên ở mở đầu nằm trên nút nhạc và thanh điều hướng dưới đáy, không bị che */
.hero-card { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 140px); }

/* màu phong bì theo phong cách */
[data-theme="classic"] .envelope { --env: #c8202c; --env-flap: #a3121d; --letter: #fffaf0; }
[data-theme="classic"] .env-back, [data-theme="classic"] .env-front { box-shadow: inset 0 0 0 3px rgba(255, 210, 63, .55); }
[data-theme="classic"] .env-back { box-shadow: inset 0 0 0 3px rgba(255, 210, 63, .55), 0 26px 44px -24px rgba(0, 0, 0, .5); }
[data-theme="classic"] .env-label { font: 800 1.2rem/1.2 var(--f-display); font-style: normal; color: var(--yellow); text-shadow: 1px 2px 0 rgba(0, 0, 0, .25); }
[data-theme="classic"] .env-seal { background: radial-gradient(circle at 35% 30%, #ffe58a, #e8b72c 60%, #c99419); color: var(--red); font-family: "Noto Serif SC", "Songti SC", serif; }
[data-theme="classic"] .env-letter { border: 2px dashed rgba(216, 38, 47, .35); color: var(--ink); }
[data-theme="classic"] .bc-bank { font-family: var(--f-display); font-weight: 800; color: var(--navy); }
[data-theme="classic"] .bc-top svg { color: var(--red); }
[data-theme="classic"] .bc-number { color: var(--navy); font-weight: 600; }
[data-theme="classic"] .bc-bottom b { color: var(--red); }
[data-theme="modern"] .envelope { --env: #ecd3d8; --env-flap: #e2c2c9; --letter: #ffffff; }
[data-theme="modern"] .env-label { color: var(--ink); font-size: 1.25rem; }
[data-theme="modern"] .env-seal { background: radial-gradient(circle at 35% 30%, #c98c9a, #a86f7d 60%, #8c5563); color: #fff; font-size: 1.3rem; }
[data-theme="modern"] .env-letter { color: var(--ink); }
[data-theme="modern"] .bc-bank { font-weight: 500; letter-spacing: .3em; font-size: .78rem; }
[data-theme="modern"] .bc-top svg { color: var(--rose); }

/* =========================================================================
 *  HÔM NAY — chỉ hiện đúng ngày có lễ/tiệc
 * ========================================================================= */
.today { padding: 48px var(--gutter) 56px; background: var(--blush-2); }
.today-title { margin: 0 0 20px; font: 600 clamp(1.8rem, calc(7 * var(--cw)), 2.4rem)/1.15 var(--f-display); color: var(--wine); text-wrap: balance; }
.today-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.today-ev { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.today-ev.is-live { border-color: var(--wine); box-shadow: 0 0 0 3px var(--blush); }
.today-ev.is-done { opacity: .6; }
.td-when b { display: block; font: 600 1.6rem/1 var(--f-display); color: var(--wine); font-variant-numeric: lining-nums; }
.td-status { display: block; margin-top: 6px; font: 600 .74rem/1.3 var(--f-body); color: var(--rose); }
.is-live .td-status::before { content: "● "; color: #e5484d; animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.td-body h3 { margin: 0 0 4px; font: 600 1.25rem/1.2 var(--f-display); color: var(--ink); }
.td-body p { margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.td-body p b { color: var(--ink); }
.today-go { width: 100%; padding: 1em; font-size: 1rem; }
.today-call { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.today-call .btn { flex: 1; white-space: nowrap; }
[data-theme="classic"] .today { background: var(--cream); }
[data-theme="classic"] .today-title { font-weight: 800; color: var(--red); }
[data-theme="classic"] .today-ev { border: 2px solid var(--navy); border-radius: 10px; }
[data-theme="classic"] .today-ev.is-live { border-color: var(--red); box-shadow: 0 0 0 4px var(--yellow); }
[data-theme="classic"] .td-when b { font-weight: 800; color: var(--red); }
[data-theme="classic"] .td-body h3 { font-weight: 800; color: var(--navy); }
[data-theme="modern"] .today-title { font-weight: 400; color: var(--ink); }
[data-theme="modern"] .today-ev { border-radius: 4px; }
[data-theme="modern"] .td-when b { font-weight: 300; color: var(--ink); font-feature-settings: "lnum" 1; }
/* sau ngày cưới: lịch trình chỉ còn để lưu niệm */
#lich-chieu.is-past .show { opacity: .75; }
@media (prefers-reduced-motion: reduce) { .is-live .td-status::before { animation: none; } }

/* =========================================================================
 *  NHẠC ĐANG PHÁT: đèn nháy (Gen Y) và vạch sóng nhạc (Gen Z) theo nhịp thật
 *  JS đặt --b0..--b3 (0 → 1) cho 4 dải âm: trầm, trầm-trung, trung, cao
 * ========================================================================= */
.lights i:nth-child(4n+1), .np-eq i:nth-child(1) { --bk: var(--b0, 0); }
.lights i:nth-child(4n+2), .np-eq i:nth-child(2) { --bk: var(--b1, 0); }
.lights i:nth-child(4n+3), .np-eq i:nth-child(3) { --bk: var(--b2, 0); }
.lights i:nth-child(4n), .np-eq i:nth-child(4) { --bk: var(--b3, 0); }
.is-beat .lights i {
  animation: none;
  opacity: calc(.35 + var(--bk) * .65);
  box-shadow: 0 0 calc(3px + var(--bk) * 14px) calc(var(--bk) * 4px) var(--c);
}
.is-beat .tape-btn.is-playing .np-eq i { animation: none; height: calc(22% + var(--bk) * 78%); }

/* ---------------------------------------------------------- chọn bài hát */
.tape-btn { overflow: visible; }
.tape-list {
  position: absolute; top: -10px; left: -10px; z-index: 2;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; background: #fff; color: var(--wine, #7a2b35);
  border: 1px solid var(--line, rgba(0,0,0,.12)); box-shadow: 0 4px 10px -4px rgba(0,0,0,.35);
  font: 600 14px/1 system-ui, sans-serif; cursor: pointer;
}
.tape-list[hidden] { display: none; }
.tape-btn.is-compact .tape-list { top: -8px; left: -8px; width: 24px; height: 24px; font-size: 12px; }
.msheet {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom)); /* thẻ nổi, tách khỏi mép dưới màn hình */
  background: rgba(20, 12, 14, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: msheet-fade .25s ease-out;
}
.msheet[hidden] { display: none; }
@keyframes msheet-fade { from { opacity: 0; } }
@keyframes msheet-up { from { transform: translateY(40px); opacity: 0; } }
.msheet-panel {
  position: relative; width: min(100%, calc(var(--app) - 28px)); max-height: 72vh; overflow: auto;
  padding: 16px 14px 14px;
  border-radius: 24px;
  background: #fffaf3; color: #3a2326;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .5) inset;
  animation: msheet-up .32s cubic-bezier(.2, .8, .2, 1);
}
.msheet-grip { display: none; width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: currentColor; opacity: .18; }
.msheet-head { display: flex; align-items: center; gap: 12px; padding: 0 4px 12px; margin-bottom: 6px; border-bottom: 1px dashed rgba(122, 43, 53, .25); }
.msheet-badge { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--wine, #b3222f); color: #ffe7a8; }
.msheet-badge svg { width: 20px; height: 20px; }
.msheet-ttl { display: grid; line-height: 1.25; min-width: 0; }
.msheet-ttl small { font: 600 .66rem/1.3 var(--f-body, system-ui); letter-spacing: .14em; text-transform: uppercase; opacity: .55; }
.msheet-ttl b { font: 700 1.15rem/1.2 var(--f-display, inherit); color: var(--wine, #b3222f); }
.msheet-x { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .05); color: inherit; font-size: 15px; cursor: pointer; transition: background .2s; }
.msheet-x:hover { background: rgba(0, 0, 0, .1); }
.msheet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.msheet-item {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 11px 12px; border: 0; border-radius: 14px; background: none; color: inherit;
  font: inherit; cursor: pointer; transition: background .2s, transform .2s;
}
.msheet-item:hover, .msheet-item:focus-visible { background: rgba(122, 43, 53, .06); outline: none; }
.msheet-item:active { transform: scale(.985); }
.mi-no { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(122, 43, 53, .2); font: 600 .78rem/1 var(--f-body, system-ui); font-variant-numeric: tabular-nums; color: var(--wine, #b3222f); }
.mi-txt { display: grid; min-width: 0; line-height: 1.3; }
.mi-txt b { font-weight: 600; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-txt small { font-size: .8rem; opacity: .6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-eq { display: none; margin-left: auto; flex: none; align-items: flex-end; gap: 2px; height: 16px; }
.mi-eq i { width: 3px; height: 35%; border-radius: 2px; background: currentColor; }
.msheet.is-playing .is-current .mi-eq i { animation: eq .9s ease-in-out infinite; }
.mi-eq i:nth-child(2) { animation-delay: -.3s; }
.mi-eq i:nth-child(3) { animation-delay: -.6s; }
.msheet-item.is-current { background: linear-gradient(135deg, var(--wine, #b3222f), #8f1822); color: #fff; box-shadow: 0 10px 22px -12px rgba(143, 24, 34, .8); }
.msheet-item.is-current .mi-no { background: #ffe7a8; border-color: transparent; color: #8f1822; }
.msheet-item.is-current .mi-txt small { opacity: .8; }
.msheet-item.is-current .mi-eq { display: flex; }
.msheet-item.is-failed { opacity: .4; }
/* Gen Z: tối giản, đen–hồng pastel */
[data-theme="modern"] .msheet-panel { background: rgba(255, 252, 250, .96); color: #1d1a1b; }
[data-theme="modern"] .msheet-head { border-bottom: 1px solid rgba(0, 0, 0, .07); }
[data-theme="modern"] .msheet-badge { border-radius: 50%; background: conic-gradient(from 20deg, #f3a6b8, #f6e1c9, #d9b3b9, #f3a6b8); color: #fff; }
[data-theme="modern"] .msheet-ttl b { color: #1d1a1b; font-family: var(--f-body, inherit); }
[data-theme="modern"] .msheet-item:hover, [data-theme="modern"] .msheet-item:focus-visible { background: rgba(243, 166, 184, .14); }
[data-theme="modern"] .mi-no { border-color: rgba(0, 0, 0, .1); color: #8a7f81; }
[data-theme="modern"] .msheet-item.is-current { background: #1d1a1b; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .6); }
[data-theme="modern"] .msheet-item.is-current .mi-no { background: #f3a6b8; color: #1d1a1b; }
[data-theme="modern"] .msheet-item.is-current .mi-eq i { background: #f3a6b8; }

/* ---------------------------------------------- phong bì mừng cưới gọn hơn */
.gifts { gap: 26px; }
.gift-item { gap: 12px; }
.envelope { max-width: 360px; padding-top: 8px; }
.env-back { top: 40px; border-radius: 9px; }
.env-back::before { height: 34px; }
.env-letter { gap: 8px; margin: 0 16px; padding: 14px 16px 96px; }
.env-front { height: 88px; padding-bottom: 6px; border-radius: 0 0 9px 9px; }
.env-label { font-size: .98rem; }
[data-theme="classic"] .env-label { font-size: 1.02rem; }
[data-theme="modern"] .env-label { font-size: 1.05rem; }
.env-seal { width: 38px; height: 38px; margin-left: -19px; bottom: 34px; font-size: 1.1rem; }
[data-theme="modern"] .env-seal { font-size: 1rem; }
.bc-bank { font-size: .9rem; }
.bc-number { font-size: clamp(1.15rem, calc(4.6 * var(--cw)), 1.45rem); }
[data-theme="modern"] .bc-number { font-size: clamp(1.4rem, calc(5 * var(--cw)), 1.8rem); }
.bc-scratch { padding: 6px 10px; }
.gift-item .btn { padding-block: 9px; }
/* liên hệ nằm cuối, ngay sau mừng cưới: bớt khoảng trống phía trên */
#mung-cuoi + #luu-y { padding-top: clamp(56px, calc(9 * var(--cw)), 90px); }

/* mừng cưới: thẻ gọn — nút sao chép nằm trong lá thư, bỏ dòng gợi ý & icon thừa */
.bc-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.bc-row .bc-bottom { min-width: 0; }
.bc-row .bc-bottom b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-copy {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 999px; border: 1px solid currentColor;
  background: transparent; color: var(--wine, #b3222f);
  font: 600 .74rem/1 var(--f-body); cursor: pointer; transition: background .2s, color .2s;
}
.bc-copy .ic { width: 14px; height: 14px; }
.bc-copy:hover { background: rgba(0, 0, 0, .05); }
[data-theme="classic"] .bc-copy { color: var(--navy); }
[data-theme="modern"] .bc-copy { color: var(--ink); border-color: rgba(0, 0, 0, .2); letter-spacing: .04em; }
.gifts { gap: 30px; }

/* mã QR nằm trên phong bì, ngay trên chữ "Mừng cưới …" (thay con dấu) */
.envelope.has-qr .env-letter { padding-bottom: 196px; }
.envelope.has-qr .env-front { height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding-bottom: 8px; clip-path: polygon(0 0, 50% 34px, 100% 0, 100% 100%, 0 100%); }
.envelope.has-qr .env-seal { display: none; }
.env-qr { display: block; width: 124px; padding: 6px; border-radius: 10px; background: #fff; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5); }
.env-qr img { display: block; width: 100%; height: auto; }
[data-theme="classic"] .env-qr { box-shadow: 0 0 0 3px #e8b72c, 0 6px 16px -8px rgba(0, 0, 0, .5); }

/* mừng cưới: hai phong bì cách xa hơn + nút tải mã QR */
.gifts { gap: 44px; }
.qr-dl {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 2px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid currentColor;
  font: 600 .82rem/1 var(--f-body); text-decoration: none; color: var(--wine, #b3222f);
}
.qr-dl .ic { width: 16px; height: 16px; }
[data-theme="classic"] .qr-dl { color: var(--navy); background: #fff; }
[data-theme="modern"] .qr-dl { color: var(--ink); border-color: rgba(0, 0, 0, .2); }

/* liên hệ: hai thẻ chú rể / cô dâu cạnh nhau, gọn */
#luu-y { padding: clamp(56px, calc(10 * var(--cw)), 90px) 0 clamp(64px, calc(12 * var(--cw)), 110px); }
#luu-y .head { margin-bottom: 24px; }
.contact-tiles { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-tile {
  display: grid; justify-items: center; gap: 4px; text-align: center;
  padding: 18px 12px 16px; border-radius: 18px; background: var(--white, #fff); border: 1px solid var(--line);
}
.ct-tile small { font: 600 .66rem/1.2 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--rose); }
.ct-tile b { font: 600 1.05rem/1.3 var(--f-body); }
.ct-actions { display: flex; gap: 6px; margin-top: 10px; }
.ct-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); font: 600 .8rem/1 var(--f-body); color: inherit; text-decoration: none;
}
.ct-btn .ic { width: 15px; height: 15px; }
.ct-call { background: var(--wine, #b3222f); border-color: transparent; color: #fff; }
[data-theme="classic"] .ct-tile { border: 2px solid var(--navy); box-shadow: 4px 4px 0 var(--navy); }
[data-theme="classic"] .ct-tile small { color: var(--navy); }
[data-theme="classic"] .ct-tile b { color: var(--red); font-family: var(--f-display); font-size: 1.15rem; }
[data-theme="classic"] .ct-call { background: var(--red); }
[data-theme="classic"] .ct-btn:not(.ct-call) { border-color: var(--navy); color: var(--navy); }
[data-theme="modern"] .ct-call { background: var(--ink); }

/* nút tải QR: nhãn nhỏ gắn ở góc dưới mã QR, nằm trong phong bì */
.env-qr { position: relative; }
.env-qr .qr-dl {
  position: absolute; right: -12px; top: -10px; margin: 0;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 8px 4px 6px; border-radius: 999px; border: 0;
  background: #fff; color: var(--wine, #b3222f);
  font: 700 .66rem/1 var(--f-body); letter-spacing: .02em;
  box-shadow: 0 3px 10px -3px rgba(0, 0, 0, .45);
}
.env-qr .qr-dl .ic { width: 12px; height: 12px; }
[data-theme="classic"] .env-qr .qr-dl { background: var(--yellow, #ffd23f); color: var(--red); }
[data-theme="modern"] .env-qr .qr-dl { background: var(--ink); color: #fff; }

/* lời kết khi không rõ khách bên nào: mỗi bên một khối, từng dòng lễ/tiệc */
.cr-side .cr-names { display: grid; gap: 6px; }
.cr-ev { display: block; font-size: .78em; line-height: 1.35; }
.cr-ev b { font-weight: 800; }

/* phong bì mừng cưới canh giữa ở cả hai phong cách */
.gift-item { justify-items: center; }

/* Hai nửa yêu thương: chú rể & cô dâu chung một hàng */
.cast-grid { grid-template-columns: 1fr 1fr !important; gap: 14px !important; align-items: start; }
.cast-grid .role { margin: 0 !important; }
.cast-grid .role-alt { margin-top: 36px !important; } /* lệch nhẹ cho tự nhiên */
.cast-grid .role-info { padding-top: 12px; margin-top: 12px; text-align: center; }
.cast-grid .role-as { margin-bottom: 6px; }
.cast-grid .role-name { margin: 0; font-size: clamp(1.15rem, calc(5 * var(--cw)), 1.6rem) !important; line-height: 1.2; }
[data-theme="classic"] .cast-grid .role-photo { border-width: 6px; }

[data-theme="classic"] .cast-grid .role-name { font-size: clamp(1.02rem, calc(4.3 * var(--cw)), 1.45rem) !important; }

/* nhịp khoảng cách đều giữa các mục trong khung một cột (trước 100px trên + 100px dưới = quá thưa trên điện thoại) */
main > section:not(.hero):not(.today):not(#luu-y) { padding-top: 76px; padding-bottom: 76px; }
main > section:not(.hero) .head { margin-bottom: 36px; }

/* 5 mục trên thanh dưới đáy: chữ nhỏ lại một chút cho vừa */
.tabbar a { padding-inline: 0; }
.tabbar a span { font-size: .64rem; white-space: nowrap; }

/* màn mở thiệp tràn 1px mỗi bên để phủ kín mép cột (tránh vạch sáng do lệch nửa pixel) */
.leader { left: calc(var(--side) - 1px) !important; right: calc(var(--side) - 1px) !important; }

/* ẩn nút chọn Gen Y / Gen Z — phong cách chỉ đổi qua link (&giaodien=geny|genz) hoặc theme trong config */
.leader-theme, .topbar .theme-switch { display: none !important; }

/* ảnh cover: dời khung sang trái một chút để cặp đôi nằm giữa màn hình */
.hero-photo img { object-position: 40% center; }

/* màn khoá Gen Z: thanh home nằm sát đáy màn hình như iPhone thật, không dính dưới dòng gợi ý */
.ls-hint::after {
  position: absolute; left: 50%; bottom: calc(8px + env(safe-area-inset-bottom));
  margin: 0; transform: translateX(-50%);
}

/* Gen Z: bỏ hẳn khung vòm minh hoạ cạnh lời ngỏ */
[data-theme="modern"] .logline-photo.is-illus { display: none !important; }
