/* ═══════════════════════════════════════════
   TEMA: Japanese Stillness × Modern Editorial
   Kertas gading, foto prewedding sebagai pusat,
   tipografi serif besar + sans bersih, garis tipis
   Brief: references/Japanese Stillness × Modern Editorial/
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  /* Palet tema */
  --paper:     #F6F3EC;
  --paper-lt:  #FBF9F4;
  --linen:     #E5DED2;
  --sage:      #A8B09A;
  --sage-ink:  #5F6B55;   /* sage versi teks (kontras ≥ 4.5 di atas kertas) */
  --moss:      #465344;
  --ink:       #292B27;
  --ink-soft:  #55574F;
  --line:      rgba(41,43,39,.18);

  /* Remap token base.css → palet editorial */
  --bg:      var(--paper);
  --gold:    var(--moss);
  --gold-lt: var(--sage-ink);
  --cream:   var(--ink);
  --warm:    var(--ink-soft);

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-label:   'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body { font-size: 16px; -webkit-font-smoothing: antialiased; }

/* Tekstur kertas: non-repeat (seamless belum terverifikasi), di belakang konten */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url('paper-texture.webp') center / cover no-repeat;
  opacity: .3;
  mix-blend-mode: multiply;
}

:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; }

/* ── PRELOADER (ngengat default, bg hijau moss mengikuti palet tema) ── */
#preloader {
  background: radial-gradient(120% 100% at 50% 40%,
    #5F6B55 0%, #4F5C49 55%, #3B4639 100%);
}

/* ── COVER ──
   Kertas gading + kolom teks kiri, foto arch di kanan (tepi bawah sobekan
   kertas, ranting daun), mengikuti layout/Elegant Botanical Wedding Invitation.png */
#cover {
  display: block;
  text-align: left;
  overflow: hidden;
  /* tekstur kertas dicampur gading supaya tidak kuning/belang */
  background:
    linear-gradient(rgba(246,243,236,.72), rgba(246,243,236,.72)),
    url('paper-texture.webp') center / cover;
}
/* bayangan daun samar di kiri bawah */
#cover::before {
  content: '';
  position: absolute;
  left: -30%;
  bottom: -6%;
  width: 110%;
  height: 45%;
  background: url('leaf-shadow.webp') left bottom / contain no-repeat;
  opacity: .3;
  mix-blend-mode: multiply;
  /* tepi gambar dilunakkan supaya tidak terlihat kotak */
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 35% 65%, #000 25%, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 60% at 35% 65%, #000 25%, transparent 70%);
  pointer-events: none;
}
.cvContent {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: calc(1.6rem + env(safe-area-inset-top, 0px)) 1.75rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

/* ── foto arch ── */
.cvArch {
  position: absolute;
  z-index: -1;
  right: 1.1rem;
  top: 21%;
  bottom: 26%;
  width: 54%;
  margin: 0;
  /* Arch klasik: puncak setengah lingkaran simetris, sisi & bawah lurus.
     (varian lain: asimetris "92% 12% 0 0 / 44% 7% 0 0") */
  --arch: 999px 999px 0 0;
}
.cvArch::before {   /* garis arch tipis, sedikit lebih besar dari foto */
  content: '';
  position: absolute;
  top: -11px;
  left: -11px;
  right: -11px;
  bottom: -11px;
  border: 1px solid rgba(41,43,39,.28);
  border-radius: var(--arch);
  pointer-events: none;
}
.cvPhotoWrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--arch);
}
.cvPhoto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 40%;
  transform: scale(1.32);           /* zoom: pasangan lebih besar seperti mockup */
  transform-origin: 58% 42%;
  filter: saturate(.85) sepia(.08);
  display: block;
}
.cvSage {   /* ranting sage mengikuti lengkung bahu kanan arch, dari kanan melengkung ke kiri */
  position: absolute;
  z-index: 1;
  top: -10%;
  right: -7%;
  width: 54%;
  pointer-events: none;
}

