/* ==========================================================================
   khitanan-aqiqah-flyer-gembira — styles.css
   Flyer pengumuman Khitanan & Aqiqah (gaya selebaran penuh sukacita).

   Semua warna & ukuran dapat disesuaikan melalui variabel di bawah.
   ========================================================================== */

:root {
  /* Palet */
  --bg:            #F6EFDF;   /* latar halaman (di luar kartu) */
  --paper:         #FFFDF6;   /* latar kartu */
  --ink:           #2E2A24;   /* teks utama */
  --green-900:     #0E4D34;   /* hijau tua (utama) */
  --green-950:     #0A3A28;   /* hijau paling tua (teks di atas emas) */
  --green-700:     #1B6B4A;   /* hijau terang */
  --gold:          #C9A227;   /* emas */
  --gold-soft:     #E8C766;
  --coral:         #E86A4E;   /* aksen ceria */
  --error:         #B43B2F;
  --line:          rgba(14, 77, 52, 0.16);

  /* Tipografi */
  --font-display: 'Baloo 2', 'Trebuchet MS', 'Comic Sans MS', system-ui, sans-serif;
  --font-script:  'Dancing Script', 'Brush Script MT', cursive;
  --font-body:    'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Bentuk */
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px rgba(46, 42, 36, 0.16);
  --shadow-soft: 0 8px 22px rgba(46, 42, 36, 0.10);

  --shell-max: 480px;
  --nav-h: 62px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  /* Pola bintang segi delapan halus di latar halaman */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23C9A227' stroke-width='1.4' opacity='.16'%3E%3Crect x='32' y='32' width='32' height='32'/%3E%3Crect x='32' y='32' width='32' height='32' transform='rotate(45 48 48)'/%3E%3Ccircle cx='48' cy='48' r='6'/%3E%3C/g%3E%3C/svg%3E");
  overflow: hidden;
}

/* ---------- Utilitas ---------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.is-hidden { display: none !important; }

/* Atribut hidden benar-benar menyembunyikan elemen — mengalahkan aturan display
   lain (mis. lightbox dengan display: flex atau tab galeri yang dinonaktifkan). */
[hidden] { display: none !important; }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 1000;
  padding: 10px 16px; border-radius: 999px;
  background: var(--green-900); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 14px;
  transform: translateY(-150%); transition: transform .2s ease;
}
.skip-link:focus { transform: none; }

/* ==========================================================================
   Kerangka satu layar (100dvh). Hanya panel aktif yang menggulir di dalam.
   ========================================================================== */
.shell {
  position: relative;
  height: 100vh;               /* fallback */
  height: 100dvh;
  max-width: var(--shell-max);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.shell__viewport {
  position: absolute; inset: 0;
  overflow: hidden;
}

/* ---------- Panel ---------- */
.panel {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(var(--nav-h) + 34px + env(safe-area-inset-bottom));
  visibility: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.panel.is-active {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .45s ease, transform .45s ease;
}
.panel:empty { display: none; }

.panel:focus-visible { outline: none; }

.panel-inner {
  max-width: 430px;
  margin: 0 auto;
  padding: 34px 22px 40px;
  text-align: center;
}

/* ---------- Navigasi bawah (tab) ---------- */
.panel-nav {
  position: absolute; left: 12px; right: 12px; bottom: 0;
  z-index: 20;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.panel-nav__inner {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--green-900);
  box-shadow: 0 10px 26px rgba(14, 77, 52, 0.35);
  pointer-events: auto;
  /* Dengan 7 bagian (Undangan, Acara, Poster, Video, Galeri, RSVP, Tamu),
     navigasi bisa digulir mendatar di layar sempit — semua tombol tetap
     terbaca, tidak ada yang terpotong. */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.panel-nav__inner::-webkit-scrollbar { display: none; }
.panel-nav__tab {
  appearance: none; border: 0; cursor: pointer;
  flex: 1 0 auto;
  min-width: max-content;
  font-family: var(--font-body);
  font-size: clamp(10px, 3vw, 13px); font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  padding: 13px 10px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease;
}
.panel-nav__tab:hover { color: #fff; }
.panel-nav__tab:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: -2px;
}
.panel-nav__tab.is-active {
  background: var(--gold);
  color: var(--green-950);
}
.panel-nav__label { display: inline-block; }

/* ==========================================================================
   Tipografi & ornamen
   ========================================================================== */
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 800;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--green-700);
}

.flyer-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(34px, 10vw, 46px);
  line-height: 1.08;
  font-weight: 800;
  color: var(--green-900);
  text-wrap: balance;
}

