/* ============================================================
   Undangan Tika & Rudiansyah — Stylesheet utama
   ------------------------------------------------------------
   Struktur:
     1. Font lokal (@font-face {
  font-family: "Badger Script";
  src: url("../fonts/BadgerScript-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Marykate";
  src: url("../fonts/Marykate-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face)
     2. Design tokens (palet Pastel Pop sesuai PRD)
     3. Base & latar kertas
     4. Animasi & reduced-motion
     5. Komponen: cover, pemutar, mempelai, acara, countdown,
        kalender, love story, galeri, gift, ucapan, penutup
     6. Lightbox, navigasi bawah, aksesibilitas, cetak
   Palet terkunci PRD: #F7F3FF · #A78BFA · #6D5BD0 ·
   #BAE6FD · #7DD3FC · #4C3A7A
   ============================================================ */

/* ===== Font terpasang lokal di halaman (tidak tergantung Google Fonts) ===== */
@font-face {
  font-family: "Amiri";
  src: url("../fonts/Amiri-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("../fonts/Amiri-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
:root {
  /* ===== Palet terkunci PRD Bab 7 — Opsi C: Pastel Pop ===== */
  --kertas: #F7F3FF;      /* latar halaman */
  --ungu: #A78BFA;        /* ungu utama: tombol utama, kartu selang-seling */
  --ungu-tua: #6D5BD0;    /* ungu judul: judul seksi & nama mempelai */
  --ungu-dalam: #6D5BD0;  /* bayangan tombol utama */
  --ungu-lembut: rgba(167, 139, 250, 0.16); /* latar kartu ungu (turunan ungu utama) */
  --biru: #7DD3FC;        /* biru aksen: coretan hati, ikon, lingkaran tanggal */
  --biru-muda: #BAE6FD;   /* biru muda: kartu & tombol sekunder */
  --biru-tua: #6D5BD0;    /* judul memakai ungu judul per PRD */
  --biru-dalam: #4C3A7A;  /* isi memakai warna teks per PRD */
  --biru-lembut: #BAE6FD;
  --teks: #4C3A7A;
  --teks-lembut: rgba(76, 58, 122, 0.66);
  --putih: #ffffff;
  --garis-biru: #BAE6FD;
  --garis-ungu: #A78BFA;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  /* Cadangan: kertas juga dipasang di body (menempel di layar, menutupi
     penuh) supaya latar selalu mengikuti ukuran layar apa pun. */
  background-color: var(--kertas);
  background-image: url("../kertas.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  color: var(--teks);
  font-family: "Marykate", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* Kunci scroll saat sampul tampil: HANYA tombol "Buka Undangan" yang bisa
   membuka isi. Kunci <html> juga — di HP yang bisa di-scroll adalah
   dokumennya, bukan body saja. */
html.terkunci, body.terkunci { overflow: hidden; height: 100%; overscroll-behavior: none; }
html:has(body.terkunci) { overflow: hidden; height: 100%; }

/* ===== Latar kertas: SATU lembar penuh, tidak diulang — ubin membuat
   sambungan kelihatan putus-putus. Lapisan tetap di belakang semua konten ===== */
.latar-kertas {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--kertas);
  background-image: url("../kertas.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  pointer-events: none;
}
.panggung {
  background-color: transparent;
}
/* Sampul WAJIB punya latar sendiri (rapat, tidak tembus): dia menutupi isi
   undangan sebelum dibuka. Satu gambar, tidak diulang. */
.cover {
  background-color: var(--kertas);
  background-image: url("../kertas.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}
.panggung {
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 0 60px rgba(109, 91, 208, 0.18);
  position: relative;
  overflow: hidden;
}
section { padding: 56px 26px 8px; position: relative; }

/* ===== Animasi masuk saat scroll (hanya bila JS aktif: kelas .anim di <html>) ===== */
.anim .reveal { opacity: 0; }
.anim .reveal.tampil { animation: naikMasuk 1.05s cubic-bezier(0.22, 0.9, 0.28, 1) both; }
.anim .reveal.tampil .pop { animation: popMasuk 0.85s cubic-bezier(0.3, 1.35, 0.44, 1) backwards; animation-delay: calc(var(--tunda, 0) * 150ms + 140ms); }
@keyframes naikMasuk {
  from { opacity: 0; transform: translateY(38px); filter: blur(5px); }
  60% { filter: blur(0); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes popMasuk {
  0% { opacity: 0; transform: translateY(20px) scale(0.86) rotate(-1.1deg); }
  55% { opacity: 1; transform: translateY(-4px) scale(1.025) rotate(0.4deg); }
  78% { transform: translateY(1.5px) scale(0.995) rotate(0deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes detak {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.14); }
  55% { transform: scale(1.04); }
}
@keyframes gambarGaris {
  to { stroke-dashoffset: 0; }
}
@keyframes kilau {
  0%, 100% { opacity: 0.35; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(20deg); }
}
/* ===== Keyframes gerak hidup (ambient, berjalan terus) ===== */
@keyframes hanyutHati {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-7deg); }
  30% { transform: translate3d(9px, -16px, 0) rotate(5deg); }
  62% { transform: translate3d(-7px, -30px, 0) rotate(-4deg); }
}
@keyframes apungTangan {
  0%, 100% { translate: 0 0; rotate: -1deg; }
  50% { translate: 0 -8px; rotate: 1.2deg; }
}
@keyframes goyangBingkaiKiri {
  0%, 100% { rotate: -4.2deg; translate: 0 0; }
  50% { rotate: -1.8deg; translate: 0 -5px; }
}
@keyframes goyangBingkaiKanan {
  0%, 100% { rotate: 3.8deg; translate: 0 -2px; }
  50% { rotate: 1.4deg; translate: 0 3px; }
}
@keyframes goyangGaleri {
  0%, 100% { rotate: -0.7deg; translate: 0 0; }
  50% { rotate: 0.7deg; translate: 0 -4px; }
}
@keyframes goyangKecil {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-2px); }
}
@keyframes goyangCoretan {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(-1deg); }
}
@keyframes napasJudul {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}
@keyframes napasBesar {
  0%, 100% { scale: 1; }
  50% { scale: 1.09; }
}
@keyframes detakSkala {
  0%, 100% { scale: 1; }
  30% { scale: 1.13; }
  55% { scale: 1.04; }
}
@keyframes sembul {
  0% { transform: translateY(6px) scale(0.82); opacity: 0.35; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes gelombang {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1.15); }
}
@keyframes denyutTombol {
  0% { box-shadow: 0 4px 0 var(--ungu-dalam), 0 0 0 0 rgba(167, 139, 250, 0.45); }
  70% { box-shadow: 0 4px 0 var(--ungu-dalam), 0 0 0 13px rgba(167, 139, 250, 0); }
  100% { box-shadow: 0 4px 0 var(--ungu-dalam), 0 0 0 0 rgba(167, 139, 250, 0); }
}
@keyframes undangKetuk {
  0%, 100% { scale: 1; }
  50% { scale: 1.045; }
}
@keyframes ledakNaik {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(0deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% - var(--naik, 140px))) scale(1.05) rotate(var(--putar, 30deg)); }
}
@keyframes napasBayangan {
  0%, 100% { box-shadow: 0 10px 26px rgba(167, 139, 250, 0.16); }
  50% { box-shadow: 0 14px 32px rgba(167, 139, 250, 0.27); }
}
.kilau { animation: kilau 2.6s ease-in-out infinite; transform-origin: center; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim .reveal, .anim .reveal .pop { opacity: 1 !important; animation: none !important; }
  .melayang, .berputar, .kilau, .sel-hari.dday .angka-hari svg, .hati-doodle,
  .hati-ambient .ha, .tangan-janji, .bingkai-kayu, .hiasan-judul svg, .judul-seksi,
  .dan-besar, .nama-panggilan, .tombol.buka, .bab .hati-tl, .kalender td.tgl-h svg,
  .sel-hari .coretan-dday, .eq span, .pemutar.memutar .kontrol .main,
  .kotak-hitung-besar, .kartu-gift, .ledakan-hati svg, .satuan .angka.sembul,
  .anim .reveal.tampil .galeri figure, .anim .reveal.tampil .tangan-janji { animation: none !important; }
  .cover h1 .huruf { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hati-ambient { transform: none !important; }
  .percik { translate: none !important; }
}

h1, h2 { font-family: "Badger Script", "Marykate", cursive; color: var(--biru-tua); margin: 0; font-weight: 400; }
.judul-seksi {
  font-size: 2.75rem;
  text-align: center;
  line-height: 1.15;
}
.sub-seksi { text-align: center; color: var(--teks-lembut); font-weight: 500; margin: 8px auto 0; max-width: 34ch; }
.coretan { font-family: "Marykate", cursive; color: var(--ungu-tua); }
.hiasan-judul { display: flex; justify-content: center; margin-bottom: 6px; }
.garis-ombak { display: block; margin: 14px auto 0; }

/* ===== Cover terkunci ===== */
.cover {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  overscroll-behavior: contain;
  transition: transform 0.9s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.9s ease;
  overflow-y: auto;
  padding: 28px 18px;
}
.cover.terbuka { transform: translateY(-100%); opacity: 0.4; pointer-events: none; }
.cover-dalam { max-width: 420px; width: 100%; text-align: center; margin: auto; position: relative; }
.anim .cover-dalam > *:not(.foto-cover) { animation: naikMasuk 0.8s cubic-bezier(0.22, 0.8, 0.32, 1) backwards; animation-delay: calc(var(--i, 0) * 110ms); }
.anim .cover .foto-cover { animation: naikMasuk 0.8s cubic-bezier(0.22, 0.8, 0.32, 1) backwards, melayang 5s ease-in-out 0.9s infinite; }
.hati-doodle { position: absolute; pointer-events: none; z-index: 3; animation: detak 2.4s ease-in-out infinite; }
.hati-doodle.kiri { top: 6px; left: 2px; transform: rotate(-14deg); }
.hati-doodle.kanan { top: auto; bottom: 6px; right: 4px; transform: rotate(12deg); animation-delay: 0.7s; }
.cover .foto-cover { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(360px, 88vw); margin: 0 auto; }
.cover .foto-cover .foto-kecil { margin: 0; flex: 1 1 0; max-width: 168px; background: var(--putih); border: 3px solid var(--ungu); border-radius: 14px; padding: 7px 7px 8px; box-shadow: 0 10px 24px rgba(76, 58, 122, 0.16); }
.cover .foto-cover .foto-kecil:first-child { transform: rotate(-2.5deg); }
.cover .foto-cover .foto-kecil:last-child { transform: rotate(2.5deg); }
.cover .foto-cover .foto-kecil img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 22%; display: block; border-radius: 9px; }
.cover .foto-cover .foto-kecil figcaption { font-family: "Marykate", cursive; font-size: 1.3rem; color: var(--ungu-tua); margin-top: 5px; line-height: 1.1; }
.cover .foto-cover .hati-tengah { flex: 0 0 auto; animation: detak 2.4s ease-in-out infinite; }
.deret-hati { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.cover-kecil { letter-spacing: 0.28em; text-transform: uppercase; font-size: 0.72rem; font-weight: 700; color: var(--ungu-tua); margin: 22px 0 2px; }
.cover h1 { font-size: clamp(2.9rem, 13vw, 4rem); line-height: 1.12; }
.cover h1 .dan { display: block; font-size: 0.55em; color: var(--ungu-tua); margin: 0; line-height: 0.9; }
.kepada {
  margin: 24px auto 0; background: var(--putih);
  border: 2px solid var(--garis-ungu); border-radius: 14px;
  padding: 16px 18px; max-width: 340px;
}
.kepada p { margin: 0; font-size: 0.9rem; color: var(--teks-lembut); }
.kepada .nama-tamu { font-family: "Badger Script", cursive; font-size: 1.9rem; color: var(--biru-tua); margin-top: 2px; line-height: 1.2; overflow-wrap: anywhere; }
.tombol {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 48px; padding: 12px 26px;
  background: var(--biru-muda); color: var(--teks);
  border: none; border-radius: 999px;
  font-family: "Marykate", sans-serif; font-size: 1rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 0 var(--biru);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.tombol:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--biru); }
.tombol.biru { background: var(--biru-muda); color: var(--teks); box-shadow: 0 6px 0 var(--biru); }
.tombol.biru:active { box-shadow: 0 2px 0 var(--biru); }
.tombol-utama { margin-top: 22px; }
.tombol.buka { background: var(--ungu); color: var(--teks); box-shadow: 0 6px 0 var(--ungu-tua); }
.tombol.buka:active { box-shadow: 0 2px 0 var(--ungu-tua); }

/* ===== Pemutar musik seperti contoh ===== */
.pemutar {
  margin: 24px auto 0; max-width: 360px;
  background: var(--putih); border: 2px solid var(--garis-biru); border-radius: 18px;
  padding: 16px 18px 14px; text-align: center;
}
.pemutar .judul-lagu { font-weight: 700; color: var(--biru-tua); font-size: 0.95rem; margin: 0; }
.pemutar .artis-lagu { font-size: 0.8rem; color: var(--teks-lembut); margin: 1px 0 0; }
.rel { height: 6px; border-radius: 99px; background: var(--biru-lembut); margin: 13px 0 5px; overflow: hidden; }
.rel .isi-rel { height: 100%; width: 0%; background: var(--ungu); border-radius: 99px; transition: width 0.4s linear; }
.waktu-lagu { display: flex; justify-content: space-between; font-size: 0.72rem; font-weight: 700; color: var(--teks-lembut); }
.kontrol { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.kontrol button {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent;
  color: var(--biru-tua); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.kontrol button.aktif { color: var(--ungu-tua); background: var(--ungu-lembut); }
.kontrol .main {
  width: 54px; height: 54px; background: var(--ungu); color: #4C3A7A;
  box-shadow: 0 4px 0 var(--ungu-dalam);
}
.kontrol .main:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ungu-dalam); }
.klik-lagu { font-family: "Marykate", cursive; font-size: 1.25rem; color: var(--ungu-tua); margin: 10px 0 0; }
.tangan-janji { display: block; width: min(330px, 84vw); margin: 20px auto 4px; }

/* ===== Seksi pembuka ===== */
.salam { text-align: center; font-family: "Badger Script", cursive; font-size: 2rem; line-height: 1.25; color: var(--biru-tua); }
.ayat {
  margin: 22px auto 0; max-width: 38ch; text-align: center;
  background: var(--ungu-lembut); border: 2px solid var(--garis-ungu); border-radius: 18px;
  padding: 22px 20px; position: relative;
}
.ayat .arab { font-size: 1.45rem; line-height: 2.1; color: var(--biru-dalam); direction: rtl; font-family: "Amiri", Georgia, serif; }
.ayat .arti { font-size: 0.92rem; color: var(--teks); margin-top: 10px; }
.ayat .sumber { font-weight: 700; color: var(--ungu-tua); font-size: 0.85rem; margin-top: 8px; }
.tape {
  position: absolute; width: 92px; height: 24px; top: -13px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  transform-origin: top center;
  background: rgba(186, 230, 253, 0.9); border-left: 2px dashed rgba(255,255,255,0.7); border-right: 2px dashed rgba(255,255,255,0.7);
  border-radius: 2px;
}
@keyframes goyangTape { 0%, 100% { transform: translateX(-50%) rotate(-3deg); } 50% { transform: translateX(-50%) rotate(-0.5deg); } }
.anim .reveal.tampil .tape { animation: goyangTape 3.4s ease-in-out 1s infinite; }

/* ===== Mempelai: bingkai kayu miring + nama panggilan ungu menimpa bingkai ===== */
.kartu-mempelai { margin: 30px auto 0; max-width: 360px; text-align: center; position: relative; }
.bingkai-kayu {
  width: 168px; height: 208px; margin: 0 auto;
  background: var(--putih);
  border: 7px solid var(--ungu);
  outline: 1px solid var(--ungu-tua);
  box-shadow: 0 10px 22px rgba(76, 58, 122, 0.22), inset 0 0 0 3px var(--kertas);
  overflow: hidden;
  position: relative; z-index: 1;
}
.bingkai-kayu img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bingkai-kayu img.tika { object-position: center 22%; }
.bingkai-kayu img.rudi { object-position: center 18%; }
/* Bingkai mengikuti warna kesukaan: Tika ungu, Rudi biru. */
.biru .bingkai-kayu { border-color: var(--biru); outline-color: var(--biru); }
.ungu .bingkai-kayu { animation: goyangBingkaiKiri 6s ease-in-out infinite; }
.biru .bingkai-kayu { animation: goyangBingkaiKanan 6.8s ease-in-out -2.4s infinite; }
.nama-panggilan {
  font-family: "Badger Script", cursive; font-weight: 400;
  font-size: 3.4rem; line-height: 1; color: var(--ungu-tua);
  margin: -34px 0 0; position: relative; z-index: 2;
  text-shadow: 0 2px 0 #F7F3FF, 0 0 10px #F7F3FF;
}
.nama-lengkap { font-weight: 700; color: var(--biru-tua); font-size: 1.06rem; margin: 8px 0 0; }
/* Nama mengikuti warna kesukaan: Tika ungu, Rudi biru. */
.biru .nama-panggilan { color: #3A86D6; }
.biru .nama-lengkap { color: #3A86D6; }
.kartu-mempelai p { margin: 2px 0 0; font-size: 0.95rem; color: var(--biru-dalam); }
.kartu-mempelai .ortu { font-weight: 600; }
.dan-besar { text-align: center; font-family: "Badger Script", cursive; font-size: 2.6rem; color: var(--ungu-tua); margin: 16px 0 -8px; line-height: 1; }

/* ===== Save the Date: strip 3 hari + acara teks polos seperti contoh ===== */
.strip-hari {
  overflow: visible;
  display: flex; justify-content: center; align-items: flex-start; gap: 6px;
  max-width: 360px; margin: 28px auto 0; padding: 16px 6px 12px;
  border-top: 2px solid var(--garis-biru); border-bottom: 2px solid var(--garis-biru);
}
.sel-hari { flex: 1; text-align: center; position: relative; padding: 4px 2px 0; overflow: visible; }
.sel-hari .nama-hari { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teks-lembut); }
.sel-hari .angka-hari { font-family: "Marykate", cursive; font-size: 2.6rem; font-weight: 700; line-height: 1.9; color: var(--biru-tua); position: relative; display: inline-block; padding: 16px 20px 18px; overflow: visible; }
.sel-hari.dday .angka-hari { color: var(--ungu-tua); }
.sel-hari.dday .angka-hari svg { position: absolute; inset: -8px -6px; width: calc(100% + 12px); height: calc(100% + 16px); overflow: visible; animation: detak 2.2s ease-in-out infinite; transform-origin: center; }
.sel-hari.dday .angka-hari svg path { stroke-dasharray: 240; stroke-dashoffset: 0; }
.anim .reveal.tampil .sel-hari.dday .angka-hari svg path { stroke-dashoffset: 240; animation: gambarGaris 1.1s ease-out 0.45s forwards; }
.sel-hari .coretan-dday { font-family: "Marykate", cursive; font-size: 1.2rem; color: var(--ungu-tua); display: block; margin-top: 1px; transform: rotate(-3deg); }
.acara-polos { margin: 30px auto 0; max-width: 360px; text-align: center; color: var(--biru-dalam); }
.acara-polos h3 { font-family: "Badger Script", cursive; font-weight: 400; font-size: 2.5rem; margin: 0 0 4px; color: var(--ungu-tua); line-height: 1.15; }
.acara-polos p { margin: 4px 0; }
.acara-polos .tgl { font-weight: 700; font-size: 1.05rem; color: var(--biru-tua); }
.acara-polos .tombol { margin-top: 12px; }
.menyusul {
  display: inline-block; margin-top: 10px; padding: 6px 14px;
  background: var(--putih); border: 2px dashed var(--ungu); border-radius: 999px;
  font-family: "Marykate", cursive; font-size: 1.15rem; color: var(--ungu-tua);
}

/* ===== Countdown: kotak ungu garis putus-putus, angka satu baris ===== */
.kotak-hitung-besar {
  margin: 26px auto 0; max-width: 360px; text-align: center;
  background: var(--ungu-lembut); border: 2.5px dashed var(--ungu); border-radius: 20px;
  padding: 22px 14px 18px;
}
.kotak-hitung-besar .judul-hitung { font-family: "Badger Script", cursive; font-size: 2rem; color: var(--ungu-tua); line-height: 1.2; }
.hitung { display: flex; justify-content: center; align-items: flex-start; margin-top: 12px; }
.satuan { text-align: center; min-width: 58px; }
.satuan .angka { font-family: "Marykate", cursive; font-size: 2.5rem; font-weight: 700; color: var(--biru-tua); line-height: 1; }
.satuan .label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ungu-tua); margin-top: 5px; }
.pemisah { font-family: "Marykate", cursive; font-size: 2.5rem; font-weight: 700; color: var(--ungu-tua); line-height: 1; padding: 0 1px; }

