/* =========================================================
   Thiệp cưới – phong bì đỏ đô / hoa kem (dựng theo mẫu CineLove "feed")
   Nội dung thiệp là "canvas" định vị tuyệt đối theo thiết kế rộng 500px:
   1cqw = 5px thiết kế => tỉ lệ giữ nguyên ở điện thoại, iPad và PC.
   ========================================================= */
:root {
  --wine: #511419;
  --wine-deep: #590310;
  --cream: #ece4d8;
  --cream-dim: rgba(236, 228, 216, .7);
  --gold: #f0ca91;
  --bask: 'BaskervilleBook', 'Times New Roman', serif;
  --times: 'Times New Normal', 'Times New Roman', serif;
  --ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  /* bảng màu khung "feed" của mẫu */
  --feed-ink: #161823;
  --feed-muted: #73747b;
  --feed-faint: #a3a4a8;
  --feed-line: #ebebed;
  --feed-soft: #f1f1f2;
  --feed-soft-hover: #e4e4e7;
  --feed-brand: #e8436a;
  --feed-brand-soft: #fff1f4;
  --feed-gap: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: #fff; color: var(--feed-ink); font-family: var(--ui); overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

/* ================= BÌA PHONG BÌ =================
   Giống mẫu: sân khấu tỉ lệ 934 x 734.048, rộng min(160cqw, 143.781cqh) của màn hình;
   các phần tử "trồi lên" lần lượt khi vào trang, chạm thì bay lên + mờ dần. */
.cover {
  position: fixed; inset: 0; z-index: 1000; background: #fff; cursor: pointer; outline: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center; container-type: size;
  transition: opacity .4s ease-out;
}
.ev-stage { position: relative; flex-shrink: 0; width: min(160cqw, 143.781cqh); aspect-ratio: 934 / 734.048; container-type: inline-size; user-select: none; }
.ev-stage > .ev { position: absolute; margin: 0; opacity: 0; animation: evRise .9s cubic-bezier(.22, .61, .36, 1) var(--d, 0s) both; }
.ev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; max-width: none; pointer-events: none; }
.ev-fl   { left: 18.2013%; top: 48.362%;  width: 16.9165%; height: 30.2433%; z-index: 4; }
.ev-env  { left: 26.6595%; top: 28.7447%; width: 46.788%;  height: 42.504%;  z-index: 3; }
.ev-seal { left: 46.2527%; top: 47.4083%; width: 7.49465%; height: 9.53616%; z-index: 5; }
.ev-mono { left: 46.2527%; top: 47.4083%; width: 7.49465%; height: 9.53616%; z-index: 6; }
.ev-mono span { position: absolute; font-family: 'OpeningEnvelopeSerif2', serif; font-size: 2.03426cqw; line-height: 1; color: #5b0113; transform: rotate(5.32deg); }
.ev-mono span:first-child { left: 32.8571%; top: 30%; }
.ev-mono span:last-child { left: 40%; top: 38.5714%; }
.ev-greet { left: 26.084%; top: 11.2709%; width: 45.9702%; text-align: center; font-family: 'OpeningEnvelopeSerif', serif; font-weight: 400; font-size: 2.56959cqw; line-height: 1.33333; letter-spacing: .017em; color: #5b0113; white-space: nowrap; z-index: 6; }
.ev-names { left: 20.0675%; top: 17.9825%; width: 58.2615%; text-align: center; font-family: 'Aquarelle', cursive; font-weight: 400; font-size: 3.85439cqw; line-height: 1.38889; letter-spacing: .011em; color: #5b0113; white-space: nowrap; z-index: 7; }
.ev-cta { left: 22.2363%; top: 75.841%; width: 53.5275%; text-align: center; font-family: 'OpeningEnvelopeSerif', serif; font-weight: 400; font-size: 2.05246cqw; line-height: 1.39802; letter-spacing: .007em; color: #5b0113; white-space: nowrap; z-index: 8; }
.ev-fr   { left: 61.6702%; top: 25.2027%; width: 21.1991%; height: 52.0402%; z-index: 4; }
@keyframes evRise { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes evAway { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-34px); } }
.cover.exiting { pointer-events: none; }
.cover.exiting .ev { animation: evAway .7s cubic-bezier(.22, .61, .36, 1) var(--dx, calc(var(--d, 0s) * .42)) both; }
.cover.revealing { opacity: 0; }
.cover.gone { display: none; }

/* ================= KHUNG TRANG (điện thoại: thiệp toàn màn hình) ================= */
.feed { position: fixed; inset: 0; }
.side, .rail, .navs, .panel-r { display: none; }
.stage { position: absolute; inset: 0; }
.card-row { height: 100%; }
.card { position: relative; overflow: hidden; background: #fff; width: 100vw; height: 100dvh; }
.scroll { height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.cq { container-type: inline-size; }

/* ================= CANVAS THIỆP ================= */
.canvas {
  position: relative; height: 1065.35cqw; overflow: hidden;
  background: url("../assets/decor/paper-bg.webp") 0 0 / contain repeat;
}
.a { position: absolute; left: calc(var(--x) * 1cqw); top: calc(var(--y) * 1cqw); width: calc(var(--w, 0) * 1cqw); margin: 0; }
.a[style*="--h"] { height: calc(var(--h) * 1cqw); }

/* ảnh trang trí (ảnh thật của mẫu) */
.im::before, .im > i { content: ''; position: absolute; inset: 0; background: var(--img) 50% 50% / cover no-repeat; opacity: var(--o, 1); }
.palace   { --img: url("../assets/decor/palace.webp"); }
.env-back { --img: url("../assets/decor/env-back.webp"); }
.env-front { --img: url("../assets/decor/env-front.webp"); }
.spray    { --img: url("../assets/decor/spray.webp"); pointer-events: none; }
.spray::before { content: none; }
.frame .float { width: 100%; height: 100%; border: 1.3954cqw solid #fff; animation: aFloat 3.1s ease-in-out infinite; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.bounce { animation: aBounce 4.7s ease-in-out infinite; }
@keyframes aFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes aBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes aWobble {
  0% { transform: scale(1); } 10%, 20% { transform: scale(.9) rotate(-3deg); }
  30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); } 40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}

/* chữ */
.t-std { font-family: 'Cormorant Garamond Gnosis', serif; font-style: italic; font-size: 5cqw; line-height: 8cqw; letter-spacing: .2cqw; text-transform: uppercase; text-align: center; color: var(--wine-deep); }
.t-name { font-family: 'Viaoda Libre', serif; font-size: 10.6cqw; line-height: 16.96cqw; text-align: center; color: var(--wine); white-space: nowrap; }
.t-amp-big { font-family: 'The Nautigal', cursive; font-size: 20cqw; line-height: 32cqw; text-align: center; color: rgba(81, 20, 25, .28); pointer-events: none; }
.t-amp { font-family: 'The Nautigal', cursive; font-size: 11cqw; line-height: 17.6cqw; text-align: center; color: var(--cream); }
.t-title { font-family: var(--times); font-weight: 700; font-size: 4.8cqw; line-height: 7.68cqw; letter-spacing: .26cqw; text-transform: uppercase; text-align: center; }
.t-b { font-family: var(--bask); font-size: 3.6cqw; line-height: 5.76cqw; text-align: center; color: var(--cream); }
.t-b.sm { font-size: 3.4cqw; line-height: 5.44cqw; }
.t-day { font-family: var(--bask); font-size: 10cqw; line-height: 16cqw; text-align: center; color: var(--cream); }
.up { text-transform: uppercase; }
.it { font-style: italic; }
.bold { font-weight: 700; }
.dim { color: var(--cream-dim); }
.cream { color: var(--cream); }
.wine { color: var(--wine-deep); }
.wine2 { color: var(--wine); }
.ink { color: #000; }

.vline { background: var(--cream); }
.panel { background: var(--wine); border-radius: 6.9767cqw; }

/* slideshow ảnh cưới */
.slides { overflow: hidden; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.5s, transform 1.5s; }
.slides img.on { opacity: 1; }

/* đếm ngược */
.cd { display: flex; justify-content: space-between; gap: 1px; }
.cd > div { width: 18.55cqw; height: 100%; border-radius: 4px; background: var(--wine); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--bask); font-size: 3.6cqw; line-height: 20px; color: var(--gold); }
.cd b { font-weight: 400; }

/* lịch tháng */
.cal { background: rgba(236, 228, 216, .09); border-radius: 6.9767cqw; display: grid; grid-template-columns: repeat(7, 10.42cqw); grid-auto-rows: var(--rh, 11.14cqw); align-content: start; }
.cal span { position: relative; display: flex; align-items: center; justify-content: center; font-family: var(--bask); font-size: 3.4cqw; line-height: 20px; color: var(--cream); }
.cal span.wday::before { content: ''; position: absolute; left: 50%; top: 50%; width: 11.16cqw; height: 8.36cqw; translate: -50% -50%; background: url("../assets/decor/calen-heart.png") center / 100% 100% no-repeat; animation: beat 1.4s ease-in-out infinite; }
.cal span.wday b { position: relative; font-weight: 400; color: #fff; }
@keyframes beat { 50% { transform: scale(1.12); } }
.btn-cal { display: flex; align-items: center; justify-content: center; background: var(--cream); color: var(--wine-deep); border-radius: 6.9767cqw; font-family: var(--bask); font-size: 3.6cqw; }

/* bản đồ, dress code */
.map { border-radius: 6.9767cqw; overflow: hidden; background: #e4ddd0; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.dot { border-radius: 50%; animation: aFloat 2s ease-in-out var(--ad, 0s) infinite; }

/* RSVP */
.rsvp { border-radius: 8px; font-family: Arial, sans-serif; text-align: center; }
.rsvp > * { position: absolute; left: 0; width: 100%; }
.r-tag { top: 6cqw; font-size: 2.1cqw; line-height: 5.4cqw; letter-spacing: .19cqw; color: #333; opacity: .7; }
.r-title { top: 12.2cqw; font-size: 3.64cqw; line-height: 5.4cqw; font-weight: 600; color: #111c2d; }
.r-text { top: 18.4cqw; font-size: 2.52cqw; line-height: 2.835cqw; color: #333; opacity: .8; padding: 0 1cqw; }
.r-btn { left: 30cqw; top: 28.4cqw; width: 23.8cqw; height: 7.6cqw; background: #700f2d; color: #fff; border: 1px solid #ad3c5e; border-radius: 8px; font-size: 2.8cqw; transition: filter .2s; }
.r-btn:hover { filter: brightness(1.15); }

/* mừng cưới */
.gift > i { position: absolute; inset: 0; background: url("../assets/decor/gift-heart.webp") center / contain no-repeat; animation: aWobble 4s ease-in-out infinite; }

/* thank you */
.thanks { overflow: hidden; }
.thanks__img { position: absolute; inset: 0; background: 50% 30% / cover no-repeat; }
/* tối dần ở nửa dưới (chỗ có chữ), phần mặt ở trên giữ sáng */
.thanks::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 8, 10, 0) 28%, rgba(20, 8, 10, .38) 46%, rgba(20, 8, 10, .62) 68%, rgba(20, 8, 10, .72) 100%); }
.t-thanks { font-family: 'Monsieur La Doulaise', cursive; font-size: 8.4cqw; line-height: 12.6cqw; color: #fff; text-align: center; text-shadow: 0 .3cqw 1.2cqw rgba(0, 0, 0, .45); }
.t-thanks-text { font-family: 'Lora Regular', serif; font-size: 3.2cqw; line-height: 4.8cqw; color: #fff; text-align: center; text-shadow: 0 .2cqw .8cqw rgba(0, 0, 0, .5); }

/* hiện dần khi cuộn tới (như mẫu: trượt lên 50px thiết kế, 1.5–1.6s) */
.rv { opacity: 0; translate: 0 10cqw; transition: opacity 1.5s ease-out, translate 1.5s ease-out; }
.rv[data-r="img"] { transition: opacity 1.6s ease-out .2s, translate 1.6s ease-out .2s; }
.rv[data-r="shape"] { transition: opacity 1.6s ease-out .3s, translate 1.6s ease-out .3s; }
.rv.in { opacity: 1; translate: none; }

/* ================= LỜI CHÚC BAY ================= */
.wish-float { position: fixed; z-index: 20; left: 16px; bottom: 58px; width: min(285px, 76vw); height: 183px; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 35%); mask-image: linear-gradient(180deg, transparent 0, #000 35%); }
.wish-float .w { align-self: flex-start; max-width: 100%; background: rgba(225, 117, 117, .5); color: #fff; font: 400 11px/14px var(--ui); padding: 2px 10px; border-radius: 7px; animation: wishIn .5s ease both; }
.wish-float .w b { font-weight: 700; }
@keyframes wishIn { from { opacity: 0; transform: translateY(8px); } }

/* ================= CHROME ĐIỆN THOẠI ================= */
.music-btn { position: absolute; z-index: 25; top: 6px; right: 6px; width: 38px; height: 38px; }
.music-btn img { width: 100%; height: 100%; background: #000; border-radius: 50%; }
.music-btn.is-on img { animation: spin 3s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
/* nút ▶ tiếp tục tự cuộn (hiện khi khách tự cuộn/chạm làm dừng) */
.auto-play { position: absolute; z-index: 25; top: 84px; left: 8px; width: 40px; height: 40px; animation: wishIn .3s ease both; }
.auto-play img { width: 100%; height: 100%; }
@media (min-width: 768px) { .auto-play { top: 10px; left: 10px; } }

.m-top { position: fixed; z-index: 30; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; }
.m-top button { width: 32px; height: 32px; border-radius: 9999px; display: grid; place-items: center; background: rgba(255, 255, 255, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.m-top svg { width: 18px; height: 18px; }
#mPen { color: #000; }
#mHeart { color: #ff4d6d; }
.m-bar { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; height: 64px; padding: 0 8px calc(env(safe-area-inset-bottom) * .5); display: flex; align-items: center; justify-content: space-between; gap: 10px; transition: opacity .3s, transform .3s; }
.m-input { flex: 0 1 150px; min-width: 0; height: 39px; border-radius: 30px; padding: 0 7px 0 15px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #fff; font-size: 13px; background: rgba(0, 0, 0, .2); white-space: nowrap; overflow: hidden; }
.m-input img { width: 24px; height: 24px; flex: none; }
.m-right { display: flex; align-items: center; gap: 10px; flex: none; }
.m-shoot { height: 39px; border-radius: 30px; padding: 0 10px; display: flex; align-items: center; gap: 5px; color: #fff; font-size: 13px; background: rgba(0, 0, 0, .2); white-space: nowrap; }
.m-shoot img { width: 30px; height: 30px; }
.m-img { width: 39px; height: 39px; background: center / 100% auto no-repeat; }
.m-gift { background-image: url("../assets/decor/gift-box.png"); }
.m-like { background-image: url("../assets/decor/like.png"); }
.m-toggle { position: fixed; z-index: 26; right: 8px; bottom: 68px; width: 36px; height: 68px; border-radius: 35px; background: linear-gradient(#ff9aa6, #ff4969); box-shadow: 0 2px 10px rgba(0, 0, 0, .2); display: flex; flex-direction: column; align-items: center; color: #fff; transition: bottom .3s; }
.m-toggle img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.m-toggle svg { width: 22px; height: 22px; margin-top: 5px; transition: rotate .3s; }
.tb-off .m-bar, .tb-off .wish-float { opacity: 0; pointer-events: none; }
.tb-off .m-bar { transform: translateY(20px); }
.tb-off .m-toggle { bottom: 14px; }
.tb-off .m-toggle svg { rotate: 45deg; }
@media (max-width: 359px) { .m-bar { gap: 6px; padding: 0 6px; } .m-right { gap: 6px; } .m-input { padding: 0 6px 0 10px; font-size: 12px; } .m-shoot { font-size: 12px; padding: 0 8px; } }

/* tim bay */
.hearts { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.hearts span { position: absolute; bottom: 70px; font-size: 22px; animation: fly 2.6s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes fly { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--dx), -70vh) scale(1.3) rotate(var(--rot)); opacity: 0; } }

/* ================= iPad / PC: bố cục "feed" như mẫu ================= */
@media (min-width: 768px) {
  .m-top, .m-bar, .m-toggle { display: none; }
  .feed { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); width: 100vw; height: 100dvh; overflow: hidden; background: #fff; }
  .stage { position: relative; inset: auto; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; padding: var(--feed-gap) 88px var(--feed-gap) 24px; container-type: inline-size; }
  .card-row { display: flex; align-items: flex-end; gap: 16px; height: 100%; }
  .card {
    height: calc(100dvh - var(--feed-gap) * 2);
    width: min(500px, calc((100dvh - var(--feed-gap) * 2) * .5495), calc(100cqw - 64px));
    border-radius: 16px; box-shadow: 0 0 0 1px rgba(22, 24, 35, .06), 0 12px 36px rgba(22, 24, 35, .12); isolation: isolate; z-index: 2;
  }
  .wish-float { position: absolute; left: 12px; bottom: 40px; width: 72%; }

  .rail { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-bottom: 12px; flex: none; }
  .rail__avatar { width: 48px; height: 48px; margin-bottom: 6px; border: 2px solid #fff; border-radius: 50%; overflow: hidden; box-shadow: 0 2px 8px rgba(22, 24, 35, .14); background: var(--feed-soft); }
  .rail__avatar img { width: 100%; height: 100%; object-fit: cover; }
  .rail__btn { display: flex; flex-direction: column; align-items: center; gap: 5px; }
  .rail__btn .ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--feed-soft); transition: background-color .15s, color .15s; }
  .rail__btn:hover .ico { background: var(--feed-soft-hover); color: var(--feed-brand); }
  .rail__btn svg { width: 22px; height: 22px; }
  .rail__btn em { font-style: normal; color: var(--feed-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

  .navs { display: flex; position: absolute; top: 50%; right: 24px; flex-direction: column; gap: 16px; transform: translateY(-50%); }
  .nav-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--feed-soft); transition: background-color .15s; }
  .nav-btn:hover { background: var(--feed-soft-hover); }
  .nav-btn svg { width: 24px; height: 24px; }

  /* cột phải: lời chúc */
  .panel-r { flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--feed-line); }
  .tabs { display: flex; margin: 20px 20px 0; border-bottom: 1px solid var(--feed-line); }
  .tab { flex: 1 1 0%; height: 46px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--feed-faint); font-size: 15px; font-weight: 600; transition: color .15s; }
  .tab:hover { color: var(--feed-muted); }
  .tab[aria-selected="true"] { border-bottom-color: var(--feed-ink); color: var(--feed-ink); }
  .panel-body { flex: 1 1 0%; min-height: 0; padding: 18px 20px; overflow-y: auto; }
  .wl-count { margin: 0 0 16px; color: var(--feed-muted); font-size: 14px; text-align: center; }
  .wl-list { display: flex; flex-direction: column; gap: 20px; }
  .wl-item { display: flex; gap: 12px; }
  .wl-av { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #5b3b44; font-size: 16px; font-weight: 700; }
  .wl-body { min-width: 0; }
  .wl-name { margin: 0; color: var(--feed-muted); font-size: 13px; font-weight: 600; }
  .wl-text { margin: 3px 0 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
  .wl-time { margin: 5px 0 0; color: var(--feed-faint); font-size: 12px; }
  .phone { display: flex; flex-direction: column; align-items: center; padding-top: 44px; text-align: center; }
  .phone__qr { padding: 14px; border: 1px solid var(--feed-line); border-radius: 18px; width: 210px; height: 210px; }
  .phone__title { margin: 20px 0 6px; font-size: 16px; font-weight: 700; }
  .phone__text { max-width: 260px; color: var(--feed-muted); font-size: 14px; line-height: 1.5; }
  .phone__copy { display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-top: 20px; padding: 0 18px; border: 1px solid var(--feed-line); border-radius: 20px; background: #fff; font-size: 14px; font-weight: 600; transition: background-color .15s; }
  .phone__copy:hover { background: var(--feed-soft); }
  .composer { display: flex; align-items: center; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--feed-line); }
  .composer input { flex: 1 1 0%; min-width: 0; height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: var(--feed-soft); color: var(--feed-ink); font: 15px var(--ui); outline: none; transition: background-color .15s; }
  .composer input::placeholder { color: var(--feed-faint); }
  .composer input:hover { background: var(--feed-soft-hover); }
  .composer button { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--feed-brand); color: #fff; transition: filter .15s; }
  .composer button:hover { filter: brightness(.94); }
  .composer svg { width: 18px; height: 18px; }

  /* cột trái: thông tin thiệp */
  .side { flex-direction: column; min-height: 0; padding: 20px 20px 18px; overflow-y: auto; }
  .side__info { margin-top: 16px; }
  .side__cover { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; object-fit: cover; background: var(--feed-soft); box-shadow: 0 0 0 1px rgba(22, 24, 35, .06); }
  .side__title { margin: 16px 0 0; font-size: 18px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
  .side__desc { margin: 10px 0 0; color: #45464d; font-size: 14px; line-height: 1.55; }
  .side__promo { margin-top: 28px; padding: 16px; border-radius: 14px; background: var(--feed-brand-soft); color: var(--feed-brand); }
  .side__promo p { margin: 8px 0 12px; color: #4a2c34; font-size: 13.5px; line-height: 1.5; }
  .side__cta { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 19px; background: var(--feed-brand); color: #fff; font-size: 14px; font-weight: 600; transition: filter .15s; }
  .side__cta:hover { filter: brightness(.94); }
  .side__foot { margin: auto 0 0; padding-top: 24px; color: var(--feed-faint); font-size: 12px; }
}
/* iPad ngang (769–1023px, tỉ lệ ≥ 4:3): thêm cột lời chúc hẹp */
@media (min-width: 769px) and (max-width: 1023px) and (min-aspect-ratio: 4 / 3) {
  .feed { grid-template-columns: minmax(0, 1fr) clamp(260px, 32vw, 320px); }
  .panel-r { display: flex; }
  .stage { padding-right: 80px; padding-left: 16px; }
  .navs { right: 16px; }
  .tabs { margin: 12px 16px 0; }
  .tab { flex: 1 1 auto; padding: 0 6px; font-size: 14px; white-space: nowrap; }
}
@media (min-width: 1024px) {
  .feed { grid-template-columns: minmax(0, 1fr) 360px; }
  .panel-r { display: flex; }
}
@media (min-width: 1360px) {
  .feed { grid-template-columns: 252px minmax(0, 1fr) 400px; }
  .side { display: flex; }
}

/* ================= MODAL ================= */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .25s; }
.modal__sheet { position: relative; width: min(100%, 480px); max-height: 88dvh; overflow: auto; padding: 26px 22px 24px; background: linear-gradient(160deg, #fff, #fff 40%, #ffeef0); border-radius: 22px 22px 0 0; animation: sheet .3s cubic-bezier(.2, .8, .2, 1); font-family: var(--ui); color: #222; }
@media (min-width: 700px) { .modal { align-items: center; } .modal__sheet { border-radius: 22px; } }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.modal__x { position: absolute; right: 14px; top: 10px; font-size: 26px; line-height: 1; color: #777; width: 32px; height: 32px; }
.m-ico { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 8px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ff8a98, #ee4f66); box-shadow: 0 6px 14px rgba(238, 79, 102, .4); }
.m-ico svg { width: 26px; height: 26px; }
.m-title { text-align: center; margin: 0 0 16px; font-size: 17px; font-weight: 600; }
.field { display: block; width: 100%; padding: 11px 13px; margin-bottom: 11px; border: 1px solid #f3b9c2; border-radius: 8px; font: inherit; font-size: 14px; background: #fff; color: #222; }
.field:focus { outline: 2px solid #f6a3af; outline-offset: 0; }
textarea.field { min-height: 92px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.seg { display: flex; gap: 8px; margin-bottom: 11px; }
.seg label { flex: 1; text-align: center; padding: 10px 6px; border: 1px solid #f3b9c2; border-radius: 8px; font-size: 13px; cursor: pointer; }
.seg input { display: none; }
.seg label:has(input:checked) { background: #ffe3e7; border-color: #ee4f66; color: #b0213a; font-weight: 700; }
.btn-pink { display: block; width: 100%; padding: 13px; border-radius: 28px; background: #ed5566; color: #fff; font-size: 15px; font-weight: 600; margin-top: 4px; }
.btn-pink:hover { background: #e24557; }
.btn-ghost { display: block; width: 100%; padding: 11px; border-radius: 28px; border: 1px solid #ed5566; color: #ed5566; font-size: 14px; margin-top: 10px; background: #fff; }
.acct { text-align: center; padding: 14px; border: 1px dashed #f0b3bc; border-radius: 14px; margin-bottom: 12px; background: #fff; }
.acct h4 { margin: 0 0 8px; font-size: 14px; color: #b0213a; }
.acct img { width: 230px; max-width: 85%; margin: 0 auto 8px; border-radius: 8px; background: #f3f3f3; }
.acct p { margin: 2px 0; font-size: 13.5px; }
.acct button { margin-top: 8px; padding: 7px 16px; border-radius: 20px; background: #ffe3e7; color: #b0213a; font-size: 12.5px; }
.qr-box { text-align: center; }
.qr-box img { width: 220px; max-width: 80%; margin: 8px auto; border-radius: 10px; }
.qr-box p { font-size: 13px; color: #666; word-break: break-all; }
.admin-note { font-size: 12px; color: #777; text-align: center; margin-top: 10px; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 14vh; translate: -50% 0; background: rgba(30, 20, 20, .88); color: #fff; padding: 10px 18px; border-radius: 24px; font: 13.5px var(--ui); animation: wishIn .3s; max-width: 88vw; text-align: center; }

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