/* ==========================================================================
   khitanan-aqiqah-card-barakah — styles.css
   Kartu undangan formal Khitanan & Aqiqah (gaya kartu pos cetak yang anggun).

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

:root {
  /* Palet */
  --bg:            #EDE6D6;   /* latar halaman (di luar kartu) */
  --paper:         #FDFBF3;   /* latar kartu */
  --ink:           #2B3731;   /* teks utama (hijau kehitaman) */
  --green-900:     #23352C;   /* hijau tua */
  --green-700:     #2E5E45;   /* hijau utama */
  --gold:          #8F6B2E;   /* emas tua (teks & aksen, kontras aman) */
  --gold-soft:     #C9A45C;
  --error:         #A63D2E;
  --line:          rgba(46, 94, 69, 0.18);

  /* Tipografi */
  --font-serif:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-arabic:  'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;
  --font-body:    'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Bentuk */
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 44px rgba(43, 55, 49, 0.18);
  --shadow-soft: 0 8px 20px rgba(43, 55, 49, 0.10);

  --shell-max: 480px;
  --nav-h: 62px;
  --powered-h: 24px;   /* tinggi strip "Powered by" di bawah navigasi */
}

/* ---------- 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='%23A9813B' stroke-width='1.4' opacity='.14'%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; }

.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 + var(--powered-h) + 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: calc(var(--powered-h) + env(safe-area-inset-bottom));
  z-index: 20;
  padding-bottom: 0;
  pointer-events: none;
}
.panel-nav__inner {
  display: grid;
  /* auto-fit: jumlah kolom mengikuti jumlah tab yang tampil
     (tab yang disembunyikan otomatis "diciutkan" agar navigasi tetap rapi) */
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--green-900);
  box-shadow: 0 10px 26px rgba(35, 53, 44, 0.35);
  pointer-events: auto;
}
.panel-nav__tab {
  appearance: none; border: 0; cursor: pointer;
  font-family: var(--font-body);
  font-size: clamp(9.5px, 2.9vw, 13px);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  min-height: 44px;              /* target sentuh minimal (aksesibilitas) */
  padding: 11px 2px;
  border-radius: 999px;
  touch-action: manipulation;    /* tanpa tunda ketuk ganda di iOS */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;       /* judul panjang halaman bebas dipotong rapi */
  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: #fff;
}
.panel-nav__label { display: inline-block; white-space: nowrap; }

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

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0;
  color: var(--gold);
  font-size: 13px;
}
.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); }

.section-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(25px, 8vw, 33px);
  font-weight: 700;
  color: var(--green-900);
  text-wrap: balance;
}
.section-intro {
  margin: 0 auto 24px;
  max-width: 40ch;
  font-size: 14.5px; line-height: 1.7;
  color: rgba(43, 55, 49, 0.78);
}

.sub-title {
  margin: 26px 0 14px;
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 700;
  color: var(--green-900);
}

/* ==========================================================================
   Bingkai kartu (panel Undangan)
   ========================================================================== */
.card-frame {
  border: 1px solid var(--line);
  outline: 1px solid var(--gold);
  outline-offset: 7px;
  padding: 30px 24px 26px;
  text-align: center;
}

.crest { width: 58px; height: 58px; margin: 0 auto 12px; display: block; }

.bismillah {
  margin: 0 0 14px;
  font-family: var(--font-arabic);
  font-size: clamp(24px, 8vw, 30px);
  line-height: 1.6;
  color: var(--green-900);
}

.verse {
  margin: 0 auto 6px;
  max-width: 30ch;
  font-family: var(--font-arabic);
  font-size: clamp(20px, 7vw, 25px);
  line-height: 1.8;
  color: var(--green-700);
}
.verse-translation {
  margin: 0 auto 0;
  max-width: 34ch;
  font-family: var(--font-serif);
  font-size: 13.5px; font-style: italic; line-height: 1.7;
  color: rgba(43, 55, 49, 0.8);
}
.verse-source { font-size: 12px; color: var(--gold); }

.card-kicker {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 13px; font-weight: 700;
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--green-700);
}

.child-name {
  margin: 0 0 18px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--green-700);
}
.child-name__text {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(31px, 10vw, 42px);
  line-height: 1.2;
  letter-spacing: .01em;
  text-transform: none;
  font-weight: 700;
  color: var(--green-900);
  overflow-wrap: anywhere;
  margin-top: 6px;
}

.formal-line {
  margin: 0 auto 16px;
  max-width: 36ch;
  font-size: 14px; line-height: 1.75;
  text-align: justify;
  text-align-last: center;
  color: rgba(43, 55, 49, 0.85);
}