/* ── kolom teks kiri ── */
.cvMark {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: .02em;
}
.cvMark i, .pMark i, .di-mark i { color: var(--sage-ink); padding: 0 .05em; }
.cvPre, .cvTag, .cvDear {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cvPre {
  display: flex;
  align-items: center;
  gap: .9rem;
  white-space: nowrap;
  margin: 0 0 1.4rem;
  font-size: .66rem;
  letter-spacing: .26em;
  gap: .7rem;
}
.cvPre::after { content: ''; width: 24px; height: 1px; background: rgba(41,43,39,.3); }
.cvBism {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 2.4rem 0 .9rem;
}
.cvNames {
  font-weight: 400;
  /* lebar "Syahid" = 2.62em; ruang kiri arch = 46vw − (padding 28 + jarak arch 29)px.
     16vw − 24px → selalu ±20px dari garis arch */
  font-size: min(3rem, calc(16vw - 24px));
  line-height: 1;
  color: var(--ink);
  text-shadow: none;
}
.cvAnd {
  font-family: var(--font-display);
  font-size: .78em;
  line-height: 1;
  color: var(--sage-ink);
}
.cvTag { line-height: 1.8; margin-top: 1.5rem; font-size: .68rem; letter-spacing: .24em; }
.cvDiv {
  display: block;
  width: 48px;
  height: 1px;
  margin: 1.5rem 0 1.4rem;
  background: rgba(41,43,39,.35);
}
.cvDiv::before, .cvDiv::after { content: none; }
.cvDate {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cvDate span {
  display: block;
  font-size: 3.1rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: lining-nums;
}

/* ── tamu + tombol ── */
.cvBottom {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cvDear {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 82%;
  font-size: .72rem;
  margin-bottom: .45rem;
}
.cvDear::before, .cvDear::after { content: ''; flex: 1; height: 1px; background: rgba(41,43,39,.25); }
.cvGuest {
  font-size: clamp(1.6rem, 7vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1.3rem;
  min-height: 0;
}
.cvBtn {
  background: var(--moss);
  color: var(--paper);
  border: 1px solid var(--moss);
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .3em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  white-space: nowrap;
  max-width: 100%;
  padding: 0 2.6rem 0 calc(2.6rem + .3em);
  animation: none;
}
.cvBtn::after { content: '\2192'; margin-left: 1.6rem; letter-spacing: 0; font-family: var(--font-body); font-size: .9rem; }
@media (hover: hover) { .cvBtn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); } }

/* Layar pendek (Safari iPhone dengan toolbar ±660px) */
@media (max-height: 780px) {
  .cvContent { padding-top: calc(1.1rem + env(safe-area-inset-top, 0px)); padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px)); }
  .cvMark { font-size: 1.5rem; }
  .cvBism { font-size: .95rem; margin: 1.3rem 0 .6rem; }
  .cvPre { margin-bottom: 1rem; }
  .cvPre::after { display: none; }
  .cvNames { font-size: min(2.6rem, calc(16vw - 24px)); }
  .cvTag { display: none; }
  .cvDiv { margin: 1.1rem 0 1rem; }
  .cvDate span { font-size: 2.5rem; }
  .cvArch { top: 20%; bottom: 25%; }
  .cvGuest { margin-bottom: .9rem; }
  .cvBtn { height: 50px; }
}
@media (max-width: 360px) {
  .cvArch { width: 52%; top: 23%; }
  .cvNames { font-size: calc(16.8vw - 24px); }   /* arch 52% → ruang kiri 48vw */
  .cvPre { letter-spacing: .24em; }
  .cvBtn { letter-spacing: .24em; padding: 0 1.8rem 0 calc(1.8rem + .24em); font-size: .82rem; }
}

/* ── FADE-IN NAMA ──
   Cover: CSS murni, delay disamakan dgn preloader (JS fade .hide di 5.8s) —
   sengaja tanpa class JS supaya nama tidak hilang kalau script.js gagal/ke-cache lama.
   Mempelai: nama muncul bertingkat setelah .mw dapat .v (IntersectionObserver). */
