/* Istana — undangan pernikahan tema foto: kertas cat air, gapura lengkung berbunga, blok merah muda,
   panel acara berbingkai gelap, kartu berwarna. */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 700; src: url("fonts/playfair-display.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400 700; src: url("fonts/playfair-display-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat.woff2") format("woff2"); font-weight: 300 600; font-display: swap; }
@font-face { font-family: "Parisienne"; src: url("fonts/parisienne.woff2") format("woff2"); font-display: swap; }

:root {
  --page: #dcb4b6;
  --pink: #eec8c9;
  --pink-2: #f6dedf;
  --paper: #eef0f2;
  --paper-2: #dfe5ea;
  --wash: #ecc9cb;
  --rose: #a9666d;
  --rose-2: #8f4d55;
  --frame: #403c3d;
  --ink: #8a565c;
  --on-pink: #7b474e;
  --shadow: rgba(90, 40, 48, 0.3);
  --fl-1: #b8323c; --fl-2: #e2747c; --fl-3: #f6c6c8; --fl-4: #fbe3e3; --leaf: #9aa9a0;
  --serif: "Playfair Display", Georgia, serif;
  --script: "Parisienne", "Snell Roundhand", cursive;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Tone warna (field "tone"): mawar = bawaan di atas. */
:root[data-tone="biru-debu"] { --page: #aebfd2; --pink: #c9d8e8; --pink-2: #e0eaf3; --paper: #eef1f4; --paper-2: #dde5ec; --wash: #c6d6e6; --rose: #5f7c9d; --rose-2: #48627f; --frame: #363b42; --ink: #4f6883; --on-pink: #38506a; --shadow: rgba(37, 54, 77, 0.3); --fl-1: #3f6ea3; --fl-2: #86a9cf; --fl-3: #d2e1f0; --fl-4: #eef4fa; --leaf: #9fb0bd; }
:root[data-tone="sage"] { --page: #b4c5ad; --pink: #cddbc7; --pink-2: #e2ebde; --paper: #eff2ee; --paper-2: #e0e7dd; --wash: #c9d8c2; --rose: #6a886a; --rose-2: #527052; --frame: #383d38; --ink: #58735a; --on-pink: #3f5a41; --shadow: rgba(44, 63, 46, 0.3); --fl-1: #c2684f; --fl-2: #eaa48d; --fl-3: #f8dccf; --fl-4: #fdf1ea; --leaf: #8fa98c; }
:root[data-tone="lilac"] { --page: #bfb3da; --pink: #d6cceb; --pink-2: #e8e2f4; --paper: #f0eff4; --paper-2: #e2dfec; --wash: #d2c8e8; --rose: #806cab; --rose-2: #66538f; --frame: #3b3842; --ink: #6c5a96; --on-pink: #4f3f76; --shadow: rgba(58, 45, 85, 0.3); --fl-1: #6f4fae; --fl-2: #a78bd6; --fl-3: #e0d5f3; --fl-4: #f3eefb; --leaf: #a3a4bd; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--page); }
body { margin: 0; min-height: 100vh; font-family: var(--body); font-size: 12.5px; font-weight: 400; line-height: 1.65; color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
svg { display: block; }
a { color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
main { position: relative; max-width: 480px; margin: 0 auto; min-height: 100vh; overflow: hidden; background: var(--paper); }
@media (min-width: 560px) { main { box-shadow: 0 30px 90px var(--shadow); } }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0 0 0.9em; }
.kecil { font-size: 14px; margin: 0; }
.tulis { font-family: var(--script); font-weight: 400; }
.serif { font-family: var(--serif); }
.garis { display: block; height: 1.5px; margin: 0 auto; background: var(--ink); opacity: 0.7; }
.garis.putih { background: #fff; opacity: 0.95; height: 2px; }
.hias { width: 140px; height: 14px; margin: 0 auto 22px; }

/* Bunga, daun, kastil, kilau: warna mengikuti tone */
.f-1 { stop-color: var(--fl-1); } .f-2 { stop-color: var(--fl-2); } .f-3 { stop-color: var(--fl-3); } .f-4 { stop-color: var(--fl-4); }
.daun-isi { fill: var(--leaf); fill-opacity: 0.75; }
.daun-urat { stroke: color-mix(in srgb, var(--leaf) 70%, #3d4a44); stroke-opacity: 0.55; stroke-width: 1; stroke-linecap: round; }
.k-jauh { fill: currentColor; opacity: 0.55; }
.k-badan { fill: currentColor; }
.k-atap { fill: color-mix(in srgb, currentColor 72%, var(--rose-2)); }
.k-garis { fill: none; stroke: #fff; stroke-opacity: 0.4; stroke-width: 1.4; }
.k-pintu { fill: color-mix(in srgb, currentColor 55%, var(--rose-2)); }
.tiang { fill: none; stroke: currentColor; stroke-width: 1.6; }
.panji { fill: color-mix(in srgb, currentColor 40%, var(--fl-1)); transform-box: fill-box; transform-origin: 0 50%; }
.jendela { fill: #fff3c9; }
.kilau { position: absolute; z-index: 2; width: 14px; height: 14px; color: #fff; pointer-events: none; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--fl-2) 70%, transparent)); }
.lambang { width: 84px; height: auto; aspect-ratio: 400 / 272; margin: 0 auto 12px; }

/* Latar: kertas cat air (bercak lembut) & blok merah muda */
.kertas {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 30% at 0% 10%, color-mix(in srgb, var(--paper-2) 90%, transparent), transparent 100%),
    radial-gradient(50% 26% at 100% 30%, color-mix(in srgb, var(--wash) 40%, transparent), transparent 100%),
    radial-gradient(60% 26% at 10% 60%, color-mix(in srgb, #fff 80%, transparent), transparent 100%),
    radial-gradient(50% 30% at 96% 88%, color-mix(in srgb, var(--paper-2) 90%, transparent), transparent 100%),
    var(--paper);
}
.pink { position: relative; background: var(--pink); color: var(--on-pink); }
.isi section { position: relative; text-align: center; }

/* ---------- Sampul ---------- */
.cover { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; text-align: center; background: var(--pink); color: #fff; }
.cover-photo { position: absolute; inset: 0 0 34% 0; overflow: hidden; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.cover-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--rose-2) 22%, transparent) 0%, transparent 26%, transparent 50%, color-mix(in srgb, var(--pink) 80%, transparent) 78%, var(--pink) 95%); }
.cover-photo.kosong { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 38%, var(--pink-2), var(--pink) 72%); }
.cover-photo.kosong span { font: 400 130px/1 var(--serif); color: #fff; opacity: 0.55; }
.cover-photo.kosong i { font-size: 0.5em; margin: 0 0.08em; }
.bingkai { position: absolute; inset: 14px; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 240px 240px 10px 10px; pointer-events: none; }
.bingkai::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: inherit; }
.cover .k1 { left: 16%; top: 16%; } .cover .k2 { right: 14%; top: 30%; width: 10px; height: 10px; } .cover .k3 { left: 24%; top: 47%; width: 9px; height: 9px; }
.cover .lambang { width: 64px; color: #fff; opacity: 0.92; margin-bottom: 8px; }
.cover .lambang .jendela, .cover .lambang .k-garis { opacity: 0; }
.cover-teks { position: relative; padding: 0 26px 92px; display: flex; flex-direction: column; align-items: center; text-shadow: 0 1px 10px color-mix(in srgb, var(--rose-2) 40%, transparent); }
.cover h1 { font: 400 clamp(34px, 10.5vw, 44px)/1.2 var(--serif); letter-spacing: 0.02em; margin: 6px 0 8px; overflow-wrap: anywhere; text-wrap: balance; }
.cover h1::after { content: ""; display: block; width: 64px; height: 1px; margin: 12px auto 4px; background: #fff; opacity: 0.8; }
.kepada { font: 400 15px/1.4 var(--serif); margin: 0 0 8px; }
.guest { font: 700 22px/1.3 var(--serif); margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 7px 18px; border: 0; border-radius: 999px; font: 500 12px/1 var(--body); color: #fff; background: var(--rose); text-decoration: none; cursor: pointer; text-shadow: none; transition: filter 0.15s ease, transform 0.15s ease; }
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn.garis { height: auto; margin: 0; opacity: 1; background: var(--rose); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9); }
.btn.done { filter: saturate(0.6); }
.btn:focus-visible, .isian:focus-visible { outline: 3px solid color-mix(in srgb, var(--rose) 45%, transparent); outline-offset: 2px; }
.btn.open { position: relative; overflow: hidden; margin-top: 24px; min-height: 44px; padding: 10px 28px; background: #fff; color: var(--rose-2); font-size: 14px; box-shadow: inset 0 0 0 1px var(--rose-2), 0 10px 24px -10px var(--shadow); }
.btn.open::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--pink) 75%, transparent), transparent); transform: skewX(-18deg); }

/* Gerbang "Buka undangan": tanpa JS semua isi langsung tampil. */
.js body:not(.opened) .isi { display: none; }
.opened:not(.tirai) .cover { display: none; }
/* Saat dibuka, sampul melayang di atas isi lalu memudar seperti melewati gerbang. */
.tirai .cover { position: fixed; z-index: 40; top: 0; left: 50%; width: 100%; max-width: 480px; height: 100vh; height: 100svh; min-height: 0; translate: -50% 0; pointer-events: none; }

/* ---------- Hero: gapura lengkung berbunga ---------- */
.hero { min-height: 100svh; padding: 54px 30px 0; display: flex; align-items: flex-start; justify-content: center; box-shadow: inset 0 -64px 0 var(--pink); }
.gapura { position: relative; width: 100%; max-width: 300px; min-height: calc(100svh - 140px); padding: 13px 13px 0; border-radius: 999px 999px 0 0; border: 2px solid color-mix(in srgb, var(--rose) 55%, transparent); border-bottom: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--rose) 50%, transparent) 1.6px, transparent 2.2px) 0 0 / 9px 9px, var(--pink-2); }
.gapura-isi { height: 100%; min-height: calc(100svh - 155px); padding: 84px 16px 150px; border-radius: 999px 999px 0 0; border: 2px solid color-mix(in srgb, var(--rose) 55%, transparent); border-bottom: 0; background: color-mix(in srgb, var(--paper) 92%, transparent); }
.hero .kecil { color: var(--ink); letter-spacing: 0.08em; }
.hero .lambang { color: color-mix(in srgb, var(--rose) 62%, var(--pink)); }
.hero .kilau { color: var(--fl-2); }
.hero .k1 { left: 9%; top: 12%; } .hero .k2 { right: 30%; top: 5%; width: 9px; height: 9px; } .hero .k3 { left: 7%; top: 44%; width: 10px; height: 10px; } .hero .k4 { right: 6%; top: 52%; }
.nama-susun { display: flex; flex-direction: column; margin: 14px 0 26px; color: var(--ink); }
.nama-susun .tulis { font-size: clamp(40px, 12.5vw, 52px); line-height: 1.1; rotate: -9deg; overflow-wrap: anywhere; }
.nama-susun .n1 { align-self: flex-start; margin-left: 4%; }
.nama-susun .dan { align-self: center; font-size: 34px; margin: -2px 0 -6px 18%; opacity: 0.8; }
.nama-susun .n2 { align-self: flex-end; margin-right: 4%; }
.tanggal-baris { display: flex; justify-content: center; align-items: stretch; font-size: 11px; margin: 0 0 14px; }
.tanggal-baris span { padding: 2px 12px 12px; }
.tanggal-baris span + span { border-left: 2px solid var(--ink); }
.tanggal-baris span:first-child { border-bottom: 2px solid var(--ink); }
.tanggal-baris .sisa:empty { display: none; }
.kutip-kecil { font-size: 11px; line-height: 1.25; margin: 0; }
.bunga { position: absolute; z-index: 2; filter: blur(0.3px) drop-shadow(0 4px 6px color-mix(in srgb, var(--rose-2) 22%, transparent)); pointer-events: none; }
.b1 { width: 110px; height: 110px; left: -34px; bottom: 96px; rotate: 12deg; }
.b2 { width: 96px; height: 96px; left: 18px; bottom: 58px; rotate: -20deg; }
.b3 { width: 84px; height: 84px; left: -18px; bottom: 30px; rotate: 40deg; }
.b4 { width: 104px; height: 104px; right: -30px; bottom: 100px; rotate: -14deg; }
.b5 { width: 122px; height: 122px; right: 12px; bottom: 44px; rotate: 24deg; }
.b6 { width: 88px; height: 88px; right: -26px; top: 26px; rotate: 30deg; }
.b7 { width: 62px; height: 62px; right: 34px; top: -14px; rotate: -18deg; opacity: 0.85; }
.daun { position: absolute; z-index: 1; width: 44px; height: 74px; }
.d1 { left: 44px; bottom: 124px; rotate: -40deg; }
.d2 { right: 60px; bottom: 132px; rotate: 44deg; }
.bunga, .daun { transform-origin: 50% 50%; }

/* ---------- Pengantar & countdown (blok merah muda) ---------- */
.pengantar { padding: 0 34px 0; }
.hias-atas { width: 30px; height: 30px; margin: 0 auto 22px; color: var(--frame); }
.pengantar .opening { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.pengantar p { font-size: 11.5px; line-height: 1.5; }
.tiga { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 34px -6px 0; }
.tiga img { width: 100%; aspect-ratio: 7 / 6; object-fit: cover; object-position: 50% 16%; border: 2px solid #fff; box-shadow: 0 6px 12px -6px var(--shadow); }
.samar { margin: 36px -34px 0; height: 330px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%); mask-image: linear-gradient(180deg, transparent, #000 35%); }
.samar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; opacity: 0.4; }
.hitung { padding: 96px 34px 34px; margin-top: -1px; color: #fff; }
.hitung h3 { font-size: 24px; letter-spacing: 0.02em; margin-bottom: 14px; }
.kutip { font-size: 12px; line-height: 1.8; max-width: 270px; margin: 0 auto 34px; }
.hitung .kutip { color: var(--on-pink); }
.countdown { display: grid; grid-template-columns: repeat(4, 66px); gap: 8px; justify-content: center; }
.countdown div { padding: 12px 0 9px; border-radius: 34px 34px 8px 8px; border: 1px solid rgba(255, 255, 255, 0.8); background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.1)); box-shadow: 0 10px 18px -12px var(--shadow); }
.countdown b { display: block; font: 600 23px/1.3 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.countdown span { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-pink); }

/* ---------- Mempelai ---------- */
.mempelai { padding: 44px 30px 46px; }
.m1 { width: 150px; height: 150px; left: -70px; top: 44%; opacity: 0.5; }
.m2 { width: 60px; height: 60px; right: -12px; top: 30%; opacity: 0.45; }
.orang { position: relative; z-index: 3; margin-bottom: 50px; }
.orang:last-child { margin-bottom: 0; }
.peran { font-size: 30px; color: var(--frame); margin: 0 0 40px; }
.lengkung { position: relative; width: 150px; aspect-ratio: 5 / 6; margin: 0 auto 60px; border-radius: 999px 999px 0 0; border: 5px solid #fff; background: var(--pink-2); overflow: hidden; box-shadow: 0 12px 20px -10px var(--shadow); outline: 1px solid color-mix(in srgb, var(--rose) 60%, transparent); outline-offset: 7px; }
.lengkung img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.lengkung b { position: absolute; left: -6px; right: -6px; bottom: -14px; font: 400 40px/1 var(--serif); color: rgba(255, 255, 255, 0.82); white-space: nowrap; overflow: hidden; }
.tanpa-foto { display: block; width: 100%; height: 100%; background: linear-gradient(180deg, var(--pink-2), var(--pink)); }
.orang h3 { font-size: 32px; color: var(--ink); margin-bottom: 34px; overflow-wrap: anywhere; }
.orang .garis { width: 62%; margin-bottom: 16px; }
.ortu { font-size: 12px; margin: 0 0 24px; }
.ig { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--rose); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--rose) 18%, transparent); transition: transform 0.2s ease; }
.ig:hover { transform: scale(1.08) rotate(-6deg); }
.ig svg { width: 14px; height: 14px; }

/* ---------- Acara: panel berbingkai gelap di atas foto ---------- */
.acara { margin: 0 0 4px; padding: 16px; background: var(--frame); overflow: hidden; }
.acara .latar { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: cover; object-position: 50% 20%; }
.acara-isi { position: relative; padding: 48px 26px 0; color: #fff; background: color-mix(in srgb, var(--rose) 80%, transparent); display: flex; flex-direction: column; align-items: center; }
.acara-isi::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(255, 255, 255, 0.45); pointer-events: none; }
.acara-isi > * { position: relative; }
.acara .ikon { width: 44px; height: 44px; margin-bottom: 32px; padding: 0; overflow: visible; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.45)); }
.acara h3 { font-size: 30px; margin-bottom: 26px; }
.angka { display: flex; align-items: center; gap: 16px; font: 700 46px/1 var(--serif); margin: 0 0 22px; }
.angka::before, .angka::after { content: ""; width: 44px; height: 1px; background: #fff; opacity: 0.75; }
.when { font-size: 11.5px; margin: 0 0 2px; }
.time { font-size: 11.5px; margin: 0 0 22px; }
.place { font: 700 15px/1.5 var(--serif); letter-spacing: 0.02em; max-width: 270px; margin: 0 0 26px; }
.aksi { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-bottom: 46px; }
.lengkung.polos { width: 62%; margin: 0 auto; aspect-ratio: 4 / 5; border-bottom: 0; box-shadow: none; outline: 0; }
.foto-atas { width: calc(100% - 8px); margin: -22px 0 34px; border: 4px solid #fff; }
.foto-atas img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 14%; }

/* ---------- Love story ---------- */
.kisah { padding: 40px 0 0; box-shadow: inset 0 -120px 0 var(--pink); }
.kisah h3, .kado h3 { font-size: 26px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink); margin-bottom: 12px; }
.kisah .kutip { font-size: 11.5px; margin-bottom: 44px; }
.linimasa { position: relative; z-index: 2; list-style: none; margin: 0 26px 0 22px; padding: 0 0 0 31px; text-align: left; }
.linimasa::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 3px; background: var(--rose); transform-origin: 50% 0; }
.linimasa li { position: relative; padding: 32px 26px 30px; margin-bottom: 22px; border-radius: 4px; background: linear-gradient(160deg, color-mix(in srgb, var(--rose) 88%, #fff), var(--rose) 55%, var(--rose-2)); color: #fff; box-shadow: 0 14px 26px -16px var(--shadow); }
.linimasa li::before { content: ""; position: absolute; left: -37px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--rose), 0 0 0 7px color-mix(in srgb, var(--rose) 22%, transparent); }
.linimasa li::after { content: ""; position: absolute; left: -6px; top: 50%; width: 13px; height: 13px; margin-top: -6px; rotate: 45deg; background: var(--rose); }
.linimasa li:last-child { margin-bottom: 0; }
.linimasa h4 { font: 500 20px/1.3 var(--serif); letter-spacing: 0.02em; margin-bottom: 8px; }
.kapan { font-size: 13px; margin: 0 0 16px; }
.cerita { font-size: 12.5px; line-height: 1.6; margin: 0; white-space: pre-line; }
.kastil { display: block; width: 82%; height: auto; aspect-ratio: 400 / 272; color: color-mix(in srgb, var(--rose) 40%, var(--pink)); }
.negeri { position: relative; margin-top: 6px; padding-top: 36px; }
.negeri .kastil { margin: 0 -8px 0 auto; }
.negeri .kilau { color: #fff; }
.negeri .k1 { left: 24%; top: 26px; } .negeri .k2 { right: 8%; top: 8px; width: 10px; height: 10px; } .negeri .k3 { left: 42%; top: 70px; width: 9px; height: 9px; }
.awan { position: absolute; height: 16px; border-radius: 999px; background: #fff; opacity: 0.75; filter: blur(0.5px); }
.awan::before, .awan::after { content: ""; position: absolute; bottom: 4px; border-radius: 50%; background: #fff; }
.awan::before { left: 16%; width: 38%; aspect-ratio: 1; } .awan::after { right: 18%; width: 30%; aspect-ratio: 1; }
.a1 { left: 4%; top: 64px; width: 70px; } .a2 { right: 6%; top: 104px; width: 52px; height: 12px; opacity: 0.6; }

/* ---------- Galeri: mosaik berbingkai putih ---------- */
.galeri { padding: 40px 20px 40px; color: #fff; }
.galeri h3 { font-size: 26px; letter-spacing: 0.02em; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.grid img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 16%; border: 4px solid #fff; border-radius: 2px; box-shadow: 0 10px 18px -14px var(--shadow); }
.js-ready .grid img { cursor: zoom-in; }
.grid img:nth-child(3n + 1) { grid-column: span 2; aspect-ratio: 16 / 9; }

/* ---------- Kartu merah muda: siaran, RSVP, kado ---------- */
.siaran, .rsvp, .kado { padding: 46px 20px; }
.kartu-pink { position: relative; z-index: 3; padding: 34px 26px 30px; background: var(--pink); color: var(--on-pink); box-shadow: 0 16px 24px -14px var(--shadow); }
.kartu-pink { border-radius: 6px; background: linear-gradient(170deg, var(--pink-2) -30%, var(--pink) 45%); }
.kartu-pink::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255, 255, 255, 0.65); border-radius: 3px; pointer-events: none; }
.kartu-pink h3 { font-size: 23px; font-weight: 500; letter-spacing: 0.02em; color: #fff; margin-bottom: 12px; text-shadow: 0 1px 8px color-mix(in srgb, var(--rose) 35%, transparent); }
.kartu-pink .hias, .galeri .hias, .hitung .hias { color: #fff; }
.kisah .hias, .kado .hias { color: var(--rose); }
.kartu-pink p { font-size: 12px; }
.siaran .btn { margin: 14px 0 26px; }
.catatan { margin: 0 !important; }
.r1 { width: 170px; height: 170px; right: -80px; top: 6%; opacity: 0.45; }
.rsvp .kartu-pink { padding: 30px 14px 22px; }
.panel-terang { padding: 14px 14px 18px; border-radius: 6px; background: color-mix(in srgb, var(--paper) 60%, transparent); }
.jumlah { font-weight: 600; font-size: 13px; margin: 0 0 10px; }
.hitungan { display: grid; grid-template-columns: repeat(3, 68px); justify-content: center; gap: 14px; margin-bottom: 28px; }
.hitungan div { padding: 8px 4px 7px; border: 1px solid var(--rose); border-radius: 8px; background: rgba(255, 255, 255, 0.45); }
.hitungan b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.hitungan span { font-size: 8.5px; }
.rsvp form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.isian { width: 100%; font: 400 14px/1.4 var(--body); color: var(--on-pink); background: #fff; border: 0; border-radius: 6px; padding: 8px 14px; min-height: 34px; }
textarea.isian { resize: vertical; min-height: 70px; }
.isian::placeholder { color: #a9a3a4; }
select.isian { color: #8d8788; }
.btn.kirim { align-self: flex-start; min-height: 30px; padding: 6px 24px; font-weight: 600; }
.note { border-radius: 6px; padding: 10px 14px; background: rgba(255, 255, 255, 0.6); font-size: 12px; margin: 0 0 12px; }
.wishes { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; max-height: 380px; overflow-y: auto; }
.wishes li { padding: 10px 12px; margin-bottom: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.85); }
.wishes li.pinned { box-shadow: inset 3px 0 0 var(--rose); }
.wishes p { margin: 0; font-size: 12px; }
.wishes .who { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; color: var(--rose-2); }
.hadir { font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--rose); border-radius: 999px; padding: 0 7px; }
.wish-reply { font-style: italic; margin-top: 4px !important; }
.ikon-kado { width: 28px; height: 28px; margin: 0 auto 6px; color: var(--rose); }
.kado .lead { font-size: 11.5px; padding: 0 22px; margin: 4px 0 30px; }
.gift-list { display: grid; gap: 34px; }
.rek { padding: 30px 26px 26px; }
.rek p { margin: 0; }
.rek .bank { font: 700 30px/1.1 var(--serif); letter-spacing: 0.03em; text-transform: uppercase; color: var(--rose-2); overflow-wrap: anywhere; }
.rek .garis { margin: 18px 0 24px; }
.number { color: var(--on-pink); margin-bottom: 14px !important; }
.number b { font-weight: 600; letter-spacing: 0.04em; }
.holder { color: var(--on-pink); margin-top: 18px !important; }

/* ---------- Penutup ---------- */
.penutup { padding: 0 0 40px; }
.penutup-bg { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 14%; -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 96%); mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 96%); }
.penutup-teks { position: relative; padding: 0 34px; }
.penutup-bg + .penutup-teks { margin-top: -110px; }
.penutup p { font-size: 11.5px; margin-bottom: 16px; color: var(--on-pink); }
.pemisah { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 26px 40px 22px; color: var(--fl-2); }
.pemisah::before, .pemisah::after { content: ""; flex: 1; height: 1px; background: var(--on-pink); opacity: 0.8; }
.pemisah svg { width: 15px; height: 15px; }
.nama { font-size: 32px !important; line-height: 1.2; color: var(--ink) !important; margin: 0 !important; overflow-wrap: anywhere; }

footer { position: relative; text-align: center; font-size: 11.5px; color: var(--on-pink); padding: 0 16px 34px; background: linear-gradient(180deg, var(--paper) 0%, var(--pink) 46%); }
footer .kastil { margin: 0 auto -2px; width: 70%; }
footer p { margin: 0; }
footer a { font-weight: 600; }

/* Tombol musik */
.music-toggle { position: fixed; right: max(14px, calc(50% - 240px + 14px)); bottom: 46px; z-index: 20; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--frame); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px -4px var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--rose) 70%, transparent); }
.music-toggle svg { width: 14px; height: 14px; }
.music-toggle::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--rose); opacity: 0; pointer-events: none; }

/* Kelopak berjatuhan (dibuat istana.js setelah undangan dibuka) */
.hujan { position: fixed; z-index: 15; top: 0; bottom: 0; left: 50%; width: 100%; max-width: 480px; translate: -50% 0; overflow: hidden; pointer-events: none; }
.hujan i { position: absolute; top: -24px; left: var(--x, 50%); width: var(--s, 11px); height: calc(var(--s, 11px) * 1.25); border-radius: 80% 10% 80% 10%; background: linear-gradient(135deg, var(--fl-4), var(--fl-2)); opacity: 0.7; animation: gugur var(--t, 12s) linear var(--dl, 0s) infinite; }

/* Galeri diperbesar (dibuat istana.js) */
.sorot { position: fixed; z-index: 50; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, var(--frame) 92%, transparent); animation: pudar 0.3s ease both; }
.sorot[hidden] { display: none; }
.sorot img { max-width: 100%; max-height: 82vh; border: 5px solid #fff; border-radius: 3px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6); animation: muncul 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.sorot button { position: absolute; width: 40px; height: 40px; border: 0; border-radius: 50%; font: 400 22px/1 var(--body); color: #fff; background: color-mix(in srgb, var(--rose) 85%, transparent); cursor: pointer; }
.sorot .tutup { top: 16px; right: 16px; }
.sorot .geser { top: 50%; margin-top: -20px; }
.sorot .sblm { left: 10px; } .sorot .ssdh { right: 10px; }
.sorot .urut { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center; font-size: 12px; letter-spacing: 0.1em; color: #fff; }

/* ---------- Animasi ---------- */
@keyframes putar { to { transform: rotate(360deg); } }
@keyframes naik { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes pudar { from { opacity: 0; } to { opacity: 1; } }
@keyframes muncul { from { opacity: 0; scale: 0.9; } to { opacity: 1; scale: 1; } }
@keyframes zum { from { scale: 1.12; } to { scale: 1; } }
@keyframes hanyut { from { scale: 1; } to { scale: 1.07; } }
@keyframes mekar { from { opacity: 0; scale: 0.2; rotate: -50deg; } to { opacity: 1; scale: 1; } }
@keyframes ayun { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(5deg); } }
@keyframes kelip { 0%, 100% { opacity: 0.15; scale: 0.5; } 50% { opacity: 1; scale: 1; } }
@keyframes nyala { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes kibar { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-9deg) scaleX(0.86); } }
@keyframes kilap { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@keyframes lewat { to { opacity: 0; scale: 1.16; filter: blur(7px); } }
@keyframes bangun { from { clip-path: inset(100% -40px -40px -40px); } to { clip-path: inset(-40px); } }
@keyframes goreskan { from { clip-path: inset(-20% 100% -20% -10%); opacity: 0; } 12% { opacity: 1; } to { clip-path: inset(-20% -10% -20% -10%); opacity: 1; } }
@keyframes melayang { 0%, 100% { translate: 0 0; } 50% { translate: 14px 0; } }
@keyframes gugur { 0% { translate: 0 0; rotate: 0deg; opacity: 0; } 8% { opacity: 0.75; } 50% { translate: calc(var(--dx, 40px) * -0.4) 52vh; } 92% { opacity: 0.7; } 100% { translate: var(--dx, 40px) 106vh; rotate: var(--r, 300deg); opacity: 0; } }
@keyframes gema { from { opacity: 0.8; scale: 1; } to { opacity: 0; scale: 1.9; } }
@keyframes detak { 0% { scale: 1; } 40% { scale: 1.22; } 100% { scale: 1; } }
@keyframes geser-foto { from { object-position: 50% 0%; } to { object-position: 50% 42%; } }

@media (prefers-reduced-motion: no-preference) {
  /* Sampul */
  .cover-photo img { animation: zum 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) both, hanyut 14s ease-in-out 2.6s infinite alternate; }
  .bingkai { animation: bangun 1.6s cubic-bezier(0.3, 0.7, 0.2, 1) 0.2s both; }
  .cover .lambang { animation: naik 0.9s ease 0.2s both; }
  .cover .kecil { animation: naik 0.9s ease 0.35s both; }
  .cover h1 { animation: naik 1s ease 0.5s both; }
  .cover .kepada, .cover .guest { animation: naik 0.9s ease 0.7s both; }
  .cover .btn.open { animation: naik 0.9s ease 0.9s both; }
  .btn.open::after { animation: kilap 3.4s ease-in-out 2s infinite; }
  .kilau { animation: kelip 3.2s ease-in-out infinite; }
  .kilau.k2 { animation-delay: 0.9s; animation-duration: 2.6s; } .kilau.k3 { animation-delay: 1.7s; } .kilau.k4 { animation-delay: 0.4s; animation-duration: 3.8s; }
  .tirai .cover { animation: lewat 1.15s cubic-bezier(0.6, 0, 0.3, 1) forwards; }

  /* Hero */
  .opened .gapura { animation: bangun 1.5s cubic-bezier(0.3, 0.7, 0.2, 1) 0.35s both; }
  .opened .hero .lambang { animation: naik 1s ease 1.1s both; }
  .opened .hero .kecil { animation: naik 0.9s ease 1.3s both; }
  .opened .nama-susun .tulis { animation: goreskan 1.2s cubic-bezier(0.5, 0, 0.3, 1) 1.5s both; }
  .opened .nama-susun .dan { animation-delay: 2.1s; animation-duration: 0.7s; }
  .opened .nama-susun .n2 { animation-delay: 2.5s; }
  .opened .tanggal-baris, .opened .kutip-kecil { animation: naik 0.9s ease 3.3s both; }
  .opened .kutip-kecil { animation-delay: 3.5s; }
  .opened .hero .bunga { animation: mekar 1.2s cubic-bezier(0.3, 1.4, 0.5, 1) 1s both; }
  .opened .hero .b2, .opened .hero .b5 { animation-delay: 1.2s; }
  .opened .hero .b3, .opened .hero .b6 { animation-delay: 1.4s; }
  .opened .hero .b7 { animation-delay: 1.6s; }
  .opened .hero .daun { animation: mekar 1s ease 1.5s both; }
  .bunga use, .daun use { transform-box: fill-box; transform-origin: 50% 50%; animation: ayun 7s ease-in-out infinite; }
  .b2 use, .b5 use, .m2 use { animation-duration: 8.5s; animation-delay: -3s; }
  .b3 use, .b6 use, .r1 use { animation-duration: 6s; animation-delay: -1.5s; }

  /* Kastil & langitnya */
  .jendela { animation: nyala 3.6s ease-in-out infinite; }
  .jendela:nth-of-type(odd) { animation-delay: -1.8s; animation-duration: 4.4s; }
  .jendela:nth-of-type(3n) { animation-delay: -0.9s; animation-duration: 2.9s; }
  .panji { animation: kibar 1.8s ease-in-out infinite; }
  .panji:nth-of-type(even) { animation-delay: -0.7s; }
  .awan { animation: melayang 9s ease-in-out infinite; }
  .awan.a2 { animation-duration: 12s; animation-direction: reverse; }

  /* Musik & hitung mundur */
  .music-toggle[aria-pressed="true"] svg { animation: putar 4s linear infinite; }
  .music-toggle[aria-pressed="true"]::after { animation: gema 1.8s ease-out infinite; }
  .countdown b.tik { animation: detak 0.45s ease; }

  /* Masuk saat digulir (kelas dipasang istana.js) */
  .rv { opacity: 0; translate: 0 26px; transition: opacity 0.9s ease calc(var(--d, 0) * 1ms), translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--d, 0) * 1ms), scale 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--d, 0) * 1ms), clip-path 1.2s cubic-bezier(0.3, 0.7, 0.2, 1) calc(var(--d, 0) * 1ms), filter 0.9s ease calc(var(--d, 0) * 1ms); }
  .rv-zoom { translate: 0 0; scale: 0.86; filter: blur(4px); }
  .rv-kanan { translate: 46px 0; }
  .rv-pop { translate: 0 0; scale: 0.5; }
  .rv-garis { opacity: 1; translate: 0 0; scale: 0 1; }
  /* Tidak dipotong habis: IntersectionObserver menganggap elemen yang terpotong penuh tidak terlihat. */
  .rv-lengkung { translate: 0 0; clip-path: inset(86% -40px -40px -40px); }
  .rv-mekar { translate: 0 0; scale: 0.2; }
  .rv.in { opacity: 1; translate: 0 0; scale: 1; filter: none; }
  .rv.rv-mekar.in { opacity: var(--o, 0.5); }
  .rv-lengkung.in { clip-path: inset(-40px); }
  .rv-pop.in, .rv-mekar.in { transition-timing-function: ease, ease, cubic-bezier(0.3, 1.5, 0.5, 1), ease, ease; }
  .gerak .linimasa::before { scale: 1 0; transition: scale 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.2s; }
  .gerak .linimasa.in::before { scale: 1 1; }
  .gerak .negeri .kastil { opacity: 0; translate: 0 46px; transition: opacity 1.2s ease, translate 1.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .gerak .negeri.in .kastil { opacity: 1; translate: 0 0; }

  /* Foto latar bergeser pelan mengikuti guliran (browser yang mendukung) */
  @supports (animation-timeline: view()) {
    .acara .latar, .samar img, .penutup-bg { animation: geser-foto linear both; animation-timeline: view(); }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .hujan { display: none; }
}

/* Foto tiap kisah cinta (opsional, sub-field stories.photo): polaroid kecil di atas judul, miring bergantian. */
.kisah-foto { margin: 2px 0 14px; padding: 6px 6px 20px; background: #fff; border-radius: 3px; box-shadow: 0 10px 22px rgba(30, 20, 20, .16); rotate: -1.4deg; }
:nth-child(even) > .kisah-foto { rotate: 1.4deg; }
.kisah-foto img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