.parents {
  margin: 0 auto 20px;
  font-size: 14.5px; line-height: 1.75;
  color: rgba(43, 55, 49, 0.9);
}
/* Nama orang tua opsional: bila salah satu / kedua nama dikosongkan (span
   dilepas mesin render), sembunyikan wrapper <strong> & pemisah "&" agar
   tidak ada ampersand menggantung di kartu. Cadangan tanpa-JS memakai
   :has(); main.js menangani kasus keduanya kosong (seluruh baris disembunyi-
   kan). */
.parents strong:not(:has(span)) { display: none; }
.parents:has(strong:not(:has(span))) .parents-sep { display: none; }
.parents strong { color: var(--green-900); font-weight: 800; }

.details-block {
  margin: 0 auto 20px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.details-block__line {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 8px 0;
  font-size: 13.5px; line-height: 1.6;
}
.details-block__line strong { color: var(--green-900); }
.details-block__icon { flex: none; font-size: 15px; line-height: 1.5; }

.blessing {
  margin: 0 auto 16px;
  max-width: 38ch;
  font-family: var(--font-serif);
  font-size: 14px; font-style: italic; line-height: 1.75;
  color: rgba(43, 55, 49, 0.85);
}

.salaam {
  margin: 0 0 6px;
  font-family: var(--font-arabic);
  font-size: clamp(18px, 6vw, 22px);
  line-height: 1.7;
  color: var(--green-700);
}
.salaam-latin {
  margin: 0 0 20px;
  font-size: 12.5px; letter-spacing: .06em;
  color: rgba(43, 55, 49, 0.7);
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 14px; 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-700); color: #fff; box-shadow: var(--shadow-soft); }
.btn--primary:hover { background: var(--green-900); }

.btn--ghost { background: transparent; color: var(--green-700); border-color: var(--green-700); }
.btn--ghost:hover { background: rgba(46, 94, 69, 0.08); }

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

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

/* ==========================================================================
   Panel acara & lokasi
   ========================================================================== */
.timeline {
  list-style: none;
  margin: 0 0 6px; padding: 0;
  text-align: left;
  border-left: 2px solid var(--line);
  margin-left: 84px;
}
.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: -106px; top: 0;
  width: 86px; text-align: right;
  font-family: var(--font-serif);
  font-size: 13px; font-weight: 700;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}

.venue-card {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #F7F2E4;
  text-align: center;
}
.venue-card__name {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 700;
  color: var(--green-900);
}
.venue-card__text { margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; }
.detail-card__link {
  display: inline-block;
  font-size: 13px; font-weight: 800;
  color: var(--green-700); text-decoration: underline;
  text-underline-offset: 3px;
}

.note {
  margin: 0 auto 12px;
  max-width: 40ch;
  font-size: 13.5px; line-height: 1.7;
  color: rgba(43, 55, 49, 0.78);
}
.note--deadline {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(169, 129, 59, 0.14);
  border: 1px dashed var(--gold);
  color: var(--ink);
}

/* ==========================================================================
   Banner / flyer resmi acara (fitur OPSIONAL)
   Tampilkan flyer yang sudah Anda buat agar tamu yakin berada di tempat
   yang benar. Ketuk banner untuk membukanya di peraga foto (lightbox).
   ========================================================================== */
.banner-flyer {
  margin: 0 0 26px;
  text-align: center;
}
.banner-flyer__btn {
  display: block; width: 100%;
  padding: 6px;
  border: 1px solid var(--gold);
  outline: 1px solid var(--line);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: zoom-in;
  touch-action: manipulation;
  transition: transform .2s ease, box-shadow .2s ease;
}
.banner-flyer__btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.banner-flyer__btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.banner-flyer__img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius-sm) - 4px);
  background: #EDE6D6;
}
.banner-flyer figcaption {
  margin-top: 8px;
  font-size: 12.5px; line-height: 1.5;
  color: rgba(43, 55, 49, 0.7);
}

/* ==========================================================================
   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(--error); }
.form-field .optional { font-weight: 600; color: rgba(43, 55, 49, 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(46, 94, 69, 0.16);
}
.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='%232E5E45' 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(43, 55, 49, 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(46, 94, 69, 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(43, 55, 49, 0.6);
}

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

.guestbook-body {
  min-height: 140px;
  border-radius: var(--radius);
  border: 2px dashed var(--line);
  background: #F7F2E4;
  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(43, 55, 49, 0.55);
}

/* ---------- Footer merek (placeholder .footer-brand) ----------
   Diletakkan setelah </main> (index.html); main.js memindahkannya ke panel
   terakhir yang ada agar tampil sebagai penutup undangan. Tanpa JavaScript
   (noscript / shell-off) ia tampil apa adanya di akhir halaman. */
