/* MEOMEO Wedding — giao diện thiệp (dùng chung xem trước + trang thiệp).
   Mỗi mẫu chỉ đổi biến màu/font + vài hoạ tiết: .tpl-<mẫu> */

.iv-card {
  --bg: #fffaf3; --paper: #ffffff; --ink: #3b2a22; --muted: #8a7466; --accent: #a8322d; --accent-2: #d4a24c;
  --line: rgba(168, 50, 45, .18); --on-accent: #fff; --hero-ink: #fff; --shade: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.55));
  --f-head: 'Playfair Display', Georgia, serif; --f-script: 'Great Vibes', cursive; --f-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --radius: 18px;
  position: relative; overflow: hidden; width: 100%; max-width: 480px; margin: 0 auto;
  background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-align: center;
}
.iv-card *, .iv-card *::before, .iv-card *::after { box-sizing: border-box; }
.iv-card img { display: block; max-width: 100%; }
.iv-ico { display: inline-flex; width: 1.1em; height: 1.1em; vertical-align: -0.15em; }
.iv-ico svg, .iv-corner svg, .iv-divider svg, .iv-bl svg, .iv-cal-heart svg, .iv-fx-p svg, .iv-tl-dot svg { width: 100%; height: 100%; display: block; }

/* ---------- hero ---------- */
.iv-hero { position: relative; min-height: 100svh; max-height: 900px; display: flex; align-items: flex-end; justify-content: center; color: var(--hero-ink); background: var(--accent); }
.iv-card.is-preview .iv-hero { min-height: 640px; }
.iv-hero:not(.has-photo) { align-items: center; background: radial-gradient(120% 80% at 50% 0%, var(--accent-2) 0%, var(--accent) 70%); }
.iv-hero-photo { position: absolute; inset: 0; }
.iv-hero-photo img { width: 100%; height: 100%; object-fit: cover; animation: iv-zoom 18s ease-out both; }
.iv-hero-shade { position: absolute; inset: 0; background: var(--shade); }
.iv-hero:not(.has-photo) .iv-hero-shade { display: none; }
.iv-hero-inner { position: relative; padding: 48px 24px 72px; width: 100%; }
.iv-kicker { font-family: var(--f-head); letter-spacing: .32em; text-transform: uppercase; font-size: 12px; opacity: .92; }
.iv-names { font-family: var(--f-script); line-height: 1.1; }
.iv-hero-names { font-size: clamp(44px, 13vw, 64px); margin: 10px 0 14px; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.iv-names .iv-name { display: block; }
.iv-names .iv-amp { display: block; font-size: .55em; opacity: .9; margin: -.05em 0; }
.iv-hero-date { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-head); font-size: 22px; letter-spacing: .08em; }
.iv-hero-date i { width: 1px; height: 22px; background: currentColor; opacity: .6; }
.iv-hero-lunar { font-size: 13px; opacity: .88; margin-top: 6px; }
.iv-scroll-hint { position: absolute; left: 50%; bottom: 18px; width: 22px; height: 34px; margin-left: -11px; border: 2px solid currentColor; border-radius: 12px; opacity: .7; }
.iv-scroll-hint span { position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: currentColor; animation: iv-scroll 1.6s infinite; }
.iv-hy { font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif; font-size: 64px; line-height: 1; color: var(--accent-2); text-shadow: 0 0 24px rgba(255, 215, 120, .45); margin-bottom: 8px; }

/* ---------- section chung ---------- */
.iv-sec { position: relative; padding: 56px 24px; }
.iv-sec + .iv-sec { border-top: 1px solid var(--line); }
.iv-sec-kicker { font-family: var(--f-script); color: var(--accent); font-size: 30px; line-height: 1.2; }
.iv-sec-title { font-family: var(--f-head); font-weight: 700; font-size: 24px; letter-spacing: .04em; text-transform: uppercase; margin: 2px 0 22px; color: var(--ink); }
.iv-text { margin: 16px auto 0; max-width: 34em; color: var(--ink); }
.iv-note { color: var(--muted); font-size: 14px; margin: -8px auto 18px; max-width: 30em; }
.iv-divider { display: block; width: 180px; height: 18px; margin: 22px auto; color: var(--accent-2); }
.iv-reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.iv-reveal.in { opacity: 1; transform: none; }