.mw.fi .mn { opacity: 0; }
/* "ditulis": mask gradient digeser kiri→kanan per baris (.cvW) */
.cvW {
  display: block;
  width: fit-content;
  -webkit-mask: linear-gradient(90deg, #000 40%, transparent 60%) 100% 0 / 250% 100% no-repeat;
          mask: linear-gradient(90deg, #000 40%, transparent 60%) 100% 0 / 250% 100% no-repeat;
  animation: cvWrite 1.1s ease-in-out both;
}
@keyframes cvWrite {
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
/* foto arch terbuka dari bawah ke atas, sedikit sebelum nama ditulis */
.cvPhoto { animation: cvPhotoIn 1.6s cubic-bezier(.2,.6,.2,1) 5.9s both; }
@keyframes cvPhotoIn {
  from { opacity: 0; clip-path: inset(100% 0 0 0); }
  to   { opacity: 1; clip-path: inset(0); }
}
.cvNames .cvW:first-child { animation-delay: 6.1s; }
#cover .cvAnd             { animation: fsu .6s ease-out 7s both; }
.cvNames .cvW:last-child  { animation-delay: 7.3s; }
.cvTag .cvW:first-child   { animation-delay: 7.9s; }
.cvTag .cvW:last-child    { animation-delay: 8.4s; animation-duration: .8s; }
#cover .cvDate  { animation: fsu .9s ease-out 8.4s both; }
#cover .cvGuest { animation: fsu .9s ease-out 8.8s both; }
.mw.v .mc:first-child .mn { animation: fsu 1s ease-out .5s both; }
.mw.v .mc:last-child .mn  { animation: fsu 1s ease-out .9s both; }
@media (prefers-reduced-motion: reduce) {
  .cvW { -webkit-mask: none; mask: none; }
  .cvPhoto, .cvW, .cvAnd, .cvDate, .cvGuest, .mw.fi .mn { opacity: 1; animation: none !important; }
}

/* ── SECTION UMUM ── */
.sec {
  min-height: auto;
  padding: 5.5rem 1.5rem 5rem;
}
.st {
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: .6rem;
}
.ss {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.6vw, 1.25rem);
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}
.div { width: min(80%, 320px); margin: 1.2rem auto 2.4rem; }
.div::before, .div::after { background: var(--line); }
.di {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
}
.di-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: none;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}

/* ── AYAT (section pertama setelah cover) ──
   Kutipan QS. Ar-Rum: 21 rata kiri, ranting sage di kanan atas & kiri bawah
   (layout/Elegant Botanical Wedding Invitation Mockups.png, layar kiri) */
#ayat { align-items: stretch; padding: 6rem 1.5rem 9rem; }
.ayIn { position: relative; z-index: 1; width: 100%; max-width: 34rem; margin: 0 auto; }
#ayat .ayat {
  margin: 0;
  text-align: left;
  font-size: clamp(1.35rem, 5.8vw, 1.6rem);
  line-height: 1.6;
}
#ayat .pbLeaf { margin: 2rem auto 1.2rem; }
#ayat .ayat-src { text-align: center; margin: 0; }
.ayLeaf { position: absolute; pointer-events: none; opacity: .85; }
.ayLeaf.t { top: 0; right: -6px; width: min(42vw, 240px); }
.ayLeaf.b { bottom: 0; left: -6px; width: min(56vw, 300px); }

/* ── PEMBUKA ──
   Salam + undangan + nama tamu di antara dua ranting kecil, teks tengah
   (layout/Elegant Botanical Wedding Invitation Mockups.png, layar kanan) */