html:not(.js) .app-footer {
  display: block;
  padding: 20px 18px 40px;
  text-align: center;
}
html.js .app-footer { display: none; }
html.js .panel .app-footer {
  display: block;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-brand {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 13px; font-weight: 700;
  color: var(--green-900);
}
.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 1.12em;
  color: var(--green-700);
}
.app-footer__small {
  margin: 6px 0 0;
  font-size: 12px; line-height: 1.6;
  color: rgba(43, 55, 49, 0.55);
}

/* ---------- Strip merek "Powered by" (selebar penuh) ----------
   Dengan JS: disematkan di dasar shell, tepat di bawah navigasi tab.
   Tanpa JS (noscript / shell-off): mengalir di akhir dokumen.
   Teks "Kundangi" diganti nama platform oleh mesin render. */
html.js .powered-by {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 18;
  box-sizing: border-box;
  height: calc(var(--powered-h) + env(safe-area-inset-bottom));
  display: flex;
  align-items: center; justify-content: center;
  padding: 0 12px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-size: 9px; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(43, 55, 49, 0.55);
}
html:not(.js) .powered-by {
  width: 100%;
  text-align: center;
  padding: 14px 16px 22px;
  border-top: 1px solid var(--line);
  font-size: 10px; font-weight: 800;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(43, 55, 49, 0.55);
}
.powered-by .link-footer { color: var(--green-700); }

/* ==========================================================================
   Halaman bebas (fitur OPSIONAL) — judul, pengantar, foto opsional,
   blok-blok bebas (judul + catatan + foto opsional), baris penutup.
   ========================================================================== */
.free-page-media {
  margin: 0 0 26px;
  text-align: center;
}
.free-page-media__btn {
  display: block; width: 100%;
  padding: 6px;
  border: 1px solid var(--gold);
  outline: 1px solid var(--line);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: zoom-in;
  touch-action: manipulation;
  transition: transform .2s ease, box-shadow .2s ease;
}
.free-page-media__btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.free-page-media__btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.free-page-media img,
.free-page-media picture {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius-sm) - 4px);
  background: #EDE6D6;
}

.free-blocks {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 0 24px;
  text-align: left;
}
.free-block { margin: 0; }
.free-block__title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 700;
  color: var(--green-900);
}
.free-block__content {
  margin: 0 0 12px;
  font-size: 14px; line-height: 1.7;
  color: rgba(43, 55, 49, 0.8);
}
.free-block__media { margin: 0; }
.free-block__media-btn {
  display: block; width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: zoom-in;
  touch-action: manipulation;
  transition: transform .2s ease, box-shadow .2s ease;
}
.free-block__media-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.free-block__media-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* blok tanpa foto: mesin menghapus <img> sehingga bingkai tidak perlu tampil */
.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-radius: calc(var(--radius-sm) - 3px);
  background: #EDE6D6;
}
.free-powered-by {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 13.5px; font-style: italic;
  color: var(--green-700);
}

/* ==========================================================================
   Foto: potret di kartu & galeri (fitur OPSIONAL)
   ========================================================================== */