.hero-intro {
  margin: 0 auto 20px;
  max-width: 34ch;
  font-size: 15px; line-height: 1.65;
  color: rgba(46, 42, 36, 0.82);
}

.bunting { display: block; width: 100%; height: 52px; margin-bottom: 8px; }

/* ---------- Foto (dengan fallback monogram) ---------- */
.photo {
  position: relative;
  width: 148px; height: 148px;
  margin: 6px auto 18px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.photo__img {
  display: block; width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  cursor: zoom-in;
}
.photo__img:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 3px; }
/* Lencana kaca pembesar: isyarat lembut bahwa foto bisa diketuk untuk diperbesar */
.photo-zoom-badge {
  position: absolute; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--green-900);
  box-shadow: var(--shadow-soft);
  pointer-events: none;
}
.photo-zoom-badge svg { width: 16px; height: 16px; }
/* Fallback: jika foto belum diunggah, tampilkan monogram inisial */
.photo.is-fallback { display: flex; align-items: center; justify-content: center; }
.photo.is-fallback .photo__img { display: none; }
.photo.is-fallback .photo-zoom-badge { display: none; }
.photo.is-fallback {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.25), transparent 40%),
    linear-gradient(135deg, var(--green-700), var(--green-900));
}
.photo.is-fallback::after {
  content: attr(data-monogram);
  display: flex; align-items: center; justify-content: center;
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 3px dashed var(--gold-soft);
  font-family: var(--font-script);
  font-size: 52px; font-weight: 700;
  color: var(--gold-soft);
}

/* ---------- Nama anak & orang tua ---------- */
.child-name {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--green-700);
}
.child-name__text {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(40px, 12vw, 56px);
  line-height: 1.15;
  letter-spacing: .01em;
  text-transform: none;
  font-weight: 700;
  color: var(--green-900);
  overflow-wrap: anywhere;
  margin-top: 2px;
}

.parents {
  margin: 0 auto 20px;
  font-size: 15px; line-height: 1.7;
  color: rgba(46, 42, 36, 0.9);
}
.parents strong { color: var(--ink); }

/* ---------- Chip tanggal ---------- */
.date-chip {
  display: inline-flex;
  align-items: center; gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--green-900);
  color: #fff;
  font-size: 14px; line-height: 1.5;
  text-align: left;
  box-shadow: var(--shadow-soft);
}
.date-chip__icon { width: 20px; height: 20px; flex: none; color: var(--gold-soft); }
.date-chip strong { color: var(--gold-soft); font-weight: 800; }

.venue-line {
  margin: 14px auto 0;
  max-width: 40ch;
  font-size: 13.5px; line-height: 1.6;
  color: rgba(46, 42, 36, 0.72);
}

.hero-note {
  margin: 18px 0 0;
  font-size: 13.5px; line-height: 1.6;
  font-style: italic;
  color: var(--green-700);
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 14.5px; font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.btn--primary { background: var(--green-900); color: #fff; box-shadow: var(--shadow-soft); }
.btn--primary:hover { background: var(--green-700); }

.btn--ghost { background: transparent; color: var(--green-900); border-color: var(--green-900); }
.btn--ghost:hover { background: rgba(14, 77, 52, 0.08); }

.btn--icon {
  width: 48px; height: 48px; padding: 0;
  border-radius: 50%;
  background: var(--gold);
  color: var(--green-900);
}
.btn--icon svg { width: 22px; height: 22px; }
.btn--icon:hover { background: var(--gold-soft); }

.btn--block { width: 100%; margin-top: 6px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; align-items: center;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- Pembatas dekoratif ---------- */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 34px 0 4px;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.divider::after { background: linear-gradient(90deg, var(--line), transparent); }

/* ==========================================================================
   Panel detail acara
   ========================================================================== */
.section-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(26px, 8vw, 34px);
  font-weight: 800;
  color: var(--green-900);
  text-wrap: balance;
}
.section-intro {
  margin: 0 auto 24px;
  max-width: 38ch;
  font-size: 14.5px; line-height: 1.65;
  color: rgba(46, 42, 36, 0.8);
}

/* ---------- Hitung mundur ---------- */
.countdown { margin-bottom: 26px; }
.countdown__caption {
  margin: 0 0 12px;
  font-size: 13px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-700);
}
.countdown__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.countdown__cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--green-900);
}
.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(22px, 7vw, 30px); font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold-soft);
}
.countdown__label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}
.countdown__over { display: none; margin: 0; font-weight: 700; color: var(--green-700); }
.countdown.is-over .countdown__grid { display: none; }
.countdown.is-over .countdown__over { display: block; }
.countdown.is-hidden { display: none; }