/* ---------- lời mời ---------- */
.iv-invite { background: var(--paper); margin: 22px 16px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(80, 40, 20, .06); }
.iv-invite + .iv-sec { border-top: 0; }
.iv-corner { position: absolute; width: 54px; height: 54px; color: var(--accent-2); opacity: .9; }
.iv-corner.tl { top: 8px; left: 8px; }
.iv-corner.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.iv-corner.bl { bottom: 8px; left: 8px; transform: scaleY(-1); }
.iv-corner.br { bottom: 8px; right: 8px; transform: scale(-1); }
.iv-fams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; margin-bottom: 18px; }
.iv-fam-label { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: var(--accent); margin-bottom: 4px; }
.iv-fam-name { font-weight: 600; font-size: 14px; }
.iv-fam-addr { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.iv-fam-sep { width: 1px; height: 100%; min-height: 60px; background: var(--line); }
.iv-fam-hy { font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif; color: var(--accent); font-size: 34px; line-height: 1; padding-top: 14px; }
.iv-announce { font-family: var(--f-head); font-style: italic; color: var(--muted); margin: 6px 0 14px; }
.iv-couple { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.iv-person-role { font-size: 12px; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); }
.iv-person-name { font-family: var(--f-script); font-size: clamp(26px, 8vw, 34px); color: var(--accent); line-height: 1.15; }
.iv-couple-amp { font-family: var(--f-script); font-size: 34px; color: var(--accent-2); }
.iv-names-lg { font-size: 54px; color: var(--accent); margin: 6px 0; }
.iv-names-sm { font-size: 34px; color: var(--accent); margin-top: 10px; }
.iv-names-sm .iv-name, .iv-names-sm .iv-amp { display: inline; margin: 0 .15em; }
.iv-age { display: inline-flex; align-items: baseline; gap: 6px; color: var(--accent); font-family: var(--f-head); }
.iv-age span { font-size: 64px; font-weight: 800; line-height: 1; }
.iv-age small { font-size: 18px; }
.iv-guest-label { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.iv-guest-name { font-family: var(--f-script); font-size: 38px; color: var(--accent); line-height: 1.25; padding: 4px 0; border-bottom: 1px dashed var(--line); display: inline-block; min-width: 60%; }
.iv-guest-name.is-empty { opacity: .75; }
.iv-guest-sub { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

/* ---------- sự kiện ---------- */
.iv-event { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; margin: 0 0 16px; box-shadow: 0 6px 20px rgba(80, 40, 20, .05); }
.iv-event-name { font-family: var(--f-head); font-size: 20px; margin: 0 0 10px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.iv-event-time { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ink); }
.iv-event-date { display: flex; flex-direction: column; align-items: center; margin: 6px 0 2px; }
.iv-event-date .iv-wd { font-size: 13px; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }
.iv-event-date b { font-family: var(--f-head); font-size: 30px; color: var(--ink); letter-spacing: .06em; }
.iv-event-lunar { font-size: 13px; color: var(--muted); font-style: italic; }
.iv-event-where { display: flex; gap: 8px; justify-content: center; align-items: flex-start; margin-top: 12px; text-align: left; }
.iv-event-where .iv-ico { color: var(--accent); margin-top: 3px; flex: none; }
.iv-event-where b { display: block; }
.iv-event-where span { color: var(--muted); font-size: 14px; }
.iv-event-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.iv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--accent); color: var(--accent); background: transparent; border-radius: 999px; padding: 9px 18px; font: 600 14px/1.2 var(--f-body); text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, color .2s; }
.iv-btn:hover { transform: translateY(-1px); }
.iv-btn-solid { background: var(--accent); color: var(--on-accent); }
.iv-btn-ghost { border-color: var(--line); color: var(--ink); }
.iv-btn:disabled { opacity: .6; cursor: default; transform: none; }
.iv-cal { margin: 22px auto 0; max-width: 320px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.iv-cal-head { font-family: var(--f-head); font-weight: 700; color: var(--accent); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .1em; }
.iv-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: 13px; }
.iv-cal-w { font-weight: 700; color: var(--muted); font-size: 11px; }
.iv-cal-d { position: relative; height: 32px; display: flex; align-items: center; justify-content: center; }
.iv-cal-d.on b { position: relative; color: #fff; font-weight: 700; }
.iv-cal-heart { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; color: var(--accent); animation: iv-beat 1.4s infinite; }
.iv-countdown { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.iv-cd-cell { width: 66px; padding: 10px 4px; border-radius: 14px; background: var(--accent); color: var(--on-accent); }
.iv-cd-cell b { display: block; font-family: var(--f-head); font-size: 24px; line-height: 1.1; }
.iv-cd-cell span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; opacity: .9; }
.iv-map { margin-top: 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.iv-map iframe { display: block; width: 100%; height: 260px; border: 0; }
.iv-map-load { width: 100%; padding: 16px; border: 0; background: transparent; color: var(--accent); font: 600 14px var(--f-body); cursor: pointer; }

/* ---------- chuyện tình ---------- */
.iv-timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 360px; position: relative; text-align: left; }
.iv-timeline::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.iv-timeline li { position: relative; padding: 0 0 22px 46px; }
.iv-tl-dot { position: absolute; left: 4px; top: 2px; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--accent); color: #fff; }
.iv-tl-date { font-family: var(--f-head); color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: .1em; }
.iv-timeline h3 { margin: 2px 0 4px; font-size: 16px; font-family: var(--f-head); }
.iv-timeline p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- album ---------- */
.iv-album { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.iv-album.n1 { grid-template-columns: 1fr; }
.iv-album.n3 .iv-ph:first-child, .iv-album.n5 .iv-ph:first-child { grid-column: span 2; aspect-ratio: 16/10; }
.iv-ph { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; cursor: zoom-in; background: var(--line); }
.iv-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.iv-ph:hover img { transform: scale(1.04); }
.iv-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 8, 6, .92); display: flex; align-items: center; justify-content: center; }
.iv-lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 8px; }
.iv-lb-close, .iv-lb-nav { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.iv-lb-close { top: 14px; right: 14px; }
.iv-lb-nav.prev { left: 10px; } .iv-lb-nav.next { right: 10px; }
.iv-lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ddd; font: 13px system-ui; }