/* ===== Kalender bulan Desember 2026 ===== */
.kalender { margin: 26px auto 0; max-width: 320px; text-align: center; }
.kalender .nama-bulan { font-family: "Marykate", cursive; font-size: 1.45rem; font-weight: 700; color: var(--biru-tua); margin: 0 0 8px; }
.kalender table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.kalender th { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ungu-tua); padding: 4px 0 6px; }
.kalender td { padding: 3px 0; font-size: 0.88rem; font-weight: 600; color: var(--teks); }
.kalender td.kosong { color: transparent; }
.kalender td.tgl-h { position: relative; color: var(--ungu-dalam); font-weight: 700; }
.kalender td.tgl-h .no { position: relative; z-index: 1; display: inline-block; padding: 3px 7px; }
.kalender td.tgl-h svg { position: absolute; left: 50%; top: 50%; width: 40px; height: 36px; transform: translate(-50%, -54%); animation: detakSkala 2.4s ease-in-out infinite; }
.kalender .ket-dday { font-family: "Marykate", cursive; font-size: 1.15rem; color: var(--ungu-tua); margin: 5px 0 0; transform: rotate(-2deg); }

/* ===== Percik doodle melayang di beberapa seksi ===== */
.percik { position: absolute; pointer-events: none; z-index: 0; }
section > *:not(.percik) { position: relative; z-index: 1; }