/* ---------- Kartu detail ---------- */
.detail-cards { display: grid; gap: 12px; margin-bottom: 26px; text-align: left; }
.detail-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius);
  background: #FBF6E8;
  border: 1px solid var(--line);
}
.detail-card__icon {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green-900);
  color: var(--gold-soft);
}
.detail-card__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.detail-card__icon svg path { fill: currentColor; stroke: none; }
.detail-card__title { margin: 2px 0 4px; font-size: 14px; font-weight: 800; color: var(--green-900); }
.detail-card__text { margin: 0; font-size: 13.5px; line-height: 1.6; }
.detail-card__link {
  display: inline-block; margin-top: 6px;
  font-size: 13px; font-weight: 800;
  color: var(--green-700); text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Timeline acara ---------- */
.sub-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 19px; font-weight: 800;
  color: var(--green-900);
}
.timeline {
  list-style: none;
  margin: 0 0 22px; padding: 0;
  text-align: left;
  border-left: 2px solid var(--line);
  margin-left: 74px;
}
.timeline li {
  position: relative;
  padding: 0 0 16px 20px;
  font-size: 14px; line-height: 1.55;
}
.timeline li::before {
  content: "";
  position: absolute; left: -7px; top: 5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--gold);
}
.timeline__time {
  position: absolute; left: -96px; top: 0;
  width: 76px; text-align: right;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}

.note {
  margin: 0 auto 12px;
  max-width: 40ch;
  font-size: 13.5px; line-height: 1.65;
  color: rgba(46, 42, 36, 0.78);
}
.note--deadline {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(201, 162, 39, 0.16);
  border: 1px dashed var(--gold);
  color: var(--ink);
}

/* ==========================================================================
   Galeri foto (fitur opsional — placeholder bergambar tampil secara default)
   ========================================================================== */
.gallery-wrap { text-align: left; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.photo-card { margin: 0; position: relative; }

.photo-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3; /* memotong foto apa pun agar pas di petak galeri */
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FBF6E8;
  cursor: zoom-in;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}
.photo-img:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -16px rgba(46, 42, 36, 0.4); }
.photo-img:active { transform: translateY(0); }
.photo-img:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Lencana kaca pembesar pada petak galeri (dan poster di bawah): isyarat
   bahwa foto bisa diketuk untuk diperbesar. Selalu tampil di layar sentuh;
   di perangkat dengan kursor hanya muncul saat hover/fokus. */
html:not(.shell-off) .photo-card::after,
html:not(.shell-off) .banner-flyer::after,
html:not(.shell-off) .free-block__media::after {
  content: "";
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 253, 246, 0.95)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E4D34' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E")
    center / 16px no-repeat;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px -4px rgba(46, 42, 36, 0.4);
  opacity: 1;
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
@media (hover: hover) {
  html:not(.shell-off) .photo-card::after,
  html:not(.shell-off) .banner-flyer::after,
  html:not(.shell-off) .free-block__media::after {
    opacity: 0;
    transform: translateY(-3px);
  }
  html:not(.shell-off) .photo-card:hover::after,
  html:not(.shell-off) .photo-card:focus-within::after,
  html:not(.shell-off) .banner-flyer:hover::after,
  html:not(.shell-off) .banner-flyer:focus-within::after,
  html:not(.shell-off) .free-block__media:hover::after,
  html:not(.shell-off) .free-block__media:focus-within::after {
    opacity: 1;
    transform: none;
  }
}

.photo-card figcaption {
  margin: 8px 2px 0;
  font-size: 11px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  text-align: center;
  color: var(--green-700);
  overflow-wrap: anywhere;
}

.gallery-hint {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px; font-weight: 700;
  color: var(--green-700);
}

/* ==========================================================================
   Halaman bebas / free page (fitur opsional — judul, intro, blok-blok bebas)
   ========================================================================== */
.free-wrap { text-align: left; }

.free-blocks {
  display: grid;
  gap: 16px;
}

.free-block {
  padding: 18px;
  border-radius: var(--radius);
  background: #FBF6E8;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.free-block__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 800;
  color: var(--green-900);
  overflow-wrap: anywhere;
}

