/* QuUndangin - Gaya dasar halaman undangan. Warna & huruf diambil dari variabel tema (themes/{slug}/style.css). */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.inv-root {
  --inv-bg: #fff7fa; --inv-surface: #fff; --inv-primary: #b5217a; --inv-accent: #ee7fb3;
  --inv-text: #34202b; --inv-muted: #7d6672;
  --inv-font-head: 'Cormorant Garamond', Georgia, serif; --inv-font-script: 'Great Vibes', cursive;
  --inv-font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  margin: 0; background: var(--inv-bg); color: var(--inv-text); font-family: var(--inv-font-body);
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.inv-root.inv-locked { overflow: hidden; height: 100vh; }
.inv-root.inv-protect { -webkit-user-select: none; user-select: none; }
.inv-root img { max-width: 100%; display: block; }
.inv-main { max-width: 520px; margin: 0 auto; padding: 0 14px 120px; overflow-x: clip; }
.inv-section { padding: 28px 0; opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.inv-section.is-in { opacity: 1; transform: none; }
.inv-card { background: var(--inv-surface); border-radius: 22px; padding: 30px 22px; text-align: center;
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.35); position: relative; }
.inv-title { font-family: var(--inv-font-head); font-size: 1.7rem; font-weight: 600; color: var(--inv-primary); margin: 0 0 14px; }
.inv-script { font-family: var(--inv-font-script); font-weight: 400; color: var(--inv-primary); margin: 0; line-height: 1.2; }
.inv-big { font-size: 2.6rem; }
.inv-kicker { letter-spacing: .25em; text-transform: uppercase; font-size: .72rem; color: var(--inv-muted); margin: 0 0 8px; }
.inv-muted { color: var(--inv-muted); font-size: .92rem; }
.inv-date { font-family: var(--inv-font-head); font-size: 1.2rem; font-weight: 600; margin: 8px 0; }
.inv-quote { font-style: italic; color: var(--inv-muted); margin: 16px auto 0; max-width: 420px; }
.inv-ornament { color: var(--inv-accent); font-size: 1rem; margin-bottom: 10px; min-height: 1em; }
.inv-ornament::before { content: '❦'; }

.inv-btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; border: 0; cursor: pointer;
  background: var(--inv-primary); color: var(--inv-surface); font: 600 .92rem var(--inv-font-body); padding: 11px 20px;
  border-radius: 999px; text-decoration: none; transition: transform .15s ease, opacity .15s; }
.inv-btn:hover { transform: translateY(-1px); }
.inv-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.inv-btn-ghost { background: transparent; color: var(--inv-primary); box-shadow: inset 0 0 0 1.5px var(--inv-primary); }
.inv-btn:focus-visible, .inv-link:focus-visible, .inv-fab-btn:focus-visible { outline: 3px solid var(--inv-accent); outline-offset: 2px; }
.inv-link { background: none; border: 0; color: var(--inv-primary); font: 600 .88rem var(--inv-font-body); cursor: pointer; margin-top: 14px; }
.inv-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

/* S00 Cover */
.inv-cover { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center; padding: 24px;
  background: var(--inv-bg); background-image: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.45)), var(--cover-img, none);
  background-size: cover; background-position: center; transition: transform 1s ease, opacity 1s ease; }