/* ---------- form ---------- */
.iv-form { display: grid; gap: 12px; text-align: left; max-width: 380px; margin: 0 auto; }
.iv-form input[type=text], .iv-form input[type=tel], .iv-form select, .iv-form textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 12px; padding: 11px 12px; font: 500 15px var(--f-body); outline: none; }
.iv-form input:focus, .iv-form select:focus, .iv-form textarea:focus { border-color: var(--accent); }
.iv-form .iv-btn { justify-self: center; padding: 12px 28px; }
.iv-form-msg { min-height: 1.2em; text-align: center; font-size: 14px; color: var(--accent); }
.iv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- mừng cưới ---------- */
.iv-gift-open .iv-ico { width: 1.3em; height: 1.3em; }
.iv-gift-body { margin-top: 20px; }
.iv-gifts { display: grid; gap: 14px; }
.iv-gift { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.iv-gift-label { font-family: var(--f-head); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.iv-qr { width: 220px; height: 220px; margin: 12px auto; border-radius: 12px; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.iv-qr canvas { display: block; width: 100% !important; height: auto !important; }
.iv-gift-bank { font-weight: 600; }
.iv-gift-acc { font-family: ui-monospace, Menlo, monospace; font-size: 18px; letter-spacing: .06em; }
.iv-gift-holder { color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.iv-copy { margin-top: 10px; }

/* ---------- lời chúc ---------- */
.iv-wish-form { margin-bottom: 20px; }
.iv-wish-list { display: grid; gap: 10px; max-width: 380px; margin: 0 auto; max-height: 420px; overflow: auto; text-align: left; padding: 2px; }
.iv-wish { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.iv-wish b { color: var(--accent); }
.iv-wish p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.iv-wish-empty { text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- kết ---------- */
.iv-closing-photo { width: 200px; height: 260px; margin: 0 auto 18px; border-radius: 120px 120px 16px 16px; overflow: hidden; border: 6px solid var(--paper); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.iv-closing-photo img { width: 100%; height: 100%; object-fit: cover; }
.iv-thank { font-family: var(--f-script); font-size: 52px; color: var(--accent); line-height: 1.1; }
.iv-footer { padding: 26px 20px 40px; font-size: 13px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.iv-footer a { color: var(--accent); font-weight: 600; text-decoration: none; }
.iv-credit { font-size: 11.5px; opacity: .8; }
.iv-report { border: 0; background: none; color: var(--muted); font: 12px var(--f-body); text-decoration: underline; cursor: pointer; opacity: .7; }

/* ---------- hiệu ứng rơi ---------- */
.iv-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.iv-fx-p { position: absolute; top: -40px; width: 14px; height: 14px; transform: scale(var(--s)); animation: iv-fall linear infinite; opacity: .85; }
.iv-fx-petal .iv-fx-p { background: radial-gradient(circle at 30% 30%, #ffd1dc, #f48fb1); border-radius: 80% 0 80% 0; }
.iv-fx-leaf .iv-fx-p { background: linear-gradient(135deg, #a3b18a, #588157); border-radius: 0 80% 0 80%; }
.iv-fx-heart .iv-fx-p { color: #f78fa7; width: 16px; height: 16px; }
.iv-fx-confetti .iv-fx-p { width: 8px; height: 12px; background: var(--c); border-radius: 2px; }
.tpl-song-hy .iv-fx-petal .iv-fx-p { background: radial-gradient(circle at 30% 30%, #ffb3a7, #d84a3a); }

@keyframes iv-fall { 0% { transform: translate3d(0, -40px, 0) rotate(0) scale(var(--s)); } 100% { transform: translate3d(var(--x), 110vh, 0) rotate(540deg) scale(var(--s)); } }
@keyframes iv-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes iv-scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
@keyframes iv-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  .iv-card *, .iv-card *::before, .iv-card *::after { animation: none !important; transition: none !important; }
  .iv-reveal { opacity: 1; transform: none; }
}

/* =================================================================== MẪU */
/* Song Hỷ đỏ vàng truyền thống */
.tpl-song-hy { --bg: #fbf3e4; --paper: #fffaf0; --ink: #4a1d14; --muted: #8b5e4a; --accent: #a3201b; --accent-2: #d9a441; --line: rgba(163, 32, 27, .18);
  background-image: radial-gradient(circle at 20px 20px, rgba(217, 164, 65, .10) 2px, transparent 3px); background-size: 40px 40px; }
.tpl-song-hy .iv-hero:not(.has-photo) { background: radial-gradient(120% 70% at 50% 0%, #c8352c 0%, #8e1612 75%); }
.tpl-song-hy .iv-hero-names { color: #ffe3a3; }
.tpl-song-hy .iv-invite { border: 2px solid var(--accent-2); outline: 1px solid var(--accent-2); outline-offset: -8px; }
.tpl-song-hy .iv-cd-cell { background: linear-gradient(180deg, #b72a22, #8e1612); box-shadow: inset 0 0 0 1px var(--accent-2); }
.tpl-song-hy .iv-btn-solid { background: linear-gradient(180deg, #b72a22, #8e1612); border-color: var(--accent-2); color: #ffe9b8; }

/* Trắng tối giản */
.tpl-toi-gian { --bg: #fbfaf8; --paper: #ffffff; --ink: #2b2b2b; --muted: #8a8580; --accent: #3a3a3a; --accent-2: #b8a68a; --line: rgba(0, 0, 0, .10);
  --f-head: 'Cormorant Garamond', Georgia, serif; --f-script: 'Pinyon Script', cursive; --f-body: 'Cormorant Garamond', Georgia, serif; font-size: 17px; }
.tpl-toi-gian .iv-hero:not(.has-photo) { background: #f1eee9; --hero-ink: #2b2b2b; color: #2b2b2b; }
.tpl-toi-gian .iv-invite { box-shadow: none; border-radius: 4px; }
.tpl-toi-gian .iv-corner { display: none; }
.tpl-toi-gian .iv-sec-title { font-weight: 600; letter-spacing: .3em; font-size: 20px; }
.tpl-toi-gian .iv-event, .tpl-toi-gian .iv-cal, .tpl-toi-gian .iv-gift, .tpl-toi-gian .iv-wish { border-radius: 4px; box-shadow: none; }
.tpl-toi-gian .iv-cd-cell { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; }
.tpl-toi-gian .iv-btn { border-radius: 2px; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }

/* Hoa pastel */
.tpl-hoa-pastel { --bg: #fdf3f1; --paper: #ffffff; --ink: #5a3d43; --muted: #a07f85; --accent: #d07a8c; --accent-2: #9cb59b; --line: rgba(208, 122, 140, .22);
  --f-head: 'Lora', Georgia, serif; --f-script: 'Alex Brush', cursive; --f-body: 'Lora', Georgia, serif;
  background-image: radial-gradient(60% 40% at 0% 0%, rgba(255, 214, 222, .7), transparent), radial-gradient(60% 40% at 100% 60%, rgba(214, 232, 212, .6), transparent); }
.tpl-hoa-pastel .iv-hero:not(.has-photo) { background: linear-gradient(160deg, #f7c9d2, #f3e1d6 55%, #d5e5d2); --hero-ink: #6a3f4a; color: #6a3f4a; }
.tpl-hoa-pastel .iv-invite { border-radius: 28px; }
.tpl-hoa-pastel .iv-corner { color: #e6a3b1; }

/* Xanh lá vintage */
.tpl-vintage { --bg: #f2ede1; --paper: #fbf8f0; --ink: #33402c; --muted: #7d8a70; --accent: #5d7350; --accent-2: #b39b6b; --line: rgba(93, 115, 80, .22);
  --f-head: 'Cormorant Garamond', Georgia, serif; --f-script: 'Imperial Script', cursive; --f-body: 'Lora', Georgia, serif;
  background-image: repeating-linear-gradient(0deg, rgba(120, 100, 60, .03) 0 2px, transparent 2px 4px); }
.tpl-vintage .iv-hero:not(.has-photo) { background: radial-gradient(120% 80% at 50% 0%, #7f9670, #4a5e3f 80%); }
.tpl-vintage .iv-sec-title { font-weight: 700; }
.tpl-vintage .iv-invite { border-style: double; border-width: 4px; border-color: var(--line); }

/* Hồng đào — đám hỏi */
.tpl-hong-dao { --bg: #fff4f0; --paper: #ffffff; --ink: #5b2f2f; --muted: #a9726c; --accent: #e0707a; --accent-2: #e8b45c; --line: rgba(224, 112, 122, .22);
  --f-head: 'Playfair Display', Georgia, serif; --f-script: 'Dancing Script', cursive; --f-body: 'Be Vietnam Pro', system-ui, sans-serif; }
.tpl-hong-dao .iv-hero:not(.has-photo) { background: linear-gradient(170deg, #f59aa0, #f7c5a8); }
.tpl-hong-dao .iv-names, .tpl-hong-dao .iv-person-name, .tpl-hong-dao .iv-guest-name { font-weight: 700; }

/* Bóng bay — sinh nhật */
.tpl-bong-bay { --bg: #fffaf0; --paper: #ffffff; --ink: #3d3357; --muted: #8a7fa8; --accent: #ff6b8b; --accent-2: #ffc94d; --line: rgba(124, 92, 255, .18);
  --f-head: 'Baloo 2', system-ui, sans-serif; --f-script: 'Pacifico', cursive; --f-body: 'Nunito', system-ui, sans-serif; --radius: 22px;
  background-image: radial-gradient(circle at 10% 20%, rgba(255, 201, 77, .18) 0 40px, transparent 41px), radial-gradient(circle at 90% 70%, rgba(124, 92, 255, .12) 0 60px, transparent 61px); }
.tpl-bong-bay .iv-hero:not(.has-photo) { background: linear-gradient(160deg, #7c5cff, #ff6b8b 60%, #ffc94d); }
.tpl-bong-bay .iv-sec-title { text-transform: none; letter-spacing: 0; font-size: 28px; font-weight: 800; }
.tpl-bong-bay .iv-sec-kicker { font-size: 24px; }
.tpl-bong-bay .iv-cd-cell:nth-child(2) { background: #7c5cff; } .tpl-bong-bay .iv-cd-cell:nth-child(3) { background: #ffb020; } .tpl-bong-bay .iv-cd-cell:nth-child(4) { background: #12b5a5; }
.iv-balloons { position: relative; height: 90px; margin-bottom: 4px; }
.iv-bl { position: absolute; width: 44px; height: 80px; animation: iv-float 4s ease-in-out infinite; }
.iv-bl.b1 { left: calc(50% - 70px); color: #ffd166; } .iv-bl.b2 { left: calc(50% - 22px); top: -10px; color: #ff8fab; animation-delay: -1.3s; } .iv-bl.b3 { left: calc(50% + 26px); color: #8ecae6; animation-delay: -2.6s; }
@keyframes iv-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }

/* Thư mời đích danh (thay cho form xác nhận tham dự) */
.iv-guestinv { padding-top: 34px; padding-bottom: 30px; }
.iv-guestinv .iv-sec-kicker { margin-bottom: 14px; }
.iv-guestinv .iv-guest-name { font-size: 42px; margin: 6px 0 4px; }
.iv-guestinv .iv-guest-sub { margin: 10px auto 16px; max-width: 26em; font-size: 15px; color: var(--ink); }
.iv-gi-when { font-size: 16px; font-weight: 600; color: var(--ink); }
.iv-gi-lunar { font-size: 13.5px; color: var(--muted); margin-top: 2px; font-style: italic; }
.iv-gi-where { display: grid; gap: 2px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.iv-gi-where b { font-size: 16px; color: var(--accent); }
.iv-gi-honor { margin: 6px auto 0; max-width: 24em; font-size: 14.5px; font-style: italic; color: var(--muted); }

/* =================================================================== MẪU MỚI */
/* Hiệu ứng kim tuyến lấp lánh */
.iv-fx-sparkle .iv-fx-p { width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle, #fff8dc 0%, var(--accent-2) 60%, transparent 70%); box-shadow: 0 0 8px var(--accent-2); animation: iv-fall linear infinite, iv-twinkle var(--tw, 1.6s) ease-in-out infinite; }
@keyframes iv-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* Navy hoàng gia */
.tpl-hoang-gia { --bg: #f4f1ea; --paper: #fffdf8; --ink: #1f2a44; --muted: #6b7389; --accent: #1f2a44; --accent-2: #c9a45c; --line: rgba(31, 42, 68, .16);
  --f-head: 'Playfair Display', Georgia, serif; --f-script: 'Corinthia', cursive; --f-body: 'Lora', Georgia, serif;
  background-image: linear-gradient(45deg, rgba(201, 164, 92, .06) 25%, transparent 25%, transparent 75%, rgba(201, 164, 92, .06) 75%); background-size: 28px 28px; }
.tpl-hoang-gia .iv-hero:not(.has-photo) { background: radial-gradient(120% 80% at 50% 0%, #34436b 0%, #141c33 80%); }
.tpl-hoang-gia .iv-hero-names { color: #f1d9a0; font-weight: 700; }
.tpl-hoang-gia .iv-names, .tpl-hoang-gia .iv-person-name, .tpl-hoang-gia .iv-guest-name { font-weight: 700; }
.tpl-hoang-gia .iv-invite { border: 1px solid var(--accent-2); outline: 3px double var(--accent-2); outline-offset: -9px; }
.tpl-hoang-gia .iv-corner, .tpl-hoang-gia .iv-divider { color: var(--accent-2); }
.tpl-hoang-gia .iv-cd-cell { background: #1f2a44; box-shadow: inset 0 0 0 1px var(--accent-2); color: #f1d9a0; }
.tpl-hoang-gia .iv-btn-solid { background: #1f2a44; border-color: var(--accent-2); color: #f1d9a0; }

/* Tím oải hương */
.tpl-lavender { --bg: #f7f4fb; --paper: #ffffff; --ink: #3f3555; --muted: #8a80a0; --accent: #8e7cc3; --accent-2: #a9c49a; --line: rgba(142, 124, 195, .22);
  --f-head: 'Cormorant Garamond', Georgia, serif; --f-script: 'Allura', cursive; --f-body: 'Lora', Georgia, serif;
  background-image: radial-gradient(50% 35% at 100% 0%, rgba(201, 187, 240, .55), transparent), radial-gradient(50% 35% at 0% 80%, rgba(206, 226, 196, .5), transparent); }
.tpl-lavender .iv-hero:not(.has-photo) { background: linear-gradient(160deg, #d9cff0, #efe9f7 55%, #dfe9d6); --hero-ink: #4b3f66; color: #4b3f66; }
.tpl-lavender .iv-invite { border-radius: 26px; }
.tpl-lavender .iv-corner { color: #b3a5dd; }
.tpl-lavender .iv-fx-petal .iv-fx-p { background: radial-gradient(circle at 30% 30%, #e6defa, #9d8bd1); }

/* Biển xanh */
.tpl-bien-xanh { --bg: #f3f8f8; --paper: #ffffff; --ink: #1e3f46; --muted: #6f8f94; --accent: #2a7f8f; --accent-2: #e3c99a; --line: rgba(42, 127, 143, .18);
  --f-head: 'Josefin Sans', system-ui, sans-serif; --f-script: 'Ephesis', cursive; --f-body: 'Mulish', system-ui, sans-serif;
  background-image: repeating-radial-gradient(circle at 50% 120%, rgba(42, 127, 143, .05) 0 6px, transparent 6px 22px); }
.tpl-bien-xanh .iv-hero:not(.has-photo) { background: linear-gradient(180deg, #8fd0d6 0%, #3d97a5 55%, #2a7f8f 78%, #e3c99a 78.5%, #f1e2c2 100%); }
.tpl-bien-xanh .iv-sec-title, .tpl-bien-xanh .iv-kicker { letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.tpl-bien-xanh .iv-invite { border-radius: 8px; }

/* Thu vàng */
.tpl-thu-vang { --bg: #faf3ea; --paper: #fffaf2; --ink: #4a1f22; --muted: #93705f; --accent: #7a2430; --accent-2: #d29a3a; --line: rgba(122, 36, 48, .18);
  --f-head: 'EB Garamond', Georgia, serif; --f-script: 'Italianno', cursive; --f-body: 'EB Garamond', Georgia, serif; font-size: 16.5px;
  background-image: radial-gradient(40% 30% at 0% 0%, rgba(210, 154, 58, .18), transparent), radial-gradient(40% 30% at 100% 100%, rgba(122, 36, 48, .1), transparent); }
.tpl-thu-vang .iv-hero:not(.has-photo) { background: radial-gradient(120% 80% at 50% 0%, #b4532f 0%, #7a2430 75%); }
.tpl-thu-vang .iv-hero-names { color: #ffdca0; }
.tpl-thu-vang .iv-hero-names { font-size: clamp(52px, 15vw, 74px); }
.tpl-thu-vang .iv-guestinv .iv-guest-name { font-size: 50px; }
.tpl-thu-vang .iv-sec-kicker { font-size: 36px; }
.tpl-thu-vang .iv-fx-leaf .iv-fx-p { background: linear-gradient(135deg, #e9a23b, #a8432c); }
.tpl-thu-vang .iv-invite { border: 1px solid var(--accent-2); }

/* Đen ánh kim (nền tối) */
.tpl-den-vang { --bg: #131211; --paper: #1d1b18; --ink: #efe6d2; --muted: #b0a68f; --accent: #d4af6a; --accent-2: #8c6d32; --on-accent: #1a1712; --line: rgba(212, 175, 106, .28);
  --f-head: 'Prata', Georgia, serif; --f-script: 'Bonheur Royale', cursive; --f-body: 'Spectral', Georgia, serif;
  background-image: radial-gradient(70% 40% at 50% 0%, rgba(212, 175, 106, .10), transparent); }
.tpl-den-vang .iv-hero:not(.has-photo) { background: radial-gradient(120% 80% at 50% 10%, #2c2720 0%, #0b0b0a 80%); }
.tpl-den-vang .iv-hero-names { color: #e8c983; }
.tpl-den-vang .iv-sec-kicker, .tpl-den-vang .iv-guest-name, .tpl-den-vang .iv-names { color: #e8c983; }
.tpl-den-vang .iv-invite { border: 1px solid rgba(212, 175, 106, .5); box-shadow: none; }
.tpl-den-vang .iv-corner, .tpl-den-vang .iv-divider { color: var(--accent); }
.tpl-den-vang .iv-cd-cell { background: transparent; border: 1px solid var(--accent); color: #e8c983; }
.tpl-den-vang .iv-event, .tpl-den-vang .iv-cal, .tpl-den-vang .iv-gift, .tpl-den-vang .iv-wish { box-shadow: none; }
.tpl-den-vang input, .tpl-den-vang textarea { color: var(--ink); background: #26231f; }

/* Đỏ son hiện đại */
.tpl-do-son { --bg: #ffffff; --paper: #fff6f4; --ink: #2a1214; --muted: #8c6b6d; --accent: #c8102e; --accent-2: #f0b9b4; --line: rgba(200, 16, 46, .14);
  --f-head: 'Montserrat', system-ui, sans-serif; --f-script: 'Moon Dance', cursive; --f-body: 'Montserrat', system-ui, sans-serif; font-size: 14.5px; }
.tpl-do-son .iv-hero:not(.has-photo) { background: #c8102e; }
.tpl-do-son .iv-sec-title { text-transform: uppercase; letter-spacing: .22em; font-size: 18px; font-weight: 600; }
.tpl-do-son .iv-hero-names { font-size: clamp(50px, 14.5vw, 70px); }
.tpl-do-son .iv-guestinv .iv-guest-name { font-size: 48px; }
.tpl-do-son .iv-sec-kicker { font-size: 34px; }
.tpl-do-son .iv-invite { border-radius: 0; box-shadow: none; border: 0; border-top: 3px solid var(--accent); border-bottom: 3px solid var(--accent); }
.tpl-do-son .iv-corner { display: none; }
.tpl-do-son .iv-btn { border-radius: 0; text-transform: uppercase; letter-spacing: .1em; font-size: 12.5px; }
.tpl-do-son .iv-cd-cell { border-radius: 0; }

/* Kẹo ngọt — sinh nhật */
.tpl-keo-ngot { --bg: #fff8fb; --paper: #ffffff; --ink: #4a3550; --muted: #9a84a3; --accent: #ff7aa8; --accent-2: #7fd3c6; --line: rgba(255, 122, 168, .22);
  --f-head: 'Baloo 2', system-ui, sans-serif; --f-script: 'Lobster', cursive; --f-body: 'Quicksand', system-ui, sans-serif; --radius: 24px;
  background-image: radial-gradient(circle at 12% 18%, rgba(127, 211, 198, .25) 0 26px, transparent 27px), radial-gradient(circle at 88% 52%, rgba(255, 214, 102, .3) 0 34px, transparent 35px), radial-gradient(circle at 20% 86%, rgba(255, 122, 168, .18) 0 30px, transparent 31px); }
.tpl-keo-ngot .iv-hero:not(.has-photo) { background: linear-gradient(160deg, #ffc2da, #ffe9a8 50%, #b8ece3); --hero-ink: #6a3d6f; color: #6a3d6f; }
.tpl-keo-ngot .iv-sec-title { text-transform: none; letter-spacing: 0; font-size: 28px; font-weight: 800; }
.tpl-keo-ngot .iv-cd-cell:nth-child(2) { background: #7fd3c6; } .tpl-keo-ngot .iv-cd-cell:nth-child(3) { background: #ffc94d; color: #4a3550; } .tpl-keo-ngot .iv-cd-cell:nth-child(4) { background: #b49cff; }

/* Vũ trụ lấp lánh — sinh nhật (nền tối) */
.tpl-vu-tru { --bg: #14173a; --paper: #1d2150; --ink: #eef0ff; --muted: #a9aee0; --accent: #7c6cff; --accent-2: #ffd166; --line: rgba(169, 174, 224, .22);
  --f-head: 'Lexend', system-ui, sans-serif; --f-script: 'Meow Script', cursive; --f-body: 'Nunito', system-ui, sans-serif; --radius: 20px;
  background-image: radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 90px 80px, #ffe7a3, transparent), radial-gradient(1.5px 1.5px at 150px 40px, #cfd3ff, transparent), radial-gradient(1px 1px at 60px 140px, #fff, transparent);
  background-size: 180px 180px; }
.tpl-vu-tru .iv-hero:not(.has-photo) { background: radial-gradient(90% 60% at 70% 20%, #4b3fb0 0%, #1b1d55 55%, #0b0d28 100%); }
.tpl-vu-tru .iv-hero-names, .tpl-vu-tru .iv-sec-kicker, .tpl-vu-tru .iv-guest-name { color: #ffd166; }
.tpl-vu-tru .iv-sec-title { text-transform: none; letter-spacing: 0; font-weight: 700; }
.tpl-vu-tru input, .tpl-vu-tru textarea { color: var(--ink); background: #262b63; }

/* =================================================================== MÀU TUỲ CHỈNH */
.iv-card.has-color .iv-hero:not(.has-photo) { background: radial-gradient(120% 80% at 50% 0%, var(--accent-2) 0%, var(--accent) 72%); --hero-ink: var(--c-hero-ink, #fff); color: var(--c-hero-ink, #fff); }
/* Màu chữ trên ảnh bìa do người dùng chọn thắng màu riêng của mẫu */
.iv-card.has-heroink .iv-hero, .iv-card.has-heroink .iv-hero-names { --hero-ink: var(--c-hero-ink); color: var(--c-hero-ink) !important; }
.iv-card.has-color .iv-hero-names { color: inherit; }
.iv-card.has-color .iv-sec-kicker, .iv-card.has-color .iv-guest-name { color: var(--accent); }
.iv-card.has-color .iv-cd-cell { background: var(--accent); color: var(--on-accent); box-shadow: none; border: 0; }
.iv-card.has-color .iv-btn-solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.iv-card.has-color .iv-corner, .iv-card.has-color .iv-divider { color: var(--accent-2); }
.iv-card.has-color .iv-fx-petal .iv-fx-p, .iv-card.has-color .iv-fx-leaf .iv-fx-p { background: radial-gradient(circle at 30% 30%, var(--accent-2), var(--accent)); }