.free-block__content {
  margin: 0 0 14px;
  font-size: 14px; line-height: 1.65;
  color: rgba(46, 42, 36, 0.8);
  overflow-wrap: anywhere;
  white-space: pre-line; /* isi textarea: baris baru tetap dipertahankan */
}

/* Foto blok bersifat opsional: petak foto tanpa gambar ikut disembunyikan */
.free-block__media { margin: 0; position: relative; }
.free-block__media:not(:has(img)) { display: none; }

.free-block__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FBF6E8;
  cursor: zoom-in;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}
.free-block__img:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -16px rgba(46, 42, 36, 0.4); }
.free-block__img:active { transform: translateY(0); }
.free-block__img:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.free-block__cap {
  margin: 8px 2px 0;
  font-size: 11px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  text-align: center;
  color: var(--green-700);
  overflow-wrap: anywhere;
}

.free-powered-by {
  margin: 22px 0 0;
  text-align: center;
  font-family: var(--font-script);
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 700;
  color: var(--green-700);
}

/* ==========================================================================
   Poster resmi / banner (fitur opsional — placeholder bergambar bawaan)
   ========================================================================== */
.banner-flyer { margin: 0; position: relative; }
.banner-flyer img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  padding: 5px;
  background: #FBF6E8;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
}
.banner-flyer img:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.banner-flyer figcaption {
  margin-top: 10px;
  font-size: 12px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  text-align: center;
  color: var(--green-700);
}

/* ==========================================================================
   Video (fitur opsional — poster + tombol putar, iframe dimuat saat diketuk)
   ========================================================================== */
.film-card { margin-top: 2px; }

.film-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 5px;
  border-radius: var(--radius-sm);
  background: #FBF6E8;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.film-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
  background: var(--paper);
  cursor: pointer;
}
.film-open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-open:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.film-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 66px; height: 66px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--green-900);
  box-shadow: 0 8px 24px rgba(46, 42, 36, 0.35);
  animation: film-pulse 2.6s ease-in-out infinite;
}
.film-play svg { width: 26px; height: 26px; margin-left: 3px; }
.film-open:hover .film-play { transform: translate(-50%, -50%) scale(1.08); }

.film-hint {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(46, 42, 36, 0.55);
  color: var(--paper);
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .04em;
}

.film-frame iframe {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  border: 0;
  border-radius: 9px;
}

.film-note {
  margin: 0;
  padding: 18px 20px;
  border-radius: 9px;
  background: #FBF6E8;
  color: rgba(46, 42, 36, 0.78);
  font-size: 13.5px;
  font-style: italic;
  text-align: center;
}

.film-external {
  display: inline-block;
  margin-top: 14px;
  font-size: 13.5px; font-weight: 800;
  letter-spacing: .04em;
  color: var(--green-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.film-external[hidden] { display: none; }

@keyframes film-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(46, 42, 36, 0.35), 0 0 0 0 rgba(201, 162, 39, 0.5); }
  50%      { box-shadow: 0 8px 24px rgba(46, 42, 36, 0.35), 0 0 0 16px rgba(201, 162, 39, 0); }
}