.inv-cover:not([style]) { background-image: none; }
.inv-cover[style] .inv-script, .inv-cover[style] .inv-kicker, .inv-cover[style] .inv-to { color: #fff; }
.inv-cover .inv-script { font-size: 3rem; margin: 4px 0 18px; }
.inv-cover.is-open { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.inv-to { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; color: var(--inv-muted); font-size: .9rem; }
.inv-to strong { font-size: 1.25rem; color: inherit; font-family: var(--inv-font-head); }
.inv-cover[style] .inv-to strong { color: #fff; }

/* S01 hero dengan foto cover */
.inv-hero[style] { background-image: linear-gradient(rgba(255,255,255,.82), rgba(255,255,255,.9)), var(--cover-img); background-size: cover; background-position: center; }

/* S02 hitung mundur */
.inv-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.inv-countdown div { background: color-mix(in srgb, var(--inv-accent) 22%, var(--inv-surface)); border-radius: 14px; padding: 12px 4px; }
.inv-countdown b { display: block; font: 700 1.6rem var(--inv-font-head); color: var(--inv-primary); }
.inv-countdown span { font-size: .72rem; color: var(--inv-muted); text-transform: uppercase; letter-spacing: .08em; }

/* S03 mempelai */
.inv-couple { display: grid; gap: 10px; }
.inv-person h4 { font-size: 2rem; margin-top: 10px; }
.inv-fullname { font-weight: 700; margin: 2px 0; }
.inv-photo { width: 150px; height: 190px; margin: 0 auto; border-radius: 999px 999px 20px 20px; overflow: hidden;
  background: color-mix(in srgb, var(--inv-accent) 35%, var(--inv-surface)); display: grid; place-items: center; border: 3px solid var(--inv-accent); }
.inv-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; } /* bingkai foto mempelai: wajah (bagian atas) tetap terlihat */
.inv-photo span { font: 700 3rem var(--inv-font-head); color: var(--inv-primary); }
.inv-amp { font-size: 3rem; }

/* S04 acara */
.inv-events { display: grid; gap: 14px; }
.inv-event { border: 1px dashed color-mix(in srgb, var(--inv-accent) 70%, transparent); border-radius: 18px; padding: 18px 14px; }
.inv-event h4 { font-family: var(--inv-font-head); font-size: 1.45rem; color: var(--inv-primary); margin: 0 0 6px; }
.inv-event p { margin: 4px 0; }
.inv-venue { font-weight: 700; }
.inv-live { margin-top: 14px; }

/* S05 kisah & galeri */
.inv-timeline { list-style: none; padding: 0 0 0 18px; margin: 0 0 18px; text-align: left; border-left: 2px solid var(--inv-accent); }
.inv-timeline li { position: relative; padding: 0 0 16px 14px; }
.inv-timeline li::before { content: ''; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--inv-primary); }
.inv-timeline h4 { margin: 0; font-family: var(--inv-font-head); font-size: 1.2rem; }
.inv-timeline p { margin: 4px 0 0; color: var(--inv-muted); }
.inv-year { font-size: .75rem; font-weight: 700; color: var(--inv-primary); letter-spacing: .1em; }
/* Galeri: foto tampil UTUH (tidak dipotong) — susunan bata/masonry mengikuti bentuk asli tiap foto */
.inv-gallery { display: block; columns: 2; column-gap: 8px; }
.inv-gal-item { display: block; width: 100%; margin: 0 0 8px; break-inside: avoid; border: 0; padding: 0; cursor: zoom-in; overflow: hidden; border-radius: 10px; background: none; }
.inv-gal-item img { display: block; width: 100%; height: auto; }
.inv-gallery.is-placeholder span { display: block; break-inside: avoid; margin-bottom: 8px; aspect-ratio: 1; border-radius: 10px; background: color-mix(in srgb, var(--inv-accent) 30%, var(--inv-surface)); }
.inv-gallery.is-placeholder span:nth-child(3n+2) { aspect-ratio: 3 / 4; }
.inv-gallery.is-few { columns: 1; max-width: 420px; margin-inline: auto; }
.inv-video { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.inv-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* S06 catatan */
.inv-notes { list-style: none; padding: 0; margin: 0; text-align: left; display: grid; gap: 8px; }
.inv-notes i { color: var(--inv-primary); }

/* Formulir RSVP & ucapan */
.inv-form { display: grid; gap: 12px; text-align: left; }
.inv-form label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.inv-form input[type=text], .inv-form textarea, .inv-form select { width: 100%; padding: 11px 13px; border-radius: 12px; font: inherit;
  border: 1px solid color-mix(in srgb, var(--inv-muted) 40%, transparent); background: var(--inv-bg); color: var(--inv-text); }
.inv-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-radio label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--inv-primary) 40%, transparent); font-weight: 500; cursor: pointer; }
.inv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.inv-wishes { margin-top: 18px; display: grid; gap: 10px; max-height: 360px; overflow-y: auto; text-align: left; }
.inv-wish { background: var(--inv-bg); border-radius: 14px; padding: 10px 14px; }
.inv-wish p { margin: 2px 0 0; color: var(--inv-muted); font-size: .9rem; word-wrap: break-word; }