/* ===== Love story: garis vertikal ungu dengan bulatan hati ===== */
.judul-ungu { color: var(--ungu-tua); }
.cerita { margin: 28px auto 0; max-width: 360px; position: relative; padding-left: 34px; text-align: left; }
.cerita::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--ungu); transform-origin: top; }
.anim .reveal .cerita::before { transform: scaleY(0); }
.anim .reveal.tampil .cerita::before { transform: scaleY(1); transition: transform 1.4s ease 0.25s; }
.bab { position: relative; margin-bottom: 26px; }
.bab:last-child { margin-bottom: 0; }
.bab .hati-tl { position: absolute; left: -33px; top: 2px; width: 21px; height: 19px; }
.bab h3 { font-family: "Badger Script", cursive; font-weight: 400; color: var(--ungu-tua); font-size: 1.8rem; margin: 0 0 2px; line-height: 1.2; }
.bab p { margin: 0; font-size: 0.94rem; color: var(--biru-dalam); }

/* ===== Galeri ===== */
.galeri { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.galeri figure {
  margin: 0; background: var(--putih); padding: 8px 8px 10px;
  border-radius: 6px; box-shadow: 0 8px 20px rgba(109, 91, 208, 0.16);
  position: relative; cursor: pointer;
}
.galeri figure:nth-child(odd) { transform: rotate(-2deg); }
.galeri figure:nth-child(even) { transform: rotate(1.8deg); }
.galeri figure.utama { grid-column: 1 / -1; transform: rotate(-0.6deg); }
.galeri img { width: 100%; height: auto; object-fit: cover; display: block; border-radius: 3px; aspect-ratio: 3 / 2; }
.galeri figcaption { font-family: "Marykate", cursive; font-size: 1.1rem; color: var(--biru-tua); text-align: center; padding-top: 7px; }
.galeri .tape { width: 74px; height: 20px; top: -10px; z-index: 2; }
.galeri figure:nth-child(even) .tape { background: rgba(167, 139, 250, 0.55); transform: translateX(-50%) rotate(4deg); }
.lencana-sementara {
  display: inline-block; margin: 16px auto 0; padding: 7px 16px;
  background: var(--ungu-lembut); border: 2px dashed var(--ungu); border-radius: 999px;
  color: var(--ungu-tua); font-weight: 700; font-size: 0.85rem;
}
.pusat { text-align: center; }

/* ===== Gift: kartu biru muda, selang-seling dengan kartu ungu ===== */
.kartu-gift {
  margin: 24px auto 0; max-width: 360px; text-align: center;
  background: var(--biru-muda); border: 2px solid var(--biru); border-radius: 20px; padding: 26px 22px;
}
.kartu-gift p { margin: 6px 0; }

/* ===== Form ucapan ===== */
.form-ucapan {
  margin: 26px auto 0; max-width: 380px;
  background: var(--putih); border: 2px solid var(--garis-biru); border-radius: 20px; padding: 24px 20px;
  text-align: left;
}
.form-ucapan label { display: block; font-weight: 700; font-size: 0.9rem; margin: 16px 0 6px; color: var(--biru-tua); }
.form-ucapan label:first-of-type { margin-top: 0; }
.form-ucapan input[type="text"], .form-ucapan textarea {
  width: 100%; min-height: 48px; padding: 11px 13px;
  border: 2px solid var(--garis-biru); border-radius: 12px;
  font-family: "Marykate", sans-serif; font-size: 1rem; color: var(--teks);
  background: #ffffff;
}
.form-ucapan textarea { min-height: 96px; resize: vertical; }
.form-ucapan input:focus, .form-ucapan textarea:focus { outline: 3px solid var(--biru-lembut); border-color: var(--biru-tua); }
.pilihan-hadir { display: flex; gap: 10px; }
.pilihan-hadir label {
  flex: 1; margin: 0; padding: 12px 8px; text-align: center;
  border: 2px solid var(--garis-biru); border-radius: 12px; cursor: pointer;
  font-size: 0.95rem; min-height: 48px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.pilihan-hadir input { width: 18px; height: 18px; accent-color: var(--biru-tua); }
.pilihan-hadir label:has(input:checked) { border-color: var(--ungu); background: var(--ungu-lembut); }
.form-ucapan .tombol { width: 100%; justify-content: center; margin-top: 20px; }
.tombol.kirim { background: var(--ungu); color: var(--teks); box-shadow: 0 6px 0 var(--ungu-dalam); }
.tombol.kirim:active { box-shadow: 0 2px 0 var(--ungu-dalam); }
.judul-daftar { font-family: "Badger Script", cursive; font-size: 1.9rem; color: var(--biru-tua); text-align: center; margin: 30px 0 0; line-height: 1.2; }
.catatan-form { font-size: 0.83rem; color: var(--teks-lembut); text-align: center; margin: 12px 0 0; }
.galat { display: none; background: var(--ungu-lembut); border: 2px solid var(--ungu-tua); color: var(--ungu-tua); border-radius: 12px; padding: 10px 13px; font-size: 0.9rem; font-weight: 600; margin-top: 14px; }
.galat.ada { display: block; }

/* ===== Daftar ucapan ===== */
.daftar-ucapan { margin: 24px auto 0; max-width: 380px; display: grid; gap: 14px; }
.ucapan {
  background: var(--putih); border: 2px solid var(--garis-biru); border-radius: 16px;
  padding: 16px 18px; text-align: left; position: relative;
}
.ucapan:nth-child(even) { border-color: var(--garis-ungu); }
.ucapan .kepala { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ucapan .dari { font-family: "Badger Script", cursive; font-weight: 400; color: var(--biru-tua); font-size: 1.5rem; line-height: 1.2; overflow-wrap: anywhere; }
.ucapan .status {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.ucapan .status.hadir { background: var(--biru-lembut); color: var(--biru-dalam); }
.ucapan .status.berhalangan { background: var(--ungu-lembut); color: var(--ungu-dalam); }
.ucapan .isi { margin: 7px 0 0; font-size: 0.95rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.ucapan .waktu { margin: 8px 0 0; font-size: 0.78rem; color: var(--teks-lembut); }
.ucapan-kosong {
  border: 2px dashed var(--ungu); border-radius: 16px; padding: 20px;
  text-align: center; color: var(--teks-lembut); font-weight: 500; background: rgba(255,255,255,0.65);
}
.ucapan-baru { animation: masuk 0.5s ease; }
@keyframes masuk { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ===== Penutup ===== */
.penutup { text-align: center; padding-bottom: 30px; }
.penutup .foto-kecil { width: 190px; aspect-ratio: 1; object-fit: cover; border-radius: 50% 46% 52% 48% / 48% 52% 46% 54%; border: 3px dashed var(--ungu); padding: 6px; background: var(--putih); margin: 0 auto 8px; display: block; }
.penutup h2 { font-size: 2.4rem; line-height: 1.25; }
.penutup h2 .dan { color: var(--ungu-tua); font-size: 0.7em; }
footer { text-align: center; padding: 26px 20px 40px; color: var(--teks-lembut); font-size: 0.85rem; }
.melayang { animation: melayang 5s ease-in-out infinite; display: inline-block; }
@keyframes melayang { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 80; display: none;
  background: rgba(76, 58, 122, 0.94);
  align-items: center; justify-content: center; flex-direction: column; padding: 18px;
}
.lightbox.buka { display: flex; }
.lightbox img { max-width: min(680px, 94vw); max-height: 76vh; border-radius: 10px; border: 4px solid var(--putih); object-fit: contain; background: var(--putih); }
.lightbox .tutup {
  position: absolute; top: 14px; right: 14px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--biru-tua); color: #fff; border: none; font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.lightbox .nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--biru-tua); border: none; font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.lightbox .nav.kiri { left: 10px; } .lightbox .nav.kanan { right: 10px; }
.lightbox .keterangan { color: #BAE6FD; font-family: "Marykate", cursive; font-size: 1.35rem; margin-top: 14px; text-align: center; }

/* ============================================================
   Lapisan profesional: navigasi bawah, aksesibilitas, cetak
   ============================================================ */
section[id] { scroll-margin-top: 14px; }
.panggung { padding-bottom: 78px; }
:focus-visible { outline: 3px solid var(--ungu-tua); outline-offset: 2px; border-radius: 6px; }

/* ===== Navigasi bawah (muncul setelah undangan dibuka) ===== */
.nav-bawah {
  position: fixed; left: 50%; bottom: 0; z-index: 55;
  width: min(480px, 100%);
  transform: translate(-50%, 110%);
  transition: transform 0.6s cubic-bezier(0.22, 0.8, 0.32, 1);
  display: flex;
  background: var(--putih);
  border-top: 2px solid var(--garis-biru);
  /* Tanpa bayangan atas: bayangan ini terlihat seperti garis batas di bawah layar. */
  box-shadow: none;
  padding-bottom: env(safe-area-inset-bottom);
}
body.terbuka .nav-bawah { transform: translate(-50%, 0); }
.nav-bawah a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 2px 8px; min-height: 56px; justify-content: center;
  color: var(--teks-lembut); text-decoration: none;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em;
}

/* Layar lebar (di atas 480px): navigasi bawah melebar penuh mengikuti layar,
   ikon tetap berkelompok rapi di tengah (5 x 96px). */
@media (min-width: 481px) {
  .nav-bawah {
    left: 0;
    width: 100%;
    transform: translate(0, 110%);
    justify-content: center;
  }
  body.terbuka .nav-bawah { transform: translate(0, 0); }
  .nav-bawah a { flex: 0 0 96px; }
}
.nav-bawah a svg { width: 22px; height: 22px; }
.nav-bawah a.aktif { color: var(--ungu-tua); }
.nav-bawah a.aktif svg { color: var(--ungu-tua); }

/* ===== Rel lagu bisa digeser (seek) ===== */
.rel { cursor: pointer; }
.rel:focus-visible { outline-offset: 3px; }

/* ===== Tombol simpan ke kalender ===== */
.tombol.kalender { margin-top: 16px; background: var(--putih); border: 2px solid var(--ungu); box-shadow: 0 5px 0 var(--ungu); }
.tombol.kalender:active { box-shadow: 0 1px 0 var(--ungu); }

@media (prefers-reduced-motion: reduce) {
  .nav-bawah { transition: none; }
}


/* ============================================================
   Lapisan gerak hidup — halaman tidak pernah benar-benar diam:
   hati ambient melayang, bingkai & foto bergoyang pelan, judul
   bernapas, angka countdown menyembul tiap detik, tombol
   mengundang disentuh, dan pemutar berdansa saat lagu main.
   Gerak idle memakai properti translate/rotate/scale agar tidak
   menabrak animasi masuk (transform) — keduanya berpadu.
   ============================================================ */

/* Hati ambient di latar panggung + parallax lembut dari JS (--par) */
.hati-ambient {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none; z-index: 0;
  transform: translateY(calc(var(--par, 0) * -0.05px));
}
.hati-ambient .ha {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--s); height: auto; aspect-ratio: 24 / 22;
  opacity: 0.45;
  animation: hanyutHati var(--d, 11s) ease-in-out var(--dl, 0s) infinite;
}
.hati-ambient .ha.u { color: var(--ungu); }
.hati-ambient .ha.b { color: var(--biru); }
.percik { translate: 0 calc(var(--par, 0) * -0.1px); }

/* Judul seksi bernapas, hiasan judul bergoyang */
.anim .reveal.tampil .judul-seksi { animation: napasJudul 7s ease-in-out infinite; }
.hiasan-judul svg { animation: goyangKecil 5s ease-in-out infinite; transform-origin: center; }
section:nth-of-type(even) .hiasan-judul svg { animation-duration: 6.4s; animation-delay: -1.8s; }

/* Nama panggilan & tanda "&" ikut hidup */
.nama-panggilan { animation: napasJudul 6s ease-in-out infinite; }
.dan-besar { animation: napasBesar 3.4s ease-in-out infinite; }

/* Ilustrasi janji kelingking: melayang setelah animasi masuk selesai */
.anim .reveal.tampil .tangan-janji {
  animation: popMasuk 0.85s cubic-bezier(0.3, 1.35, 0.44, 1) backwards, apungTangan 5.5s ease-in-out 1.3s infinite;
  animation-delay: calc(var(--tunda, 0) * 150ms + 140ms), 1.4s;
}

/* Foto galeri bergoyang halus seperti polaroid tertiup angin */
.anim .reveal.tampil .galeri figure.pop {
  animation: popMasuk 0.85s cubic-bezier(0.3, 1.35, 0.44, 1) backwards, goyangGaleri 7s ease-in-out 1.4s infinite;
  animation-delay: calc(var(--tunda, 0) * 150ms + 140ms), 1.5s;
}
.anim .reveal.tampil .galeri figure.pop:nth-child(2) { animation-duration: 0.85s, 8.5s; animation-delay: calc(var(--tunda, 0) * 150ms + 140ms), -2s; }
.anim .reveal.tampil .galeri figure.pop:nth-child(3) { animation-duration: 0.85s, 7.6s; animation-delay: calc(var(--tunda, 0) * 150ms + 140ms), -4s; }

/* Coretan "D-day!!" bergoyang, hati timeline berdetak bergantian */
.sel-hari .coretan-dday { animation: goyangCoretan 4.5s ease-in-out infinite; }
.bab .hati-tl { animation: detak 2.8s ease-in-out infinite; }
.cerita .bab:nth-of-type(2) .hati-tl { animation-delay: -0.7s; }
.cerita .bab:nth-of-type(3) .hati-tl { animation-delay: -1.4s; }
.cerita .bab:nth-of-type(4) .hati-tl { animation-delay: -2.1s; }

/* Kotak countdown & kartu gift: bayangan bernapas */
.kotak-hitung-besar, .kartu-gift { animation: napasBayangan 5s ease-in-out infinite; }
.kartu-gift { animation-delay: -2.2s; }

/* Angka countdown menyembul setiap berubah */
.satuan .angka.sembul { animation: sembul 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }

/* Tombol: terangkat saat diarahkan, tetap tenggelam saat ditekan */
.tombol:hover { transform: translateY(-2px); filter: brightness(1.04); }
.tombol:active { transform: translateY(4px); }
.tombol.buka { animation: undangKetuk 2.8s ease-in-out infinite; }

/* Kartu ucapan terangkat halus saat diarahkan */
.ucapan { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.ucapan:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(109, 91, 208, 0.14); }
.form-ucapan input[type="text"], .form-ucapan textarea { transition: border-color 0.2s ease, box-shadow 0.2s ease; }

/* Ikon navigasi bawah memantul saat seksi aktif */
.nav-bawah a svg { transition: transform 0.25s ease; }
.nav-bawah a.aktif svg { transform: translateY(-2px) scale(1.14); }

/* Lightbox: foto masuk dengan pop pegas */
.lightbox.buka img { animation: popMasuk 0.5s cubic-bezier(0.3, 1.35, 0.44, 1); }
.lightbox.buka .keterangan { animation: naikMasuk 0.6s ease 0.1s backwards; }

/* ===== Pemutar lagu: equalizer menari + tombol berdenyut saat lagu main ===== */
.pemutar { position: relative; transition: border-color 0.4s ease, box-shadow 0.4s ease; }
.pemutar.memutar { border-color: var(--ungu); box-shadow: 0 12px 28px rgba(167, 139, 250, 0.22); }
/* Saat lagu jalan, sembunyikan "Click to play our song!" supaya tidak bentrok dengan status lagu. */
.pemutar.memutar .klik-lagu { display: none; }
.eq { display: flex; gap: 3.5px; align-items: flex-end; justify-content: center; height: 16px; margin: 10px 0 0; }
.eq span { width: 4px; border-radius: 2px; background: var(--ungu); opacity: 0.3; transform-origin: bottom; }
.eq span:nth-child(1) { height: 55%; }
.eq span:nth-child(2) { height: 90%; background: var(--biru); }
.eq span:nth-child(3) { height: 65%; }
.eq span:nth-child(4) { height: 100%; background: var(--biru); }
.eq span:nth-child(5) { height: 45%; }
.pemutar.memutar .eq span { opacity: 1; animation: gelombang 0.9s ease-in-out infinite; }
.pemutar.memutar .eq span:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.2s; }
.pemutar.memutar .eq span:nth-child(3) { animation-duration: 1.1s; animation-delay: -0.45s; }
.pemutar.memutar .eq span:nth-child(4) { animation-duration: 0.8s; animation-delay: -0.1s; }
.pemutar.memutar .eq span:nth-child(5) { animation-duration: 1.25s; animation-delay: -0.6s; }
.pemutar.memutar .kontrol .main { animation: denyutTombol 1.6s ease-out infinite; }
.rel .isi-rel { transition: width 0.3s linear; }
.teks-status-lagu { font-size: 0.8rem; color: var(--teks-lembut); margin: 8px 0 0; min-height: 1.2em; }

/* ===== Blok tempat bersama (alamat ditulis sekali untuk Akad & Resepsi) ===== */
.tempat-acara {
  margin: 26px auto 0; max-width: 360px; text-align: center; color: var(--biru-dalam);
  background: var(--putih); border: 2px dashed var(--ungu); border-radius: 18px;
  padding: 18px 18px 20px;
}
.tempat-acara .tempat-label { font-family: "Marykate", cursive; font-size: 1.35rem; color: var(--ungu-tua); margin: 0; }
.tempat-acara .tempat-alamat { margin: 6px 0 0; }
.tempat-acara .tombol { margin-top: 14px; }

/* ===== Huruf judul cover masuk satu per satu (dipasang lewat JS) ===== */
.cover h1 .kata { display: inline-block; white-space: nowrap; }
.cover h1 .huruf { display: inline-block; opacity: 0; transform: translateY(16px) rotate(2deg); }
.cover h1 .huruf.tampil-h { opacity: 1; transform: translateY(0) rotate(0deg); transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.3, 1.4, 0.5, 1); }

/* ===== Ledakan hati saat cover dibuka (hati dibuat lewat JS) ===== */
.ledakan-hati { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.ledakan-hati svg { position: absolute; animation: ledakNaik 1.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }

/* ===== Cetak: tampilkan isi undangan tanpa elemen interaktif ===== */
@media print {
  .cover, .nav-bawah, .lightbox, .pemutar, .tombol, .hati-ambient, .ledakan-hati, .eq { display: none !important; }
  body.terkunci { overflow: visible; }
  .panggung { box-shadow: none; padding-bottom: 0; max-width: 100%; }
  .anim .reveal, .anim .reveal .pop { opacity: 1 !important; animation: none !important; }
}