/* ==========================================================================
   Lightbox (penampil foto galeri)
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  background: rgba(10, 58, 40, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox-backdrop { position: absolute; inset: 0; }

.lightbox-figure {
  position: relative;
  z-index: 1;
  max-width: min(860px, 92vw);
  max-height: 90vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.55);
}
/* Bidang gulir foto — menjadi permukaan pan saat diperbesar */
.lightbox-scroll {
  max-width: 100%;
  max-height: 76vh;
  overflow: hidden;
}
.lightbox-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: #FBF6E8;
  cursor: zoom-in;
}
/* Diperbesar: foto membesar ke 200% dan bidang gulir menggeser untuk pan */
.lightbox.is-zoomed .lightbox-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.lightbox.is-zoomed .lightbox-img {
  width: 200%;
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.lightbox-cap {
  width: 100%;
  padding: 12px 20px;
  font-size: 12.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  overflow-wrap: anywhere;
}
.lightbox-count {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 12px; font-weight: 700;
  color: #fff;
  background: rgba(10, 58, 40, 0.55);
  padding: 4px 10px;
  border-radius: 999px;
}

.lightbox-close,
.lightbox-nav,
.lightbox-zoom {
  position: absolute;
  z-index: 2;
  appearance: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 250, 246, 0.16);
  font-size: 1.4rem;
  line-height: 1;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background .2s ease, transform .15s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover:not(:disabled),
.lightbox-zoom:hover { background: rgba(255, 250, 246, 0.3); }
.lightbox-nav:disabled { opacity: 0.4; cursor: default; }
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible,
.lightbox-zoom:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-zoom { top: 14px; left: 14px; display: flex; align-items: center; justify-content: center; }
.lightbox-zoom svg { width: 20px; height: 20px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

/* ==========================================================================
   Formulir RSVP
   ========================================================================== */
.rsvp-form { text-align: left; }

.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px; font-weight: 800;
  color: var(--ink);
}
.form-field .req { color: var(--coral); }
.form-field .optional { font-weight: 600; color: rgba(46, 42, 36, 0.55); font-size: 12px; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(27, 107, 74, 0.18);
}
.form-field textarea { resize: vertical; min-height: 76px; }
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%230E4D34' stroke-width='2' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(46, 42, 36, 0.4); }

/* Pesan error: kosong = tersembunyi, berisi = muncul (diisi platform) */
.rsvp-error {
  display: none;
  margin-top: 6px;
  font-size: 13px; font-weight: 700;
  color: var(--error);
}
.rsvp-error:not(:empty) { display: block; }
.rsvp-error.show, .rsvp-error.visible, .rsvp-error.is-visible { display: block; }

/* Detail kehadiran: diciutkan bila memilih "tidak hadir" */
.rsvp-details {
  border: 0; margin: 0; padding: 0;
  max-height: 600px;
  overflow: hidden;
  transition: max-height .35s ease, opacity .35s ease;
}
.rsvp-details.is-collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Node loading: disembunyikan sampai platform menampilkannya */
.loading {
  display: none;
  align-items: center; justify-content: center; gap: 10px;
  margin-top: 16px;
  font-size: 14px; font-weight: 700;
  color: var(--green-700);
}
.loading.show, .loading.visible, .loading.is-visible { display: flex; }
.loading__spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(27, 107, 74, 0.25);
  border-top-color: var(--green-700);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-footnote {
  margin: 14px auto 0;
  max-width: 40ch;
  font-size: 12.5px; line-height: 1.6;
  color: rgba(46, 42, 36, 0.6);
}

/* ==========================================================================
   Buku tamu
   ========================================================================== */
.guestbook-section { text-align: left; }

.guestbook-body {
  min-height: 140px;
  border-radius: var(--radius);
  border: 2px dashed var(--line);
  background: #FBF6E8;
  padding: 18px;
}
/* Keadaan kosong: hanya tampil saat belum ada isi (dihapus otomatis oleh CSS
   begitu platform mengisi buku tamu) */
.guestbook-body:empty::before {
  content: "Belum ada ucapan. Jadilah tamu pertama yang meninggalkan doa & kesan untuk ananda. ✍️";
  display: flex;
  align-items: center; justify-content: center;
  min-height: 104px;
  text-align: center;
  font-size: 13.5px; line-height: 1.6;
  color: rgba(46, 42, 36, 0.55);
}

/* ---------- Footer brand (placeholder) ---------- */
/* .app-footer diselipkan ke panel terakhir oleh main.js; di dalam panel,
   panel-inner sudah text-align: center sehingga footer ikut di tengah. */
.app-footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  text-align: center;
}
.footer-brand {
  margin: 0 0 4px;
  font-size: 13.5px; font-weight: 800;
  color: var(--green-900);
}
.footer-brand-name {
  font-family: var(--font-script);
  font-size: 1.28em;
  color: var(--green-700);
}
.site-footer__small { font-weight: 600 !important; font-size: 12px !important; color: rgba(46, 42, 36, 0.55) !important; margin: 0; }

/* Powered-by Kundangi — baris brand platform full-width (kelas tepat 'powered-by') */
.powered-by {
  width: 100%;
  margin: 12px 0 0;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(46, 42, 36, 0.55);
}
.powered-by__name { color: var(--green-700); }

/* ---------- Toast (umpan balik "tautan disalin") ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 96px;
  transform: translate(-50%, 20px);
  z-index: 50;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--green-900);
  color: #fff;
  font-size: 13.5px; font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Aksesibilitas: gerak terbatas
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .panel { transform: none; }
  .rsvp-details { transition: none; }
  .btn:hover { transform: none; }
}

/* ==========================================================================
   Layar lebar: kartu mengambang di tengah
   ========================================================================== */