/* S09/S10/S11 */
.inv-qr { width: 220px; height: 220px; margin: 12px auto; background: #fff; padding: 10px; border-radius: 14px; }
.inv-qr img, .inv-qr svg { width: 100%; height: 100%; }
.inv-qr-name { font-weight: 700; }
.inv-gifts { display: grid; gap: 12px; }
.inv-gift { display: grid; gap: 4px; justify-items: center; padding: 16px; border-radius: 16px; background: var(--inv-bg); }
.inv-gift img { max-width: 220px; border-radius: 10px; }
.inv-acc { font: 700 1.25rem var(--inv-font-head); letter-spacing: .06em; }

/* S12 & footer */
.inv-closing p { max-width: 420px; margin-left: auto; margin-right: auto; }
.inv-footer { text-align: center; padding: 30px 16px 110px; color: var(--inv-muted); }
.inv-footer .inv-script { font-size: 1.8rem; }
.inv-credit { display: grid; justify-items: center; gap: 8px; margin-top: 14px; }
.inv-credit-badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border-radius: 999px; background: rgba(255, 255, 255, .92);
  color: #3a2430; text-decoration: none; box-shadow: 0 8px 22px -12px rgba(0, 0, 0, .45); border: 1px solid rgba(214, 51, 108, .18); transition: transform .25s, box-shadow .25s; }
.inv-credit-badge:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .5); }
.inv-credit-badge img { width: 34px; height: 34px; border-radius: 50%; background: #fff; object-fit: contain; }
.inv-credit-txt { display: grid; text-align: left; line-height: 1.15; }
.inv-credit-txt > span { font-size: .7rem; color: #7a6470; letter-spacing: .02em; }
.inv-credit-txt strong { font-size: .95rem; color: #c2185b; font-weight: 800; letter-spacing: .01em; }
.inv-heart { color: #e11d48; display: inline-block; animation: invBeat 1.6s ease-in-out infinite; font-weight: 400; }
@keyframes invBeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
.inv-credit-cta { font-size: .74rem; color: var(--inv-muted); text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .inv-heart { animation: none; } }

/* NAV menu melayang & musik */
.inv-fab { position: fixed; right: 14px; bottom: 18px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.inv-fab-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; background: var(--inv-primary); color: var(--inv-surface);
  font-size: 1.3rem; box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); }
.inv-fab-btn.is-playing i { animation: inv-spin 3s linear infinite; }
.inv-nav { background: var(--inv-surface); border-radius: 16px; padding: 8px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); display: grid; max-height: 60vh; overflow-y: auto; }
.inv-nav a { color: var(--inv-text); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: .88rem; white-space: nowrap; }
.inv-nav a:hover { background: var(--inv-bg); }
@keyframes inv-spin { to { transform: rotate(360deg); } }

/* P01 halaman terima kasih */
.inv-thanks { position: fixed; inset: 0; z-index: 60; background: var(--inv-bg); display: grid; place-items: center; padding: 24px; text-align: center; }
.inv-thanks-box { max-width: 420px; display: grid; gap: 14px; justify-items: center; }
.inv-thanks-box .inv-script { font-size: 2.6rem; }
.inv-promo { display: block; padding: 12px 16px; border-radius: 14px; background: var(--inv-surface); color: var(--inv-primary); font-weight: 700; text-decoration: none;
  border: 1px dashed var(--inv-accent); }

/* Lightbox, toast, pratinjau */
.inv-lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.9); display: grid; place-items: center; padding: 16px; }
.inv-lightbox img { max-width: 100%; max-height: 90vh; width: auto; height: auto; object-fit: contain; border-radius: 10px; }
.inv-lb-close { position: absolute; top: 12px; right: 16px; font-size: 2rem; color: #fff; background: none; border: 0; cursor: pointer; }
.inv-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px); background: var(--inv-text); color: var(--inv-surface);
  padding: 10px 18px; border-radius: 999px; font-size: .88rem; opacity: 0; transition: .3s; z-index: 80; pointer-events: none; max-width: 90vw; text-align: center; }
.inv-toast.show { opacity: 1; transform: translateX(-50%); }
.inv-watermark { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: flex; flex-wrap: wrap; gap: 60px 40px; padding: 30px;
  transform: rotate(-24deg) scale(1.4); opacity: .12; overflow: hidden; }