#pembuka { padding-top: 6.5rem; padding-bottom: 9rem; }
.pbSprig {
  position: absolute;
  pointer-events: none;
  opacity: .9;
}
.pbSprig.b { bottom: 1.6rem; right: 4%; width: min(40%, 190px); transform: rotate(-10deg) scaleX(-1); }
#pembuka .con {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  font-size: .97rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
#pembuka .con p { text-wrap: balance; }
/* garis lengkung tipis di bawah, menyambung ke ranting bawah */
#pembuka .con::after {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(100% + 2.4rem);
  width: 120%;
  height: 12rem;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(41,43,39,.25);
  pointer-events: none;
}
.pbBism {
  font-size: 1.55rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: .2rem;
}
.pbBism::after {
  content: '';
  display: block;
  width: 56px;
  height: 1px;
  margin: 1.1rem auto 1.4rem;
  background: rgba(41,43,39,.3);
}
.salam {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 4vw, 1.3rem);   /* = .pwas (salam penutup) */
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1.1rem;
}
.pbLeaf { width: min(86%, 300px); margin: 1.6rem auto 1.5rem; }
.pbLeaf img { width: 34px; transform: rotate(-62deg); opacity: .85; }
.ayat {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 5.4vw, 1.55rem);
  line-height: 1.5;
  color: var(--ink);
  opacity: 1;
  margin-bottom: 0;
}
.ayat-src {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.gn {
  display: block;
  font-size: clamp(1.5rem, 6vw, 1.85rem);   /* di bawah heading .st, di atas salam */
  font-weight: 500;
  line-height: 1.15;
  color: var(--moss);
}
#pembuka .pbLeaf { margin: 1.3rem auto; }
/* ── MEMPELAI ── */
.mw {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: .9rem;
  align-items: start;
  max-width: 760px;
}
@media (max-width: 580px) {
  .mw { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .ms { flex-direction: column; }
}
.mPhoto {
  position: relative;
  aspect-ratio: 3 / 4.3;
  margin: 0 0 1.3rem;
}
.mPhoto::before {
  content: '';
  position: absolute;
  inset: -6px -6px 0;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}
.mPhoto > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 999px 999px 0 0;
  display: block;
}
.mBlossom {
  position: absolute;
  left: -22%;
  bottom: -12%;
  width: 60%;
  pointer-events: none;
}
.mn {
  font-weight: 400;
  font-size: clamp(1.35rem, 5vw, 2rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: .6rem;
}
.mp { font-size: clamp(.84rem, 2.8vw, .95rem); line-height: 1.75; color: var(--ink-soft); }
.mp em {
  font-family: var(--font-display);
  font-size: 1.12em;
  color: var(--sage-ink);
  opacity: 1;
}
.ms { padding-top: 32%; gap: .6rem; }
.ab { font-family: var(--font-display); font-size: clamp(1.9rem, 7vw, 3.4rem); color: var(--sage-ink); }
.ms-line { background: var(--line); opacity: 1; height: 48px; }

/* ── ACARA ──
   "Save the Date": kepala rata kiri, akad & resepsi berdampingan (juga di HP)
   dengan ikon, lalu lokasi + peta + tombol lebar
   (layout/Botanical Wedding Save the Date UI.png) */
#acara { padding: 6rem 1.5rem 7rem; }
.evHead { position: relative; z-index: 1; width: 100%; max-width: 34rem; margin: 0 auto; text-align: left; }
#acara .st { text-align: left; font-size: clamp(3rem, 13vw, 4rem); line-height: 1; margin-bottom: 1.2rem; }
.evDate {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: clamp(.16em, 1.2vw, .3em);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-soft);
}
#acara .pbLeaf { width: min(100%, 34rem); margin: 2rem auto; }
.ag {
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 0;
  max-width: 34rem;
}
.ab2 { padding: .2rem .4rem; }
.al {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: clamp(.14em, 1.2vw, .32em);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-soft);
  margin-bottom: .9rem;
}
.aIco { display: block; width: 38px; height: 38px; margin: 0 auto .9rem; color: var(--ink); }
.at {
  font-family: var(--font-display);
  font-size: min(1.6rem, 6vw);   /* muat 2 kolom sampai layar 320px */
  font-weight: 500;
  letter-spacing: .04em;
  font-variant-numeric: lining-nums;
  white-space: nowrap;
  color: var(--ink);
  margin: 0;
}
.aw { font-family: var(--font-body); font-size: .7rem; letter-spacing: .3em; color: var(--ink-soft); margin-top: .3rem; }
.amid { padding: 0; width: 1px; align-self: stretch; background: var(--line); }
.vw { position: relative; z-index: 1; width: 100%; max-width: 34rem; margin: 0 auto; }
.vn { font-size: clamp(1.7rem, 7vw, 2.1rem); color: var(--ink); line-height: 1.2; margin-bottom: .6rem; }
.va { font-size: min(.95rem, 4.1vw); line-height: 1.7; color: var(--ink-soft); margin-bottom: 1.6rem; }
/* denah interaktif (inline SVG, zoom/geser di script.js) — dari references/…/object/denah-lokasi-interaktif.html */
.vMap { position: relative; max-width: 100%; overflow: hidden; border: 1px solid var(--line); background: #f7f4eb; box-shadow: 0 12px 38px #46513b12; }
.vMap::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 20% 20%, #fff8 0, transparent 55%), repeating-linear-gradient(35deg, #9d9b8d08 0 1px, transparent 1px 5px); }
.vMap svg { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: grab; }
.vMap.zoomed svg { touch-action: none; }   /* belum zoom: HP tetap bisa scroll halaman lewat peta */
.vMap svg:active { cursor: grabbing; }
.vMap .road { fill: none; stroke: #c2c9bc; stroke-width: 19; stroke-linecap: round; stroke-linejoin: round; }
.vMap .road-center { fill: none; stroke: #f7f4eb; stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; }
.vMap .route { fill: none; stroke: #657d63; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 10; animation: dmFlow 9s linear infinite; }
.vMap .landmark { cursor: pointer; outline: none; }
.vMap .landmark:focus-visible .symbol { stroke: var(--moss); stroke-width: 2.5; }
.vMap .landmark .symbol { fill: #e6e9dc; stroke: #83937c; stroke-width: 1.3; }
.vMap .landmark text, .vMap .road-label { font: 12px var(--font-display); fill: #536450; }
.vMap .road-label { font-size: 11px; letter-spacing: .3px; }
.vMap .small { font-size: 10px !important; }
.vMap .pin-halo { fill: #698265; opacity: .22; }   /* lingkaran tetap di belakang pin */
.vMap .pin-ring { fill: #698265; opacity: 0; transform-box: fill-box; transform-origin: center; animation: dmPulse 2.4s ease-out infinite; }
.vMap .pin-ring.r2 { animation-delay: 1.2s; }      /* 2 gelombang bergantian */
.vMap .pin { fill: #405941; stroke: #f7f4eb; stroke-width: 2; filter: drop-shadow(0 3px 3px #283b2933); animation: dmBob 3s ease-in-out infinite; }
.vMap .pin-core { fill: #f7f4eb; pointer-events: none; }
.vMap .pin-text { font: 700 13px var(--font-body); letter-spacing: .12em; fill: #3d513f; }
.dmCtl { position: absolute; right: 10px; top: 10px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.dmCtl button { width: 34px; height: 34px; border: 1px solid #cbd1c4; background: #fffdf6ed; color: #435746; border-radius: 3px; font-size: 20px; line-height: 1; cursor: pointer; }
.dmCtl button[data-z="reset"] { font-size: 14px; }
.dmTip { position: absolute; left: 12px; bottom: 50px; z-index: 3; background: #fffdf6; border: 1px solid #ccd2c5; padding: 8px 12px; font: 13px var(--font-body); color: var(--ink); box-shadow: 0 5px 20px #24372416; max-width: calc(100% - 24px); }
.dmTip[hidden] { display: none; }
.dmHint { margin: 0; padding: 10px 14px; border-top: 1px solid #deded2; text-align: center; font: 11px var(--font-body); color: #778171; }
@keyframes dmFlow { to { stroke-dashoffset: -120; } }
@keyframes dmPulse { 0% { transform: scale(1); opacity: .35; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes dmBob { 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .vMap .route, .vMap .pin, .vMap .pin-ring { animation: none; } }
/* dua tombol satu baris: Lihat Lokasi (isi) + Buat Pengingat (garis) */
.vBtns { display: flex; gap: .7rem; width: min(100%, 26rem); margin: 0 auto; }
.btn.vBtn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 52px;
  padding: 0 .5rem;
  /* diukur: "BUAT PENGINGAT" + ikon muat di tombol 158px (layar 390) */
  font-size: clamp(11px, 2.95vw, 12.5px);
  letter-spacing: .08em;
  white-space: nowrap;
}
.vBtn svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 359px) {   /* tombol ±123px: ikon tidak muat, teks saja */
  .vBtn svg { display: none; }
  .btn.vBtn { letter-spacing: .06em; }
}
.btn.vBtnAlt { background: transparent; color: var(--moss); }
.btn.vBtnAlt:hover { background: var(--moss); border-color: var(--moss); color: var(--paper); }
.btn {
  background: var(--moss);
  border: 1px solid var(--moss);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  min-height: 48px;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn:disabled { opacity: .6; cursor: wait; }

/* ── GALERI ── */
.gGrid { gap: .6rem; max-width: 560px; }
.gCol { gap: .6rem; }
.gFrame { border: none; background: var(--linen); }
.gFrame::before, .gFrame::after { content: none; }
.gPhoto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .9s cubic-bezier(.2,.6,.2,1);
}
.gFrame:hover .gPhoto { transform: scale(1.03); }
.gFrame:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
.gFrame[data-idx="1"] .gPhoto { object-position: 40% 50%; }
.gFrame[data-idx="6"] .gPhoto { object-position: 50% 30%; }
@media (max-width: 480px) { .gGrid { max-width: 100%; gap: .5rem; } .gCol { gap: .5rem; } }

.lb { background: rgba(41,43,39,.95); }
.lbStage {
  width: min(92vw, 960px);
  height: 80vh;
  aspect-ratio: auto;
  border: none;
  background: none;
}
.lbStage .gPhoto { object-fit: contain; }
.lbClose, .lbNav, .lbCounter { color: var(--paper); }
.lbNav { padding: 1rem .75rem; }
@media (max-width: 480px) { .lbStage { width: 100vw; height: 72vh; } }

/* ── LOVE STORY ──
   4 chapter rata kiri: label "Chapter 0N / 04", angka besar samar di kanan,
   judul, teks, foto objek lebar (layout/Elegant Love Story Wedding App Mockup.png) */
#lovestory { background: var(--linen); }
#lovestory .ss { font-style: italic; }
#lovestory .pbLeaf { width: min(100%, 34rem); margin: 1.4rem auto 2.2rem; }
.lsCard { border: none; padding: 0; width: 100%; max-width: 34rem; margin: 0 auto; text-align: left; }
.lsItem { position: relative; padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
.lsItem:first-child { padding-top: .4rem; }
.lsItem:last-child { border-bottom: 0; }
.lsNum {
  position: absolute;
  top: 1.4rem;
  right: 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 18vw, 5.5rem);
  line-height: 1;
  color: var(--ink);
  opacity: .07;
  pointer-events: none;
}
.lsItem:first-child .lsNum { top: -.6rem; }
.lsYear {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 1;
  margin-bottom: .6rem;
}
.lsTitle {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 7.5vw, 2.3rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: .8rem;
}
.lsText {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4.4vw, 1.2rem);
  font-style: normal;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 30ch;
  margin-bottom: 1.6rem;
}
.lsPhoto { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.lsEnd {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 4.2vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: balance;
}

/* ── COUNTDOWN (pita moss) ── */
#countdown { background: var(--moss); }
#countdown .st { color: var(--paper); font-size: clamp(2rem, 7.5vw, 3rem); max-width: 18ch; margin-inline: auto; }
#countdown .ss { color: rgba(246,243,236,.75); }
#countdown .div::before, #countdown .div::after { background: rgba(246,243,236,.25); }
.cdr { gap: clamp(1rem, 5vw, 3rem); }
.cdn {
  font-weight: 400;
  font-size: clamp(3rem, 13vw, 5.5rem);
  color: var(--paper);
  text-shadow: none;
  font-variant-numeric: lining-nums tabular-nums;
}
.cdl { font-size: .64rem; letter-spacing: .26em; color: rgba(246,243,236,.75); }
.cds {
  font-size: 0;
  width: 1px;
  height: 3rem;
  padding: 0;
  margin-bottom: 1.4rem;
  background: rgba(246,243,236,.25);
  opacity: 1;
  animation: none;
}
.cddone { color: var(--paper); }

/* ── UCAPAN & RSVP ── */
.fg input, .fg textarea, .fg select {
  background-color: var(--paper-lt);
  border: 1px solid rgba(41,43,39,.22);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .95rem 1rem;
}
.fg input:focus, .fg textarea:focus, .fg select:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(70,83,68,.15);
}
.fg input::placeholder, .fg textarea::placeholder { color: var(--ink-soft); opacity: .7; }
.fg select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23292B27' stroke-width='1.3'/%3E%3C/svg%3E");
}
.fg select option { background: var(--paper); color: var(--ink); }
.mlist { margin-top: 2.5rem; }
.msg {
  border-left: none;
  border-top: 1px solid var(--line);
  background: none;
  padding: 1.2rem 0;
  margin: 0;
}
.mn2 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.mt { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.6; color: var(--ink-soft); }
.rsvp-badge {
  font-family: var(--font-body);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 2px;
}
.rsvp-hadir { background: rgba(70,83,68,.1);  color: var(--moss); }
.rsvp-tidak { background: rgba(138,75,58,.1); color: #8A4B3A; }
.rsvp-ragu  { background: rgba(41,43,39,.06); color: var(--ink-soft); }

/* ── HADIAH KASIH ──
   Intro rata kiri + tombol; rekening baru muncul di bottom sheet <dialog> (#giftSheet).
   Tinggi section mengikuti isi (bukan 100vh). */
#amplop {
  background: var(--linen);
  align-items: stretch;
  padding: 5.5rem 1.5rem 6.5rem;
}
.gIntro { position: relative; z-index: 1; width: 100%; max-width: 560px; margin: 0 auto; }
.gKick {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-display);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.gKick::after { content: ''; width: 24px; height: 1px; background: rgba(41,43,39,.3); }
#amplop .st { text-align: left; }
#amplop .ss {
  text-align: left;
  max-width: 30ch;
  font-family: var(--font-body);
  font-style: normal;
  font-size: .97rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}
.gBtn { padding: 0 1.8rem 0 calc(1.8rem + .3em); }
.gLeaf { position: absolute; pointer-events: none; opacity: .85; }
.gLeaf.t { top: 0; right: -6px; width: min(42vw, 240px); }
.gLeaf.b { bottom: 0; left: -6px; width: min(46vw, 260px); }

html:has(.gSheet[open]) { overflow: hidden; }
.gSheet {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* buka: geser naik pelan + backdrop fade; tutup: .closing (script.js) lalu dialog.close() */
.gSheet[open]           { animation: gUp .6s cubic-bezier(.22,1,.36,1); }
.gSheet[open]::backdrop { animation: gFade .5s ease-out; }
.gSheet.closing           { animation: gDown .4s cubic-bezier(.55,0,.7,.2) forwards; }
.gSheet.closing::backdrop { animation: gFade .4s ease-in reverse forwards; }
.gSheet::backdrop { background: rgba(41,43,39,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.gPane:not([hidden]) { animation: gFade .35s ease-out; }
@keyframes gUp   { from { transform: translateY(100%); } }
@keyframes gDown { to   { transform: translateY(100%); } }
@keyframes gFade { from { opacity: 0; } }
.gIn { position: relative; padding: .8rem 1.5rem calc(1.6rem + env(safe-area-inset-bottom, 0px)); }
.gHandle { display: block; width: 44px; height: 4px; border-radius: 2px; background: rgba(41,43,39,.18); margin: 0 auto 1rem; }
.gClose {
  position: absolute;
  top: 1.3rem;
  right: 1.2rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(41,43,39,.06);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.gTitle { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1.15; margin: .7rem 3rem .4rem 0; }
.gSub { font-family: var(--font-body); font-size: .92rem; line-height: 1.6; color: var(--ink-soft); margin-bottom: 1.4rem; }
.gOpt {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-bottom: .75rem;
  padding: 1rem;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.gOpt:hover, .gOpt:focus-visible { background: rgba(168,176,154,.18); border-color: var(--sage-ink); }
.gIco { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(168,176,154,.25); }
.gIco svg { width: 24px; height: 24px; }
.gTx { flex: 1; min-width: 0; font-family: var(--font-body); }
.gTx b { display: block; font-weight: 500; font-size: .98rem; }
.gTx small { display: block; margin-top: .15rem; font-size: .8rem; color: var(--ink-soft); }
.gChev { flex: none; width: 18px; height: 18px; color: var(--ink-soft); }
.gBack { background: none; border: 0; padding: .4rem 0; font-family: var(--font-body); font-size: .8rem; letter-spacing: .08em; color: var(--sage-ink); cursor: pointer; }
.gSheet .rc {
  min-width: 0;
  margin-top: .9rem;
  padding: 1.3rem 1.2rem;
  text-align: left;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.gAddr { font-family: var(--font-body); font-size: .95rem; line-height: 1.7; color: var(--ink); margin: 0; }
.gSprig { display: flex; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.gSprig::before, .gSprig::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.gSprig img { width: 44px; opacity: .8; }
@media (prefers-reduced-motion: reduce) {
  .gSheet[open], .gSheet[open]::backdrop, .gPane:not([hidden]) { animation: none; }
}
.rb {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--sage-ink);
}
.rh { font-family: var(--font-display); font-style: italic; font-size: 1.12rem; color: var(--ink-soft); }
.rn {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 6vw, 2rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .06em;
  font-variant-numeric: lining-nums;
}
.bcp {
  border: 1px solid rgba(41,43,39,.3);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: .7rem 1.4rem;
  min-height: 40px;
}
.bcp:hover, .bcp.cp { background: var(--moss); border-color: var(--moss); color: var(--paper); }

/* ── PENUTUP ── */
.ptxt { font-size: 1rem; line-height: 1.8; color: var(--ink-soft); }
.pMark {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
}
.pthanks {
  font-weight: 400;
  font-size: clamp(2.6rem, 10vw, 3.6rem);
  letter-spacing: 0;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.pwas {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 4vw, 1.3rem);
  color: var(--ink);
  margin-bottom: 0;   /* jarak ke foto .pHero cukup dari margin-top-nya */
}
/* "Kami Yang Berbahagia": layout hero lama (443f00b) dipindah ke sini, tanpa bismillah.
   Kelas baru (bukan .hn/.hpre) karena base.css menyembunyikan itu sampai #hero.reveal. */
.pHero { position: relative; width: 100%; max-width: 34rem; margin: 1.6rem auto 0; text-align: right; }
.pPre {
  position: absolute;
  top: 0;
  left: 0;
  writing-mode: vertical-rl;
  font-family: var(--font-body);
  font-size: .66rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.pFrame {
  margin: 0 0 0 18%;
  height: 58vh;
  height: 58svh;
  min-height: 340px;
  max-height: 640px;
  overflow: hidden;
}
.pFrame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.pHero.v .pFrame { animation: pfIn 1.6s cubic-bezier(.2,.6,.2,1) .2s both; }
@keyframes pfIn {
  from { opacity: 0; clip-path: inset(10% 0 0 0); }
  to   { opacity: 1; clip-path: inset(0); }
}
.pNames {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin: -4.5rem -1.5rem 0 0;
  padding: 1rem 1.5rem .8rem 1.3rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 14vw, 5.5rem);
  line-height: .95;
  color: var(--ink);
  background: rgba(246,243,236,.92);
}
.pAmp { display: block; font-size: .62em; line-height: 1.05; color: var(--sage-ink); padding-left: .7em; }
@media (prefers-reduced-motion: reduce) { .pHero.v .pFrame { animation: none; } }

/* ── BUAT UNDANGAN ── */
.ugForm input, .ugLink {
  background: var(--paper-lt) !important;
  border: 1px solid rgba(41,43,39,.22) !important;
  color: var(--ink) !important;
  font-family: var(--font-body) !important;
}
.ugStepNum { border-color: var(--line); color: var(--ink); font-family: var(--font-display); }

/* ── BOTTOM NAV & MUSIK ── */
.bnav {
  background: rgba(246,243,236,.94);
  border-top: 1px solid var(--line);
}
.bni { font-size: .62rem; color: var(--ink-soft); opacity: .75; padding: .4rem .8rem; border-radius: 2px; }
.bni.act { background: rgba(70,83,68,.1); color: var(--moss); }
.musicToggle {
  /* kiri bawah, di atas bottom nav */
  top: auto;
  right: auto;
  left: 1rem;
  bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(8px);
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--moss);
  box-shadow: none;
}