@media (min-width: 560px) {
  body { display: flex; align-items: center; justify-content: center; }
  /* width: 100% wajib — tanpa itu, sebagai flex item shell menyusut ke
     lebar konten (0px, karena .shell__viewport position: absolute). */
  .shell {
    width: 100%;
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    border-radius: 24px;
    margin: 24px auto;
  }
  .panel-inner { padding-top: 40px; }
}

/* ==========================================================================
   Cetak: seluruh panel tampil berurutan, navigasi disembunyikan
   ========================================================================== */
@media print {
  @page { margin: 12mm; }

  html, body { height: auto; overflow: visible; background: #fff; }
  body { display: block; }

  .shell {
    height: auto; max-width: none;
    margin: 0; border-radius: 0; box-shadow: none;
    overflow: visible;
  }
  .shell__viewport { position: static; }

  .panel {
    position: static;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none;
    overflow: visible;
    height: auto;
    padding-bottom: 0;
    page-break-after: always;
  }
  .panel.is-active { transition: none; }

  .panel-nav, .skip-link, .toast, .bunting, .lightbox { display: none !important; }
  .countdown__grid { display: none !important; }
  .countdown__over { display: none !important; }
  .photo-zoom-badge,
  .photo-card::after,
  .banner-flyer::after,
  .free-block__media::after,
  .film-play,
  .film-hint { display: none !important; }

  .panel-inner { max-width: none; padding: 12px 0; }

  a { color: inherit; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10px; color: #666; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==========================================================================
   Fail-open (kelas .shell-off dipasang inline script di index.html bila
   main.js tidak berjalan): kartu menjadi halaman gulir biasa, tidak ada
   konten yang terpotong.
   ========================================================================== */
html.shell-off,
html.shell-off body { height: auto; overflow: auto; }

html.shell-off .shell {
  height: auto;
  max-width: none;
  overflow: visible;
}
html.shell-off .shell__viewport { position: static; }

html.shell-off .panel {
  position: static;
  visibility: visible;
  opacity: 1;
  transform: none;
  overflow: visible;
  height: auto;
  padding-bottom: 0;
}

html.shell-off .panel-nav { display: none; }
html.shell-off .skip-link { display: none; }


/* ── Guestbook (platform-injected form + message list) ─────────────── */
.guestbook-body .guestbook-form { text-align: left; }

.guestbook-body #guestbookForm {
  display: grid;
  gap: 14px;
  padding: 22px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.guestbook-body #guestbookForm .form-group { margin: 0; }

.guestbook-body #guestbookForm .form-group label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-700);
}

.guestbook-body #guestbookForm .form-control {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.guestbook-body #guestbookForm .form-control::placeholder { color: rgba(46, 42, 36, 0.45); }
.guestbook-body #guestbookForm .form-control:focus {
  outline: none;
  border-color: var(--green-900);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.35);
}
.guestbook-body #guestbookForm textarea.form-control { resize: vertical; min-height: 96px; }

.guestbook-body #guestbookForm .error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--error);
}

.guestbook-body #guestbookForm .guestbook-chapta {
  max-width: 304px;
  margin: 0 auto;
}

/* !important beats Bootstrap .bg-kundangan / .text-white / .px-3 */
.guestbook-body #guestbookForm button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px !important;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--green-900) !important;
  color: #fff !important;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.guestbook-body #guestbookForm button[type="submit"]:hover { background: var(--green-700) !important; transform: translateY(-2px); }
.guestbook-body #guestbookForm button[type="submit"]:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.guestbook-body #guestbookForm .ph { vertical-align: -0.125em; margin-right: 6px; }

.guestbook-body .loading-guestbook {
  text-align: center;
  padding: 10px;
  font-size: 14px;
  color: var(--green-700);
}

#comments-container.guestbook-wrap {
  border-top: 1px solid var(--line) !important;
  margin-top: 26px !important;
  max-height: none !important;
  padding: 20px 2px 2px;
}

.guestbook-entry {
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.guestbook-entry:last-child { border-bottom: 0; }
.guestbook-entry h5 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.guestbook-entry p {
  margin: 0 0 6px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  opacity: .8;
  overflow-wrap: anywhere;
}
.guestbook-entry small { font-size: 12px; color: rgba(46, 42, 36, 0.55); }

.more-guestbook-wrap { text-align: center; margin-top: 20px; }
#load-more {
  padding: 11px 26px;
  border: 2px solid var(--green-900);
  border-radius: 999px;
  background: transparent;
  color: var(--green-900);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
#load-more:hover { background: rgba(14, 77, 52, 0.08); transform: translateY(-2px); }