.portrait {
  max-width: 230px;
  margin: 0 auto 22px;
}
.portrait__btn {
  display: block; width: 100%;
  padding: 6px;
  border: 1px solid var(--gold);
  outline: 1px solid var(--line);
  outline-offset: 5px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.portrait__btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.portrait__btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.portrait__img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: calc(var(--radius-sm) - 4px);
  background: #EDE6D6;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.gallery-item { margin: 0; }
.gallery-item__btn {
  display: block; width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.gallery-item__btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.gallery-item__btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gallery-item__img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: calc(var(--radius-sm) - 3px);
  background: #EDE6D6;
}
.gallery-item__caption {
  margin: 8px 2px 0;
  font-size: 12.5px; line-height: 1.5;
  color: rgba(43, 55, 49, 0.7);
}
.gallery-note {
  margin: 0 auto;
  max-width: 40ch;
  font-size: 12.5px; line-height: 1.6;
  color: rgba(43, 55, 49, 0.6);
}

/* ==========================================================================
   Video momen (fitur OPSIONAL) — poster + tombol putar yang memuat <iframe>
   hanya saat diketuk. URL video diambil dari atribut data-video-url pada
   .film-card (YouTube / Vimeo / URL embed lainnya).
   ========================================================================== */
.film-card { margin-top: 30px; text-align: center; }
.film-label {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 700;
  color: var(--green-900);
}
.film-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #F7F2E4;   /* mat di belakang poster / saat memuat */
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.film-open {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; border: 0; background: none;
  cursor: pointer;
  touch-action: manipulation;
}
.film-open img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.film-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(56px, 14vmin, 72px); height: clamp(56px, 14vmin, 72px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--green-700);
  background: radial-gradient(circle at 32% 28%, #FDFBF3, #F7F2E4 60%, #EDE6D6);
  border: 1px solid var(--gold-soft);
  box-shadow: 0 12px 28px -12px rgba(35, 53, 44, 0.65);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform .25s ease;
}
.film-play svg { width: 26px; height: 26px; margin-left: 3px; }
.film-open:hover .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-open:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.film-hint {
  position: absolute; left: 50%; bottom: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(35, 53, 44, 0.62);
  color: #FDFBF3;
  font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  pointer-events: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.film-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.film-note {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 0 18px;
  font-size: 13px; font-style: italic; line-height: 1.6; text-align: center;
  color: rgba(43, 55, 49, 0.65);
  background: #F7F2E4;
}
.film-note code {
  background: rgba(46, 94, 69, 0.08);
  padding: 1px 5px; border-radius: 4px;
  font-size: 12px;
}
.film-external {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px;
  font-size: 12px; font-weight: 800;
  color: var(--green-700);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease;
}
.film-external:hover { color: var(--gold); border-color: var(--gold); }
.film-external[hidden] { display: none; }
@keyframes film-pulse {
  0%, 100% { box-shadow: 0 12px 28px -12px rgba(35, 53, 44, 0.65), 0 0 0 0 rgba(169, 129, 59, 0.4); }
  50% { box-shadow: 0 12px 28px -12px rgba(35, 53, 44, 0.65), 0 0 0 14px rgba(169, 129, 59, 0); }
}

/* ---------- Peraga foto (lightbox) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(28, 38, 33, 0.9);
}
.lightbox__stage {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  max-width: min(92vw, 560px);
  padding: 10px;
}
.lightbox__figure {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  text-align: center;
}
.lightbox__img {
  display: block;
  width: auto; height: auto;
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  border: 3px solid var(--gold-soft);
  border-radius: var(--radius-sm);
  background: var(--paper);
  object-fit: contain;
}
.lightbox__caption {
  margin: 12px auto 0;
  max-width: 46ch;
  font-family: var(--font-serif);
  font-size: 14px; font-style: italic;
  color: #EADFC3;
}
.lightbox__btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(253, 251, 243, 0.14);
  color: #fff;
  font-size: 24px; line-height: 1;
  transition: background .2s ease;
}
.lightbox__btn:hover { background: rgba(253, 251, 243, 0.3); }
.lightbox__btn:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
.lightbox__close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
}
.lightbox__zoom {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 68px;
}
.lightbox__zoom svg { width: 22px; height: 22px; }
/* Perbesar: gambar tampil seukuran aslinya dan dapat digeser dalam panggung */
.lightbox.is-zoomed .lightbox__stage {
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 86vh;
}
.lightbox.is-zoomed .lightbox__img {
  max-width: none; max-height: none;
  width: auto; height: auto;
}
.lightbox.is-zoomed .lightbox__caption { display: none; }
@media (max-width: 380px) {
  .lightbox__btn { width: 36px; height: 40px; font-size: 20px; }
}

/* ==========================================================================
   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, .powered-by { display: none !important; }
  .lightbox { display: none !important; }

  .panel-inner { max-width: none; padding: 12px 0; }
  .card-frame { outline-offset: 4px; }

  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) ─────────────── */
#guestbookForm {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
#guestbookForm .form-group { margin-bottom: 16px; }
#guestbookForm .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}
#guestbookForm .form-control {
  width: 100%;
  height: auto;
  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 0.2s ease, box-shadow 0.2s ease;
}
#guestbookForm .form-control:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(46, 94, 69, 0.16);
}
#guestbookForm textarea.form-control {
  resize: vertical;
  min-height: 80px;
}
#guestbookForm .error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--error);
}
#guestbookForm button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  background: var(--green-700);
  color: #fff;
  box-shadow: var(--shadow-soft);
  margin: 0.5rem auto 0;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#guestbookForm button[type="submit"]:hover {
  background: var(--green-900);
  transform: translateY(-2px);
}
.guestbook-chapta { margin: 14px 0; }
.loading-guestbook {
  margin-top: 10px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(43, 55, 49, 0.55);
}
#comments-container.guestbook-wrap {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.guestbook-entry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.guestbook-entry h5 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0 0 6px;
  color: var(--ink);
}
.guestbook-entry p {
  margin: 0 0 8px;
  line-height: 1.6;
  font-size: 14.5px;
  color: var(--ink);
}
.guestbook-entry small {
  color: rgba(43, 55, 49, 0.55);
  font-size: 12px;
}
.more-guestbook-wrap {
  text-align: center;
  margin-top: 14px;
}
.more-guestbook-wrap #load-more {
  background: transparent;
  border: 1.5px solid var(--green-700);
  border-radius: 999px;
  color: var(--green-700);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.more-guestbook-wrap #load-more:hover { background: rgba(46, 94, 69, 0.08); }