.inv-watermark span { font: 800 1.1rem var(--inv-font-body); color: #000; white-space: nowrap; }
.inv-preview-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 95; background: #34202b; color: #fff; text-align: center; font-size: .78rem; padding: 6px 10px; }

@media (min-width: 600px) { .inv-couple { grid-template-columns: 1fr auto 1fr; align-items: center; } .inv-gallery { columns: 3; } .inv-gallery.is-few { columns: 1; } }
@media (prefers-reduced-motion: reduce) {
  .inv-section { opacity: 1; transform: none; transition: none; }
  .inv-cover, .env-flap, .env-letter, .inv-envelope { transition: none; }
  .inv-fab-btn.is-playing i { animation: none; }
}
@media print { .inv-cover, .inv-fab, .inv-watermark { display: none; } .inv-root.inv-locked { overflow: visible; height: auto; } }
.inv-preview-bar a { color: #ffd1e6; margin: 0 4px; }
.inv-preview-bar.is-final { background: #065f46; transition: transform .4s ease, opacity .4s; }
.inv-preview-bar.is-final.is-gone { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.inv-preview-bar a[aria-current] { color: #fff; font-weight: 700; text-decoration: none; border-bottom: 2px solid #ee7fb3; }
[data-mode="demo"] .inv-main, [data-mode="preview"] .inv-main { padding-top: 34px; }

/* Pembungkus isi cover & tombol buka */
.inv-cover-inner { width: 100%; max-width: 460px; margin-inline: auto; }
.inv-open { margin-top: 4px; }


/* =====================================================================
   SLOT LAYER UNTUK TEMA (kosong & tak terlihat sampai diisi CSS tema)
   - .inv-page-layers > i.l1..l4       : latar seluruh halaman (menempel/fixed)
   - .inv-layers.back  > i.l1..l4      : di belakang isi section / cover
   - .inv-layers.front > i.l1..l2      : di depan isi section
   Semua layer tidak bisa diklik, jadi tidak pernah menghalangi tombol & formulir.
   ===================================================================== */
.inv-page-layers { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none !important; }
.inv-main, .inv-footer { position: relative; z-index: 1; }
.inv-section { position: relative; isolation: isolate; }
.inv-layers { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none !important; }
.inv-layers.front { z-index: 3; }
.inv-section > :not(.inv-layers), .inv-cover-inner { position: relative; z-index: 1; }
.inv-page-layers > i, .inv-layers > i { position: absolute; inset: 0; display: block; background-repeat: no-repeat; pointer-events: none !important; }
.inv-page-layers *, .inv-layers * { pointer-events: none !important; }

/* Hormati pengaturan "kurangi gerakan" di HP tamu: animasi tema otomatis berhenti */
@media (prefers-reduced-motion: reduce) {
  .inv-root *, .inv-root *::before, .inv-root *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* =====================================================================
   TATA LETAK RESPONSIF: HP (bawaan) · tablet (≥640px) · desktop (≥1100px)
   Desktop: panel hiasan kiri (.inv-aside) menempel, isi undangan di kanan.
   ===================================================================== */
.inv-hero[style] { background-image: linear-gradient(color-mix(in srgb, var(--inv-surface) 84%, transparent), color-mix(in srgb, var(--inv-surface) 93%, transparent)), var(--cover-img); }
.inv-aside { display: none; }
@media (min-width: 640px) {
  /* kotak .inv-main selebar layar (isi tetap ±612px di tengah) agar hiasan & pita tema bisa sampai tepi kiri-kanan tanpa terpotong */
  .inv-main { max-width: none; padding-left: max(24px, calc((100% - 612px) / 2)); padding-right: max(24px, calc((100% - 612px) / 2)); }
  .inv-section { padding: 34px 0; }
  .inv-card { padding: 42px 40px; }
  .inv-gifts { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
  .inv-photo { width: 170px; height: 216px; }
}
@media (min-width: 820px) {
  .inv-events { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}
@media (min-width: 1100px) {
  .inv-aside { display: grid; place-items: center; position: fixed; top: 0; bottom: 0; left: 0; width: 42vw; z-index: 2; overflow: hidden;
    padding: 56px 48px; text-align: center; background: var(--inv-surface);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 70px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 70px), transparent); }
  .inv-aside[style] { background-image: linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.55)), var(--cover-img); background-size: cover; background-position: center; }
  .inv-aside[style] .inv-kicker, .inv-aside[style] .inv-script, .inv-aside[style] .inv-aside-date, .inv-aside[style] .inv-aside-hint { color: #fff; }
  .inv-aside-inner { position: relative; z-index: 1; max-width: 460px; }
  .inv-aside-names { font-size: clamp(3.2rem, 5.4vw, 5.4rem); margin: 6px 0 14px; }
  .inv-aside-date { font: 600 1.25rem var(--inv-font-head); letter-spacing: .08em; margin: 0 0 30px; }
  .inv-aside-hint { font-size: .8rem; color: var(--inv-muted); letter-spacing: .12em; text-transform: uppercase; margin: 0; }
  .inv-main, .inv-footer { margin-left: 42vw; max-width: none; padding-left: max(36px, calc((58vw - 660px) / 2)); padding-right: max(36px, calc((58vw - 660px) / 2)); }
  .inv-toast { left: 71vw; }
  .inv-section { padding: 40px 0; }
}

/* Cover: isi selalu bisa digulir di layar pendek (tombol Buka tidak pernah terpotong) */
.inv-cover { display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.inv-cover-inner { margin: auto; }

/* =====================================================================
   MENU IKON DI BAWAH (NAV) — muncul setelah undangan dibuka, bisa disembunyikan tamu
   ===================================================================== */
.inv-dock { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 41; display: flex; align-items: center; gap: 8px;
  translate: -50% 0; transition: translate .5s cubic-bezier(.2, .8, .2, 1), opacity .4s; max-width: calc(100vw - 20px); }
.inv-root.inv-locked .inv-dock { translate: -50% 160%; opacity: 0; pointer-events: none; }
.inv-dock-bar { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 6px; border-radius: 22px; max-width: 560px;
  background: color-mix(in srgb, var(--inv-surface) 90%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--inv-accent) 45%, transparent); box-shadow: 0 16px 36px -16px rgba(0, 0, 0, .5);
  transition: max-width .45s ease, opacity .3s ease, padding .3s ease; }
.inv-dock-bar::-webkit-scrollbar { display: none; }
.inv-dock-bar a { flex: 0 0 auto; display: grid; justify-items: center; gap: 3px; min-width: 54px; padding: 7px 6px 6px; border-radius: 16px;
  color: var(--inv-muted); text-decoration: none; font: 600 .62rem/1 var(--inv-font-body); letter-spacing: .02em; transition: background .25s, color .25s; }
.inv-dock-bar a i { font-size: 1.15rem; line-height: 1; transition: transform .25s; }
.inv-dock-bar a:hover i { transform: translateY(-2px); }
.inv-dock-bar a.is-active { background: var(--inv-primary); color: var(--inv-surface); }
.inv-dock-bar a:focus-visible, .inv-dock-toggle:focus-visible { outline: 3px solid var(--inv-accent); outline-offset: 2px; }
.inv-dock-toggle, .inv-dock .inv-fab-btn { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.05rem;
  background: var(--inv-primary); color: var(--inv-surface); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .55); display: grid; place-items: center; }
.inv-dock-toggle i { transition: rotate .35s; }
.inv-dock.is-hidden .inv-dock-bar { max-width: 0; padding-left: 0; padding-right: 0; opacity: 0; border-width: 0; pointer-events: none; }
.inv-dock.is-hidden .inv-dock-toggle i { rotate: 180deg; }
@media (min-width: 1100px) { .inv-dock { left: 71vw; } }
@media print { .inv-dock { display: none; } }


/* =====================================================================
   ISI BAGIAN MUNCUL BERURUTAN (kelas .inv-st & --i dipasang invitation.js)
   ===================================================================== */
.inv-st { opacity: 0; translate: 0 18px; transition: opacity .75s ease, translate .75s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(min(var(--i, 0), 14) * 140ms + 450ms); }
.inv-section.is-in .inv-st { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .inv-st { opacity: 1; translate: none; transition: none; } }

/* =====================================================================
   PILIHAN BAHASA (add-on Bahasa tambahan) — pojok kanan atas, tampil juga di cover
   ===================================================================== */
.inv-lang { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 56; display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 999px; background: color-mix(in srgb, var(--inv-surface) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--inv-accent) 45%, transparent); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5); font: 700 .72rem/1 var(--inv-font-body); }
.inv-lang > i { padding: 0 4px 0 6px; color: var(--inv-muted); font-size: .9rem; }
.inv-lang a { padding: 6px 9px; border-radius: 999px; color: var(--inv-muted); text-decoration: none; letter-spacing: .04em; transition: background .2s, color .2s; }
.inv-lang a:hover { color: var(--inv-primary); }
.inv-lang a[aria-current] { background: var(--inv-primary); color: var(--inv-surface); }
[data-mode="demo"] .inv-lang, [data-mode="preview"] .inv-lang { top: 54px; }
[dir="rtl"] .inv-lang { right: auto; left: 12px; }
[dir="rtl"] .inv-timeline { text-align: right; }

/* =====================================================================
   PEMBUKA (add-on Video pembuka / cover animasi) — tampil setelah tombol Buka Undangan
   ===================================================================== */
.inv-intro { position: fixed; inset: 0; z-index: 62; display: grid; place-items: center; background: #000; opacity: 0; transition: opacity .7s ease; }
.inv-intro.is-on { opacity: 1; }
.inv-intro.is-out { opacity: 0; pointer-events: none; }
.inv-intro-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.inv-intro-video.is-cover { object-fit: cover; }
.inv-intro[data-mode="animasi"] { background: var(--inv-bg); }
.inv-intro .inv-intro-anim { position: absolute; inset: 0; z-index: 0; transition: none; overflow: hidden; }
.inv-root .inv-intro .inv-cover-inner { background: none; border: 0; outline: 0; box-shadow: none; max-width: 640px; }
.inv-root .inv-intro .inv-cover-inner > * { opacity: 0; }
.inv-root .inv-intro.is-on .inv-cover-inner > * { animation: inv-intro-up 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.inv-root .inv-intro.is-on .inv-cover-inner > :nth-child(1) { animation-delay: .5s; }
.inv-root .inv-intro.is-on .inv-cover-inner .inv-intro-names { animation: inv-intro-wipe 1.8s .9s cubic-bezier(.6, 0, .2, 1) both; font-size: calc(clamp(3rem, 13vw, 6rem) * var(--t-ns, 1)); margin: 8px 0 14px; }
.inv-root .inv-intro.is-on .inv-intro-date { animation-delay: 2.2s; letter-spacing: .1em; }
.inv-root .inv-intro.is-on .inv-cover-inner::before { animation: inv-intro-zoom 1.4s .1s cubic-bezier(.2, .7, .2, 1) both; }
.inv-root .inv-intro.is-on .inv-cover-inner::after { animation: inv-intro-up 1s 2.6s both; }
.inv-intro-anim::after { content: ''; position: absolute; inset: -20%; z-index: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, color-mix(in srgb, var(--inv-surface) 70%, transparent) 50%, transparent 60%); translate: -100% 0; }
.inv-intro.is-on .inv-intro-anim::after { animation: inv-intro-sweep 2.2s 1.6s ease-in-out both; }
.inv-intro-skip { position: absolute; right: 16px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 3; border: 0; border-radius: 999px; padding: 9px 16px;
  background: rgba(0, 0, 0, .45); color: #fff; font: 600 .82rem var(--inv-font-body); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; }
.inv-intro-skip:hover { background: rgba(0, 0, 0, .65); }
@keyframes inv-intro-up { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes inv-intro-wipe { from { opacity: 1; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes inv-intro-zoom { from { opacity: 0; scale: .4; rotate: -20deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes inv-intro-sweep { from { translate: -100% 0; } to { translate: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .inv-root .inv-intro .inv-cover-inner > * { opacity: 1; } }

/* =====================================================================
   COVER AMPLOP — tipe Elegan & Premium (varian "amplop")
   Lapisan (bawah → atas): belakang · surat · kantong depan · tutup · segel. Semua padat, tidak tembus.
   Urutan saat "Buka Undangan" (±2,4 dtk, tidak saling menumpuk):
   1) isi cover lain memudar & amplop bergeser ke tengah  2) segel lepas  3) tutup terbuka ke atas
   4) surat naik keluar dari kantong (tetap di belakang kantong)  5) cover bergeser pergi
   ===================================================================== */
.inv-envelope { --env-w: 250px; position: relative; width: var(--env-w); height: calc(var(--env-w) * .64); margin: 0 auto 26px; perspective: 1000px;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .25)); transition: translate .6s cubic-bezier(.2, .7, .2, 1), scale .6s cubic-bezier(.2, .7, .2, 1); }
.inv-envelope > div { position: absolute; }
.env-back { inset: 0; z-index: 0; border-radius: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 70%, #000), color-mix(in srgb, var(--inv-primary) 88%, #000)); }
.env-letter { left: 7%; right: 7%; top: 6%; height: 88%; z-index: 1; border-radius: 6px; display: grid; justify-items: center; align-content: start; gap: 6px; padding-top: 11%;
  background: linear-gradient(180deg, var(--inv-surface), color-mix(in srgb, var(--inv-accent) 10%, var(--inv-surface)));
  box-shadow: 0 -2px 8px rgba(0, 0, 0, .12), inset 0 0 0 5px var(--inv-surface), inset 0 0 0 6px color-mix(in srgb, var(--inv-accent) 55%, transparent);
  transition: translate .9s cubic-bezier(.3, .7, .2, 1); }
.env-letter-names { font: 400 1.5rem/1 var(--inv-font-script); color: var(--inv-primary); }
.env-letter-line { width: 44%; height: 1px; background: color-mix(in srgb, var(--inv-accent) 70%, transparent); }
.env-letter-note { font: 600 .55rem/1 var(--inv-font-body); letter-spacing: .25em; text-transform: uppercase; color: var(--inv-muted); }
.env-front { inset: 0; z-index: 3; border-radius: 0 0 10px 10px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--inv-primary) 86%, #fff) 0%, var(--inv-primary) 50%, color-mix(in srgb, var(--inv-primary) 82%, #000) 100%);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); }
.env-front::before, .env-front::after { content: ''; position: absolute; inset: 0; }
.env-front::before { background: linear-gradient(to top right, rgba(0, 0, 0, .10) 49.6%, transparent 50%) left / 50% 100% no-repeat,
  linear-gradient(to top left, rgba(0, 0, 0, .05) 49.6%, transparent 50%) right / 50% 100% no-repeat; }
.env-flap { left: 0; right: 0; top: 0; height: 62%; z-index: 4; transform-origin: 50% 0; transform: rotateX(0deg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 78%, #fff), color-mix(in srgb, var(--inv-primary) 94%, #000));
  clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 10px 10px 0 0;
  transition: transform .7s cubic-bezier(.45, .05, .3, 1), z-index 0s linear .35s; }
.env-seal { left: 50%; top: 62%; width: 48px; height: 48px; margin: -24px 0 0 -24px; z-index: 5; border-radius: 50%; display: grid; place-items: center;
  --seal: var(--t-seal, var(--t-gold, var(--inv-accent)));
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--seal) 65%, #fff), var(--seal) 55%, color-mix(in srgb, var(--seal) 65%, #000));
  color: var(--t-seal-text, var(--inv-surface)); font: 700 .78rem var(--inv-font-head); letter-spacing: .02em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3), inset 0 0 0 3px rgba(255, 255, 255, .18); transition: opacity .35s, scale .35s; }
/* Urutan buka */
.inv-cover.is-opening .inv-cover-inner > :not(.inv-envelope),
.inv-cover.is-opening .inv-cover-inner::before, .inv-cover.is-opening .inv-cover-inner::after { opacity: 0 !important; transition: opacity .4s ease; }
.inv-cover.is-opening .inv-cover-inner { background-color: transparent; border-color: transparent; outline-color: transparent; box-shadow: none; transition: .4s; }
.inv-cover.is-opening .inv-envelope { translate: 0 var(--env-shift, 0px); scale: 1.18; animation: none; }
.inv-cover.is-opening .env-seal { opacity: 0; scale: .5; transition-delay: .35s; }
.inv-cover.is-opening .env-flap { transform: rotateX(180deg); z-index: 0; transition-delay: .55s, .9s; }
.inv-cover.is-opening .env-letter { translate: 0 -46%; transition-delay: 1.15s; }
@media (max-height: 720px) { .inv-envelope { --env-w: 200px; margin-bottom: 16px; } .env-seal { width: 40px; height: 40px; margin: -20px 0 0 -20px; } .env-letter-names { font-size: 1.2rem; } }

/* =====================================================================
   LAPISAN MUNCUL SATU PER SATU (body.inv-anim dipasang invitation.js; tipe Simple tidak)
   Urutan tiap bagian: lapisan belakang l1→l4 · ornamen sudut kartu · isi (berurutan) · lapisan depan l1→l2
   Memakai transisi opacity/blur, jadi animasi milik tema pada lapisan tetap berjalan.
   ===================================================================== */
.inv-anim .inv-section .inv-layers > i, .inv-anim .inv-section .inv-card::before, .inv-anim .inv-section .inv-card::after {
  transition: opacity 1.1s ease, filter 1.1s ease; }
.inv-anim .inv-section:not(.is-in) .inv-layers > i, .inv-anim .inv-section:not(.is-in) .inv-card::before, .inv-anim .inv-section:not(.is-in) .inv-card::after {
  opacity: 0; filter: blur(8px); }
.inv-anim .inv-section .inv-layers.back > .l1 { transition-delay: 0s; }
.inv-anim .inv-section .inv-layers.back > .l2 { transition-delay: .25s; }
.inv-anim .inv-section .inv-layers.back > .l3 { transition-delay: .5s; }
.inv-anim .inv-section .inv-layers.back > .l4 { transition-delay: .75s; }
.inv-anim .inv-section .inv-card::before { transition-delay: .4s; }
.inv-anim .inv-section .inv-card::after { transition-delay: .65s; }
.inv-anim .inv-section .inv-layers.front > .l1 { transition-delay: 1.1s; }
.inv-anim .inv-section .inv-layers.front > .l2 { transition-delay: 1.4s; }

/* =====================================================================
   JARAK RAPI & KONSISTEN (semua tema)
   ===================================================================== */
.inv-card > :first-child { margin-top: 0; }
.inv-card > :last-child { margin-bottom: 0; }
/* Ornamen atas hanya di judul pembuka & penutup; bagian lain cukup judul + garis hias di bawahnya */
.inv-card:not(.inv-hero):not(.inv-closing) > .inv-ornament { display: none; }
.inv-card > .inv-title { margin-bottom: 22px; }
.inv-card > .inv-muted { max-width: 440px; margin: -6px auto 20px; }
.inv-hero .inv-ornament { margin-bottom: 14px; }
.inv-hero .inv-kicker { margin-bottom: 12px; }
.inv-hero .inv-date { margin: 12px 0 0; }
.inv-hero .inv-quote { margin-top: 20px; }
.inv-countdown { max-width: 420px; margin: 0 auto; }
.inv-couple { gap: 20px; }
.inv-person h4 { margin: 24px 0 6px; }
.inv-fullname { margin: 0 0 4px; }
.inv-person .inv-muted { margin: 0; }
.inv-amp { margin: 4px 0; line-height: 1; }
.inv-events { gap: 16px; }
.inv-event h4 { margin: 0 0 10px; }
.inv-event p { margin: 0 0 6px; }
.inv-event .inv-actions { margin-top: 16px; }
.inv-actions { gap: 10px; }
.inv-card > .inv-link, .inv-card > .inv-live { margin-top: 18px; }
.inv-timeline { margin: 0 auto 24px; max-width: 460px; }
.inv-timeline li { padding-bottom: 18px; }
.inv-timeline li:last-child { padding-bottom: 0; }
.inv-video { margin-bottom: 18px; }
.inv-gallery { gap: 8px; }
.inv-notes { max-width: 440px; margin: 0 auto; gap: 12px; }
.inv-form { gap: 16px; max-width: 460px; margin: 0 auto; }
.inv-form label { gap: 6px; }
.inv-form .inv-btn { justify-self: center; min-width: 200px; }
.inv-form small { text-align: center; display: block; }
.inv-wishes { margin: 24px auto 0; max-width: 460px; gap: 12px; }
.inv-wish { padding: 12px 16px; }
.inv-gifts { gap: 16px; max-width: 520px; margin: 0 auto; }
.inv-gift { padding: 20px 16px; gap: 6px; }
.inv-gift .inv-btn { margin-top: 8px; }
.inv-closing p { margin: 0 auto 14px; }
.inv-closing .inv-big { margin-top: 6px; }
.inv-footer { padding-top: 34px; }
.inv-footer p { margin: 0 0 8px; }
@media (min-width: 640px) {
  .inv-card > .inv-title { margin-bottom: 26px; }
  .inv-couple { gap: 28px; }
}
.inv-notes { text-align: center; }
.inv-notes li { display: block; }
.inv-radio { justify-content: center; }

/* Bagian tidak memudar sekaligus: kartu muncul dulu, lalu isinya satu per satu */
.inv-anim .inv-section { opacity: 1; transform: none; transition: none; }
.inv-anim .inv-section > .inv-card, .inv-anim .inv-section > .inv-cal { transition: opacity .7s ease, translate .7s cubic-bezier(.2, .7, .2, 1); }
.inv-anim .inv-section:not(.is-in) > .inv-card { opacity: 0; translate: 0 26px; }
.inv-anim-init .inv-st, .inv-anim-init .inv-section > .inv-card, .inv-anim-init .inv-layers > i, .inv-anim-init .inv-card::before, .inv-anim-init .inv-card::after { transition: none !important; }
@media (max-width: 480px) { [data-mode="demo"] .inv-lang, [data-mode="preview"] .inv-lang { top: 76px; } }

/* =====================================================================
   LATAR & PANEL PILIHAN KLIEN, FOTO PEMBUKA (diatur di formulir undangan → Tampilan)
   body.inv-has-bg   : .inv-bg-custom = foto diburamkan, menempel satu layar penuh (tanpa sambungan saat digulir)
   body.inv-has-panel: kartu/panel memakai foto pilihan (atau warna polos) dengan lapisan warna tema agar teks terbaca
   ===================================================================== */
.inv-bg-custom { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.inv-bg-custom::before { content: ''; position: absolute; inset: calc(-3 * var(--bg-blur, 6px) - 6px); background: var(--bg-img) center / cover no-repeat;
  filter: blur(var(--bg-blur, 6px)); }
.inv-bg-custom::after { content: ''; position: absolute; inset: 0; background: var(--inv-bg); opacity: var(--bg-dim, .35); }
.inv-root.inv-has-bg .inv-page-layers { opacity: .6; }
.inv-root.inv-has-bg .inv-cover:not([style]) { background: color-mix(in srgb, var(--inv-bg) 55%, transparent); -webkit-backdrop-filter: blur(var(--bg-blur, 6px)); backdrop-filter: blur(var(--bg-blur, 6px)); }
@media (min-width: 1100px) {
  .inv-root.inv-has-bg .inv-aside:not([style]) { background: color-mix(in srgb, var(--inv-surface) 38%, transparent); }
}
.inv-root.inv-has-panel .inv-main .inv-section > .inv-card:not(.inv-hero[style]) {
  background: linear-gradient(color-mix(in srgb, var(--inv-surface) var(--panel-a, 82%), transparent), color-mix(in srgb, var(--inv-surface) var(--panel-a, 82%), transparent)),
    var(--panel-img, none) center / cover no-repeat;
  border-radius: max(var(--t-radius, 18px), 14px); padding-inline: clamp(22px, 6vw, 40px); box-shadow: 0 22px 46px -32px rgba(0, 0, 0, .5); }
.inv-hero-photo { margin: 24px auto 0; width: min(76%, 260px); position: relative; }
.inv-hero-photo img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; border-radius: var(--t-radius, 18px); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .55); } /* foto pembuka utuh */
@media (min-width: 640px) { .inv-hero-photo { width: 320px; } }
/* Tombol Kembali di bilah demo / pratinjau */
.inv-back { float: left; display: inline-flex; align-items: center; gap: 4px; margin: -2px 8px -2px -4px; padding: 3px 10px; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font-family: inherit; font-weight: 600; font-size: .74rem; line-height: 1.4; cursor: pointer; }
.inv-back:active { background: rgba(255, 255, 255, .25); }
