/* Wiwaha — adat Jawa modern. Semua font SIL OFL, di-host sendiri (lihat FONTS-LICENSE.md). */
@font-face { font-family: "Marcellus"; src: url(fonts/marcellus.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url(fonts/crimson-var.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url(fonts/crimson-var-italic.woff2) format("woff2"); font-weight: 400 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url(fonts/jost-var.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Noto Sans Javanese"; src: url(fonts/javanese.woff2) format("woff2"); font-weight: 400 600; font-display: swap; unicode-range: U+A980-A9DF, U+200C-200D, U+25CC; }

:root {
  --sogan: #5a3a22;
  --sogan-d: #3d2716;
  --maroon: #6e1f24;
  --gold: #c9a45c;
  --gold-l: #e3c88c;
  --gold-d: #9a7330;
  --cream: #f5ecdc;
  --cream-d: #ebdcc2;
  --kelir: #24170f;
  --ink: #3a2618;
  --ink-2: #6b5240;
  --on-dark: #f3e8d4;
  --on-dark-2: #d6c3a4;
  --serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --display: "Marcellus", "Crimson Pro", Georgia, serif;
  --label: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --aksara: "Noto Sans Javanese", sans-serif;
  --navTop: calc(50px + env(safe-area-inset-top));
  --kawung: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23c9a45c' stroke-width='1'%3E%3Cellipse cx='28' cy='13' rx='8' ry='12'/%3E%3Cellipse cx='28' cy='43' rx='8' ry='12'/%3E%3Cellipse cx='13' cy='28' rx='12' ry='8'/%3E%3Cellipse cx='43' cy='28' rx='12' ry='8'/%3E%3Ccircle cx='28' cy='28' r='2.2'/%3E%3Ccircle cx='0' cy='0' r='2.2'/%3E%3Ccircle cx='56' cy='0' r='2.2'/%3E%3Ccircle cx='0' cy='56' r='2.2'/%3E%3Ccircle cx='56' cy='56' r='2.2'/%3E%3C/g%3E%3C/svg%3E");
  --kawung-faint: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23c9a45c' stroke-opacity='.16' stroke-width='1'%3E%3Cellipse cx='28' cy='13' rx='8' ry='12'/%3E%3Cellipse cx='28' cy='43' rx='8' ry='12'/%3E%3Cellipse cx='13' cy='28' rx='12' ry='8'/%3E%3Cellipse cx='43' cy='28' rx='12' ry='8'/%3E%3Ccircle cx='28' cy='28' r='2.2'/%3E%3Ccircle cx='0' cy='0' r='2.2'/%3E%3Ccircle cx='56' cy='0' r='2.2'/%3E%3Ccircle cx='0' cy='56' r='2.2'/%3E%3Ccircle cx='56' cy='56' r='2.2'/%3E%3C/g%3E%3C/svg%3E");
  --parang: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%239a7330' stroke-width='1.1'%3E%3Cpath d='M-6 30L30 -6M18 54L54 18'/%3E%3Cpath d='M-6 46L46 -6'/%3E%3Cpath d='M6 34c2-7 8-9 12-8-1 4-5 9-12 8zM22 18c2-7 8-9 12-8-1 4-5 9-12 8z'/%3E%3Ccircle cx='40' cy='40' r='1.6'/%3E%3Ccircle cx='8' cy='8' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0; background: var(--kelir); color: var(--ink);
  font-family: var(--serif); font-size: 18px; line-height: 1.7; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, .bk-title, .m-name, .ad-title, .greet, .matur, .final-names { text-wrap: balance; }
p, blockquote, figcaption { text-wrap: pretty; }
.bk-desc, .lead, .quote blockquote, .m-parents, .families, .ev-addr, .ev-note { text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
body.is-locked { overflow: hidden; height: 100svh; }
html.is-lb-open, body.is-lb-open { overflow: hidden; overscroll-behavior: none; }
body.is-locked .invitation { visibility: hidden; }

.eyebrow, .bk-no, .m-role, .ad-k, .ev-k, .guest-k, .kami, .tancep, .sub-title, .rk-t, .bank, .field > span, .choice legend, .countdown small {
  font-family: var(--label); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; line-height: 1.4;
}
.aksara { font-family: var(--aksara); font-weight: 400; line-height: 2.1; letter-spacing: 0; margin: 0; }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--label); font-weight: 500; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.btn-gold { background: linear-gradient(135deg, #e3c88c, #c9a45c 45%, #a9802f); color: #2a1b10; box-shadow: 0 8px 24px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-sogan { background: var(--sogan); color: var(--cream); }
.btn-line { background: transparent; border-color: currentColor; }
.btn.wide { width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- gunungan ---------- */
.gn { position: relative; margin: 0 auto; perspective: 600px; pointer-events: none; }
.gn * { pointer-events: none; }
.gn-svg { width: 100%; height: 100%; overflow: visible; }
.gn-svg path { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gn-svg .g-out { stroke-width: 2.2; fill: rgba(110,31,36,.22); }
.gn-svg .g-in { stroke-width: 1; opacity: .7; }
.gn-svg .g-leaf { fill: rgba(201,164,92,.28); }
.gn-svg .g-base { fill: rgba(201,164,92,.16); }
.cream .gn-svg path { stroke: #8a6526; }
.cream .gn-svg .g-in { opacity: .85; }
.cream .gn-svg .g-out { fill: rgba(110,31,36,.08); }

/* ---------- SAMPUL ---------- */
.cover { position: fixed; inset: 0; z-index: 60; overflow: hidden; background: var(--kelir); color: var(--on-dark);
  transition: opacity .55s ease, transform .55s ease, visibility 0s linear .55s; }
.cover.is-opening { opacity: 0; visibility: hidden; pointer-events: none; }
.media-bg { position: absolute; inset: 0; overflow: hidden; }
.media-bg img, .media-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-bg video { opacity: 0; transition: opacity .8s ease; }
.media-bg.is-playing video { opacity: 1; }
/* Sampul berlapis (tanpa video, foto DIAM tanpa zoom). Semua gerak = transform & opacity.
   Lapisan: foto (diam) · bayangan · sinar emas · kilau · debu emas ·
   depan (janur bergoyang + pita parang) · melati gugur · bingkai · teks. */
.cover-media picture { position: absolute; inset: 0; display: block; opacity: .3; }
body.is-ready .cover-media picture { animation: photoIn 1.9s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes photoIn { to { opacity: 1; } }
.cover-media img { object-position: 50% 30%; }
.cover-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(36,23,15,.6) 0%, rgba(36,23,15,.1) 28%, rgba(36,23,15,.35) 50%, rgba(36,23,15,.92) 76%, #24170f 100%); }

.cover-rays { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cover-rays i { position: absolute; top: -25%; left: 4%; width: 36%; height: 95%; transform-origin: 50% 0; transform: rotate(26deg);
  background: linear-gradient(180deg, rgba(243,216,150,.24), rgba(243,216,150,.06) 55%, rgba(243,216,150,0) 85%); opacity: 0; }
.cover-rays i + i { left: 34%; width: 16%; }
body.is-ready .cover-rays i { animation: rays 8s ease-in-out .9s infinite alternate; }
body.is-ready .cover-rays i + i { animation-duration: 10s; animation-delay: 2.2s; }
@keyframes rays { 0% { opacity: 0; transform: rotate(26deg) translateX(-8%); } 45% { opacity: .95; } 100% { opacity: .4; transform: rotate(21deg) translateX(8%); } }

.cover-glint { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cover-glint::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(240,220,168,.10) 45%, rgba(240,220,168,.18) 50%, rgba(240,220,168,.10) 55%, transparent);
  transform: translateX(0) skewX(-8deg); opacity: 0; }
body.is-ready .cover-glint::before { animation: glint 7s ease-in-out 3.2s infinite; }
@keyframes glint { 0% { transform: translateX(0) skewX(-8deg); opacity: 0; } 8% { opacity: 1; } 40% { transform: translateX(420%) skewX(-8deg); opacity: 0; } 100% { transform: translateX(420%) skewX(-8deg); opacity: 0; } }

.cover-dust { position: absolute; inset: 0; pointer-events: none; }
.cover-dust em { position: absolute; left: var(--x); top: var(--y); width: 4px; height: 4px; border-radius: 50%; background: #f6e3ac;
  box-shadow: 0 0 8px 2px rgba(246,227,172,.55); opacity: 0; }
body.is-ready .cover-dust em { animation: twinkle 4.4s ease-in-out calc(1.4s + var(--d)) infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: translateY(0) scale(.4); } 50% { opacity: .9; transform: translateY(-12px) scale(1); } }

.cover-fg { position: absolute; inset: 0; pointer-events: none; transform: translate3d(calc(var(--px, 0) * 16px), calc(var(--py, 0) * 11px), 0); transition: transform .7s ease-out; }
body.is-ready .cover-fg { animation: fgDrift 24s ease-in-out 1.9s infinite alternate; }
@keyframes fgDrift { 0% { translate: 0 0; } 50% { translate: 6px 3px; } 100% { translate: -5px 5px; } }
.band { position: absolute; left: 28px; right: 28px; top: 13px; height: 10px; overflow: hidden; opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.band span { position: absolute; top: 0; left: 0; width: calc(100% + 24px); height: 100%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10'%3E%3Cpath d='M-3 13L15 -3M-15 13L3 -3M9 13L27 -3' stroke='%23e3c88c' stroke-width='1.4' fill='none'/%3E%3Ccircle cx='3' cy='2.5' r='.9' fill='%23e3c88c'/%3E%3C/svg%3E") 0 0 / 12px 10px repeat-x; }
body.is-ready .band { animation: fadeTo .9s ease 1.1s forwards; }
body.is-ready .band span { animation: crawl 7s linear 1.1s infinite; }
@keyframes crawl { to { transform: translateX(-24px); } }
.janur { position: absolute; top: 12px; width: 32px; height: 112px; transform-origin: 50% 0; opacity: 0; }
.janur-l { left: 28px; } .janur-r { right: 28px; }
.janur svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }
.janur path { fill: none; stroke: #ecd59c; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.janur .jk { fill: rgba(201,164,92,.45); }
.janur .jw { stroke-width: .8; opacity: .8; }
.janur .jl { fill: rgba(226,206,128,.7); stroke-width: .9; }
body.is-ready .janur { animation: janurIn 1.2s cubic-bezier(.2,.7,.2,1) .55s forwards, sway 4.8s ease-in-out 1.75s infinite; }
body.is-ready .janur-r { animation-delay: .7s, 2.2s; animation-duration: 1.2s, 5.4s; }
@keyframes janurIn { from { opacity: 0; transform: translateY(-36px); } to { opacity: 1; transform: none; } }
@keyframes sway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(3.5deg); } 75% { transform: rotate(-3.5deg); } }

.cover-petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cover-petals i { position: absolute; top: -24px; left: var(--x); width: 11px; height: 13px; opacity: 0; will-change: transform; }
.cover-petals b { display: block; width: 100%; height: 100%; border-radius: 60% 60% 55% 55% / 70% 70% 35% 35%;
  background: radial-gradient(circle at 40% 30%, #fffef6, #f2ebd3 60%, #d8cda6); box-shadow: 0 1px 2px rgba(0,0,0,.25); transform: scale(var(--s)); }
body.is-ready .cover-petals i { animation: fall var(--t) linear calc(1.2s + var(--d)) infinite; }
body.is-ready .cover-petals b { animation: flutter calc(var(--t) / 4) ease-in-out calc(1.2s + var(--d)) infinite alternate; }
@keyframes fall { 0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); } 8% { opacity: .95; } 86% { opacity: .9; }
  100% { opacity: 0; transform: translate3d(var(--w), calc(100vh + 60px), 0) rotate(320deg); } }
@keyframes flutter { from { transform: scale(var(--s)) translateX(-10px) rotateY(0); } to { transform: scale(var(--s)) translateX(10px) rotateY(65deg); } }

.cover-frame { position: absolute; inset: 12px; pointer-events: none; }
.cover-frame .fl { position: absolute; background: rgba(227,200,140,.6); }
.fl-t, .fl-b { left: 14px; right: 14px; height: 1px; transform: scaleX(0); }
.fl-t { top: 0; } .fl-b { bottom: 0; }
.fl-l, .fl-r { top: 14px; bottom: 14px; width: 1px; transform: scaleY(0); }
.fl-l { left: 0; } .fl-r { right: 0; }
.fc { position: absolute; width: 14px; height: 14px; border: 0 solid rgba(227,200,140,.6); opacity: 0; }
.fc-tl { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; border-top-left-radius: 14px; }
.fc-tr { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; border-top-right-radius: 14px; }
.fc-bl { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; border-bottom-left-radius: 14px; }
.fc-br { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; border-bottom-right-radius: 14px; }
.cover-frame::before, .cover-frame::after { content: ""; position: absolute; left: 50%; width: 60px; height: 10px; margin-left: -30px; opacity: 0;
  background: radial-gradient(circle, var(--gold) 2px, transparent 2.5px) 0 0 / 12px 10px repeat-x; }
.cover-frame::before { top: -5px; } .cover-frame::after { bottom: -5px; }
body.is-ready .fl { animation: line 1.1s cubic-bezier(.6,.05,.2,1) .1s forwards; }
body.is-ready .fl-l, body.is-ready .fl-r { animation-delay: .35s; }
body.is-ready .fc, body.is-ready .cover-frame::before, body.is-ready .cover-frame::after { animation: fadeTo .6s ease 1s forwards; }
@keyframes line { to { transform: none; } }
@keyframes fadeTo { to { opacity: 1; } }

.cover-ui { position: absolute; inset: calc(64px + env(safe-area-inset-top)) 24px calc(26px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; }
.gn-cover { width: 58px; height: 87px; margin-bottom: 8px; transform-origin: 50% 100%; }
.gn-cover .gn-svg path { stroke-dasharray: 1; stroke-dashoffset: 1; }
@keyframes kayonSway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(2.5deg); } 75% { transform: rotate(-2.5deg); } }
.cover .eyebrow { color: var(--gold-l); margin: 0 0 4px; }
.cover-tag { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 8px; font-family: var(--display); font-size: 18px; letter-spacing: .06em; color: var(--cream); }
.cover-tag::before, .cover-tag::after, .cover-date::before, .cover-date::after { content: ""; width: 30px; height: 1px; background: var(--gold-l); opacity: .75; transform: scaleX(0); }
.cover-tag::before, .cover-date::before { transform-origin: 100% 50%; }
.cover-tag::after, .cover-date::after { transform-origin: 0 50%; }
.cover-names { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 12.5vw, 56px); line-height: 1.05; margin: 0; letter-spacing: .02em;
  display: flex; flex-direction: column; align-items: center; text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.cover-names .nm { display: block; }
.cover-names .nm-l { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em .06em .14em; margin: -.04em -.06em -.14em; }
.cover-names .ch { display: inline-block; opacity: 0; transform: translateY(105%) rotate(6deg); transform-origin: 0 100%; }
.cover-names .amp, .hero-names .amp { font-size: .5em; color: var(--gold-l); margin: 2px 0; }
.cover-names .amp { display: inline-block; opacity: 0; transform: scale(.4) rotate(-30deg); }
.cover-aksara { font-size: 20px; color: var(--gold-l); margin-top: 4px; }
.cover-aksara .wipe { display: inline-block; overflow: hidden; vertical-align: top; transform: translateX(-101%); }
.cover-aksara .wipe > span { display: inline-block; transform: translateX(101%); }
.cover-date { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--label); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; margin: 4px 0 14px; color: var(--on-dark); }
.cover-date::before, .cover-date::after { width: 22px; }
.guest { position: relative; margin: 0 0 18px; padding: 12px 18px; width: min(100%, 340px); }
.guest::before, .guest::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: rgba(227,200,140,.4); transform: scaleX(0); }
.guest::before { top: 0; } .guest::after { bottom: 0; }
.guest-k { margin: 0; color: var(--gold-l); font-size: 13px; }
.guest-name { margin: 4px 0 4px; font-family: var(--display); font-size: 24px; line-height: 1.25; color: #fff; word-break: break-word; }
.guest-note { margin: 0; font-size: 16px; line-height: 1.45; color: var(--on-dark-2); }
.guest.is-long .guest-name { font-size: 20px; line-height: 1.3; }
.guest.is-xlong .guest-name { font-size: 18px; }
@media (max-height: 760px) { .guest.is-long .guest-note { display: none; } }
.btn-open { position: relative; isolation: isolate; }
.btn-open::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 2px rgba(243,220,160,.75), 0 0 26px 8px rgba(243,214,150,.45); }
.btn-open .shine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.btn-open .shine::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); }

/* koreografi masuk (detik): bingkai 0,1 · gunungan 0,3 · label 0,6–0,8 · nama 1,0 · aksara 1,7 · tanggal 1,9 · tamu 2,15 · tombol 2,45 */
.cover-ui > * { opacity: 0; transform: translateY(16px); }
body.is-ready .cover-ui > * { animation: rise 1s cubic-bezier(.2,.7,.2,1) forwards; }
body.is-ready .cover-ui > .gn-cover { animation: gnIn 1.2s cubic-bezier(.2,.7,.2,1) .3s forwards, kayonSway 5s ease-in-out 1.6s infinite; }
body.is-ready .gn-cover .gn-svg path { animation: draw 1.6s ease .4s forwards; }
@keyframes gnIn { from { opacity: 0; transform: translateY(10px) scale(.7); } to { opacity: 1; transform: none; } }
body.is-ready .cover-ui > .eyebrow { animation-delay: .6s; }
body.is-ready .cover-ui > .cover-tag { animation-delay: .8s; }
body.is-ready .cover-tag::before, body.is-ready .cover-tag::after { animation: line .9s cubic-bezier(.6,.05,.2,1) 1.05s forwards; }
body.is-ready .cover-ui > .cover-names { animation: fadeTo .01s linear .95s forwards; transform: none; }
body.is-ready .cover-names .ch { animation: chUp .9s cubic-bezier(.2,.8,.2,1) calc(1s + var(--i) * 55ms) forwards; }
body.is-ready .cover-names .amp { animation: ampIn .8s cubic-bezier(.3,1.5,.4,1) calc(1s + var(--i) * 55ms) forwards; }
@keyframes chUp { to { opacity: 1; transform: none; } }
@keyframes ampIn { to { opacity: 1; transform: none; } }
body.is-ready .cover-ui > .cover-aksara { animation-delay: 1.65s; }
body.is-ready .cover-aksara .wipe, body.is-ready .cover-aksara .wipe > span { animation: line 1.1s cubic-bezier(.5,.1,.2,1) 1.7s forwards; }
body.is-ready .cover-ui > .cover-date { animation-delay: 1.9s; }
body.is-ready .cover-date::before, body.is-ready .cover-date::after { animation: line .8s cubic-bezier(.6,.05,.2,1) 2.1s forwards; }
body.is-ready .cover-ui > .guest { animation-delay: 2.15s; }
body.is-ready .guest::before, body.is-ready .guest::after { animation: line 1s cubic-bezier(.6,.05,.2,1) 2.3s forwards; }
body.is-ready .cover-ui > .btn-open { animation-delay: 2.45s; }
body.is-ready .btn-open::before { animation: glow 2.6s ease-out 3.4s infinite; }
body.is-ready .btn-open .shine::before { animation: shine 5s ease-in-out 3s infinite; }
@keyframes glow { 0% { opacity: 0; transform: scale(1); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.12, 1.4); } }
@keyframes shine { 0% { transform: translateX(-120%) skewX(-18deg); } 30%, 100% { transform: translateX(320%) skewX(-18deg); } }
@keyframes rise { to { opacity: 1; transform: none; } }
.cover.is-open { display: none; }

/* ---------- PEMBUKA: pintu gebyok berukir (transform & opacity saja) ---------- */
.opener { position: fixed; inset: 0; z-index: 70; overflow: hidden; cursor: pointer; background: transparent; opacity: 0;
  transition: opacity .25s ease; -webkit-tap-highlight-color: transparent; }
.opener.is-on { opacity: 1; }
.opener.is-out { opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.op-stage { position: absolute; inset: 0; perspective: 1400px; perspective-origin: 50% 45%; }
.op-door { position: absolute; top: 0; bottom: 0; width: 50%; will-change: transform;
  background-color: #4a2e1a;
  background-image: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,220,160,.06) 45%, rgba(0,0,0,.22)), linear-gradient(180deg, #5e3b22, #3a2414);
  box-shadow: inset 0 0 0 10px #2e1c10, inset 0 0 0 11px rgba(201,164,92,.75);
  transition: transform calc(var(--op-ms, 2200ms) * .5) cubic-bezier(.55,.05,.25,1); backface-visibility: hidden; }
.op-dl { left: 0; transform-origin: 0 50%; }
.op-dr { right: 0; transform-origin: 100% 50%; }
.opener.is-swing .op-dl { transform: rotateY(-104deg); }
.opener.is-swing .op-dr { transform: rotateY(104deg); }
.dp { position: absolute; left: 18%; right: 18%; border: 1px solid rgba(201,164,92,.7); border-radius: 4px;
  box-shadow: inset 0 0 0 5px rgba(46,28,16,.55), inset 0 0 0 6px rgba(201,164,92,.35);
  background: var(--kawung) 0 0 / 40px 40px, rgba(36,23,15,.35); }
.dp-top { top: 7%; height: 15%; }
.dp-mid { top: 27%; height: 44%; background: var(--parang) 0 0 / 34px 34px, rgba(36,23,15,.35); }
.dp-bot { top: 76%; height: 16%; }
.op-dl .dp { left: 20%; right: 14%; }
.op-dr .dp { left: 14%; right: 20%; }
.d-ring { position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  border: 3px solid #d9b46a; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.op-dl .d-ring { right: 9px; } .op-dr .d-ring { left: 9px; }
.op-lintel { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #9a7330, #e3c88c, #9a7330); opacity: .9;
  transition: opacity .3s ease; }
.op-seal { position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; display: grid; place-items: center;
  transition: transform calc(var(--op-ms, 2200ms) * .2) cubic-bezier(.3,.7,.2,1), opacity calc(var(--op-ms, 2200ms) * .18) ease; }
.op-seal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.op-seal path { fill: #c9a45c; stroke: #f0dca8; stroke-width: 1.2; stroke-linejoin: round; }
.op-seal circle { fill: #6e1f24; stroke: #e3c88c; stroke-width: 1.5; }
.op-seal circle.in { fill: none; stroke: rgba(227,200,140,.6); stroke-width: 1; }
.op-seal .js-star { transform-origin: 60px 60px; transform: rotate(-12deg) scale(.92); transition: transform calc(var(--op-ms, 2200ms) * .3) ease; }
.opener.is-on .op-seal .js-star { transform: rotate(0) scale(1); }
.op-ini { position: relative; font-family: var(--display); font-size: 22px; color: var(--cream); letter-spacing: .06em; }
.opener.is-unseal .op-seal { transform: translateY(-26px) scale(1.12); opacity: 0; }
.op-greet { position: absolute; left: 0; right: 0; top: calc(50% + 84px); margin: 0; text-align: center; font-family: var(--label); font-weight: 500;
  font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-l); transition: opacity .3s ease; }
.opener.is-unseal .op-greet, .opener.is-swing .op-lintel { opacity: 0; }
.op-skip { position: absolute; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); min-height: 44px; min-width: 88px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid rgba(227,200,140,.6); background: rgba(36,23,15,.7); color: var(--cream);
  font-family: var(--label); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }

/* ---------- RANGKAIAN ADAT (penunjuk babak) ---------- */
.rangkaian { position: fixed; z-index: 40; top: var(--navTop); left: 50%; transform: translate(-50%, -12px); width: min(calc(100% - 16px), 504px);
  border-radius: 16px; background: rgba(36,23,15,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(201,164,92,.45); box-shadow: 0 8px 28px rgba(0,0,0,.25); opacity: 0; transition: opacity .5s ease, transform .5s ease, background-color .3s ease; overflow: hidden; }
.rangkaian.is-on { opacity: 1; transform: translate(-50%, 0); }
.rk-track { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x pan-y; overscroll-behavior-x: contain;
  scrollbar-width: none; padding: 0 14px; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }
.rk-track::-webkit-scrollbar { display: none; }
.rk { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 0 11px; color: var(--on-dark-2); text-decoration: none;
  border-radius: 12px; -webkit-tap-highlight-color: transparent; transition: color .3s ease; }
.rk-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(214,195,164,.55);
  font-family: var(--display); font-size: 14px; line-height: 1; transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
.rk-t { font-size: 13px; letter-spacing: .1em; white-space: nowrap; }
.rk.is-done .rk-n { border-color: var(--gold); color: var(--gold-l); }
.rk.is-active { color: #fff; }
.rk.is-active .rk-n { background: var(--gold); border-color: var(--gold); color: var(--kelir); }
.rk-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(201,164,92,.18); }
.rk-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); transform-origin: 0 50%; transform: scaleX(0); }

#melati { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 30; pointer-events: none; }

/* ---------- ISI ---------- */
.shell { position: relative; max-width: 560px; margin: 0 auto; overflow: hidden; background: var(--cream); }
.babak { position: relative; padding: 108px 24px 84px; text-align: center; scroll-margin-top: 0; isolation: isolate; }
.babak.dark { background: radial-gradient(ellipse 90% 50% at 50% 0%, rgba(110,31,36,.55), transparent 70%), var(--kelir); color: var(--on-dark); }
.babak.dark::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--kawung) 0 0 / 56px 56px; opacity: .09; }
.babak.cream { background: var(--cream); }
.babak.cream::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--parang) 0 0 / 48px 48px; opacity: .07; }
.babak + .babak::after { content: ""; position: absolute; top: 0; left: 50%; width: 140px; height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.lead { max-width: 22em; margin: 0 auto 18px; font-size: 18px; }
.small { font-size: 16px; color: var(--ink-2); margin: 0 0 16px; }
.dark .small { color: var(--on-dark-2); }

/* Babak 1 · Pambuka */
.pambuka { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 120px 22px 90px; overflow: hidden; }
.hero-media img, .hero-media video { object-position: 50% 60%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(36,23,15,.86) 0%, rgba(36,23,15,.35) 40%, rgba(36,23,15,.55) 70%, #24170f 100%); }
.hero-in { position: relative; z-index: 1; }
.pambuka .eyebrow { color: var(--gold-l); margin: 0 0 10px; }
.gn-hero { width: 64px; height: 96px; margin-bottom: 4px; }
.hero-title { font-family: var(--display); font-size: clamp(50px, 16vw, 68px); line-height: 1; margin: 0; letter-spacing: .08em; color: var(--gold-l);
  background: linear-gradient(100deg, #b98d3e 20%, #f4e2b4 45%, #c9a45c 60%); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 220% 100%; animation: shimmer 6s ease-in-out infinite; }
@keyframes shimmer { 0%,100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.hero-names { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 9vw, 40px); line-height: 1.2; margin: 12px 0 6px; color: var(--cream); }
.hero-date { font-family: var(--display); font-size: 22px; letter-spacing: .14em; margin: 0 0 14px; color: var(--on-dark); }
.hero-guest { margin: 0; font-size: 17px; color: var(--on-dark-2); }
.hero-guest strong { color: #fff; font-weight: 600; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 24px; height: 38px; margin-left: -12px; border: 1.5px solid rgba(227,200,140,.7); border-radius: 12px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold-l); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

.salam { padding-top: 64px; }
.ornamen { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 22px; color: var(--gold-d); }
.ornamen span { width: 54px; height: 1px; background: currentColor; opacity: .6; }
.ornamen i { width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid currentColor; }
.greet { font-family: var(--display); font-size: 21px; line-height: 1.5; color: var(--sogan); margin: 0 0 16px; }
.quote { margin: 28px auto 0; max-width: 24em; padding: 22px 18px; border: 1px solid rgba(154,115,48,.4); border-radius: 14px; background: rgba(255,250,240,.55); position: relative; }
.quote blockquote { margin: 0; font-style: italic; font-size: 18px; color: var(--ink); }
.quote figcaption { margin-top: 10px; font-family: var(--label); font-size: 14px; letter-spacing: .1em; color: var(--gold-d); }

/* kepala babak: gunungan berputar masuk seperti pergantian adegan */
.bk-head { margin: 0 auto 40px; max-width: 22em; }
.gn-trans { width: 62px; height: 93px; margin-bottom: 10px; }
.bk-head .gn-svg { transform: rotateY(84deg) scale(.7); opacity: 0; }
.bk-head .gn-svg path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.bk-head.is-in .gn-svg { animation: kayonIn 1.3s cubic-bezier(.3,.7,.2,1) forwards; }
.bk-head.is-in .gn-svg path { animation: draw 1.8s ease forwards .15s; }
@keyframes kayonIn { 0% { transform: rotateY(84deg) scale(.7); opacity: 0; } 55% { transform: rotateY(-25deg) scale(1.05); opacity: 1; } 100% { transform: rotateY(0) scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.bk-head > :not(.gn) { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
.bk-head.is-in > :not(.gn) { opacity: 1; transform: none; }
.bk-head.is-in > :nth-child(3) { transition-delay: .3s; }
.bk-head.is-in > :nth-child(4) { transition-delay: .42s; }
.bk-head.is-in > :nth-child(5) { transition-delay: .55s; }
.bk-no { margin: 0; color: var(--gold-d); }
.dark .bk-no { color: var(--gold-l); }
.bk-title { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 10vw, 42px); line-height: 1.15; margin: 4px 0 0; letter-spacing: .03em; }
.cream .bk-title { color: var(--sogan); }
.bk-aksara { font-size: 22px; line-height: 1.9; margin-top: 2px; color: var(--gold-d); }
.dark .bk-aksara { color: var(--gold); }
.bk-desc { margin: 10px auto 0; max-width: 21em; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.dark .bk-desc { color: var(--on-dark-2); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease var(--d, 0s), transform .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* Babak 2 · Siraman */
.mempelai { margin: 0 auto; max-width: 340px; }
.arch { position: relative; width: min(268px, 80%); aspect-ratio: 3 / 4; margin: 0 auto 18px; border-radius: 140px 140px 14px 14px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 7px var(--cream), 0 0 0 8px rgba(154,115,48,.6), 0 24px 50px rgba(61,39,22,.25); }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.arch picture { display: block; height: 100%; clip-path: inset(100% 0 0 0); transition: clip-path 1.3s cubic-bezier(.6,0,.2,1); }
.mempelai.is-in .arch picture { clip-path: inset(0 0 0 0); }
.water { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.0) 40%, rgba(255,255,255,.35) 50%, rgba(255,255,255,0) 60%, transparent 100%);
  background-size: 100% 240%; background-position: 0 -120%; }
.mempelai.is-in .water { animation: water 2.2s ease .6s 1 both; }
@keyframes water { from { background-position: 0 120%; } to { background-position: 0 -120%; } }
.m-role { margin: 0; color: var(--gold-d); }
.m-name { font-family: var(--display); font-weight: 400; font-size: 29px; line-height: 1.25; margin: 6px 0 8px; color: var(--sogan); }
.m-parents { margin: 0; font-size: 17px; color: var(--ink-2); }
.m-ig { display: inline-flex; min-height: 44px; align-items: center; font-family: var(--label); font-size: 15px; color: var(--gold-d); }
.kembar { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 44px 0; color: var(--gold-d); }
.kembar span { width: 60px; height: 1px; background: currentColor; opacity: .6; }
.kembar i { font-family: var(--display); font-style: normal; font-size: 34px; }

/* Babak 3 · Midodareni */
.midodareni { overflow: hidden; }
.blencong { position: absolute; top: 40px; left: 50%; width: 360px; height: 360px; margin-left: -180px; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(242,196,110,.32), rgba(242,196,110,0) 65%); animation: flicker 3.4s ease-in-out infinite; }
@keyframes flicker { 0%,100% { opacity: .85; transform: scale(1); } 30% { opacity: .65; transform: scale(.97); } 60% { opacity: 1; transform: scale(1.03); } }
.lakon { list-style: none; margin: 0 auto; padding: 0; max-width: 420px; display: grid; gap: 52px; }
.adegan { text-align: left; }
.ad-k { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 6px; color: var(--gold-l); border-bottom: 1px solid rgba(201,164,92,.35); padding-bottom: 8px; }
.ad-year { font-family: var(--display); letter-spacing: .08em; font-size: 16px; }
.ad-title { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.25; margin: 10px 0 6px; color: var(--cream); }
.ad-text { margin: 0 0 18px; font-size: 18px; color: var(--on-dark-2); }
.clip { position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: #140d08; box-shadow: 0 0 0 1px rgba(201,164,92,.45), 0 20px 50px rgba(0,0,0,.4); }
.adegan.is-tall .clip { width: 100%; }
.clip.is-photo { aspect-ratio: 4 / 5; }
.clip img, .clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip video { opacity: 0; transition: opacity .8s ease; }
.clip.is-playing video { opacity: 1; }
.clip-toggle { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(227,200,140,.6);
  background: rgba(36,23,15,.55); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .3s ease; }
.clip-toggle svg { width: 18px; height: 18px; fill: var(--cream); }
.is-manual .clip-toggle, .clip.is-paused .clip-toggle { opacity: 1; }

/* Babak 4 · Ijab Kabul */
.tanggal { margin: 0 auto 26px; color: var(--sogan); }
.t-day { margin: 0; font-family: var(--label); letter-spacing: .2em; text-transform: uppercase; font-size: 15px; color: var(--gold-d); }
.t-num { margin: 0; font-family: var(--display); font-size: 104px; line-height: 1; color: var(--maroon); display: flex; align-items: center; justify-content: center; gap: 18px; }
.t-num::before, .t-num::after { content: ""; width: 54px; height: 1px; background: var(--gold-d); }
.t-month { margin: 4px 0 0; font-family: var(--display); font-size: 24px; letter-spacing: .06em; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 380px; margin: 0 auto 32px; }
.countdown div { padding: 14px 4px 10px; border-radius: 12px; background: var(--sogan); color: var(--cream); box-shadow: inset 0 0 0 1px rgba(227,200,140,.35); }
.countdown span { display: block; font-family: var(--display); font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown small { display: block; margin-top: 4px; font-size: 13px; letter-spacing: .08em; color: var(--gold-l); }
.event-card { max-width: 380px; margin: 0 auto 20px; padding: 26px 20px; border-radius: 16px; background: rgba(255,250,240,.7);
  border: 1px solid rgba(154,115,48,.45); box-shadow: inset 0 0 0 5px rgba(245,236,220,.9), inset 0 0 0 6px rgba(154,115,48,.25); }
.ev-k { margin: 0 0 6px; color: var(--gold-d); }
.ev-time { margin: 0; font-family: var(--display); font-size: 25px; color: var(--maroon); }
.ev-place { margin: 8px 0 0; font-size: 19px; font-weight: 600; color: var(--sogan); }
.ev-addr { margin: 2px 0 0; font-size: 17px; color: var(--ink-2); }
.ev-note { margin: 10px 0 0; font-size: 16px; color: var(--ink-2); font-style: italic; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 auto 8px; }
.cream .btn-line { color: var(--sogan); }

/* Babak 5 · Panggih */
.galeri { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; max-width: 420px; margin: 0 auto; }
.foto { margin: 0; }
.foto.is-wide { grid-column: span 2; }
.foto-open { display: block; width: 100%; padding: 0; border: 0; background: #140d08; border-radius: 12px; overflow: hidden; cursor: zoom-in;
  box-shadow: 0 0 0 1px rgba(201,164,92,.4); -webkit-tap-highlight-color: transparent; }
.foto-open img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .8s ease; }
.foto.is-wide .foto-open img { aspect-ratio: 3 / 2; }
.foto figcaption { margin: 8px 0 0; font-family: var(--label); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-2); }
.foto.reveal { transform: translateY(22px); }
.foto.reveal.is-in { transform: none; }

/* Babak 6 · Pahargyan */
.sub-title { margin: 0 0 8px; color: var(--gold-d); font-size: 15px; }
.rsvp, .pangestu { max-width: 400px; margin: 48px auto 0; text-align: left; }
.rsvp { padding-top: 40px; border-top: 1px solid rgba(154,115,48,.3); }
.rsvp .sub-title, .rsvp .small, .pangestu .sub-title { text-align: center; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(90,58,34,.35);
  background: #fffaf1; font-size: 17px; line-height: 1.5; color: var(--ink); }
.field textarea { resize: vertical; min-height: 104px; }
.choice { border: 0; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice legend { padding: 0; margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.choice label { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(90,58,34,.3); background: #fffaf1; cursor: pointer; font-size: 16px; line-height: 1.3; }
.choice input { width: 20px; height: 20px; accent-color: var(--maroon); flex: none; }
.choice label:has(input:checked) { border-color: var(--maroon); box-shadow: inset 0 0 0 1px var(--maroon); }
.wishes { display: grid; gap: 10px; }
.wish { padding: 16px; border-radius: 14px; background: #fffaf1; border: 1px solid rgba(154,115,48,.3); }
.wish p { margin: 0 0 8px; font-size: 17px; }
.wish footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 15px; color: var(--ink-2); }
.wish strong { font-family: var(--display); font-weight: 400; color: var(--sogan); font-size: 17px; }
.wish time { font-family: var(--label); font-size: 13px; }

/* Babak 7 · Tandha Asih — amplop batik, tutupnya terlipat ke atas */
.amplop { max-width: 380px; margin: 0 auto; }
.amplop-btn { position: relative; display: block; width: 100%; height: 0; padding: 0 0 60%; border: 0; background: none; cursor: pointer;
  perspective: 900px; color: var(--cream); -webkit-tap-highlight-color: transparent; }
.am-body { position: absolute; inset: 0; border-radius: 10px; background-color: var(--maroon);
  background-image: var(--kawung), linear-gradient(180deg, #7a2a2c, #561519); background-size: 48px 48px, auto;
  box-shadow: inset 0 0 0 6px rgba(36,23,15,.25), inset 0 0 0 7px rgba(201,164,92,.75), 0 20px 46px rgba(0,0,0,.4); }
.am-flap { position: absolute; left: 0; right: 0; top: 0; height: 62%; transform-origin: 50% 0; z-index: 1;
  background: linear-gradient(180deg, #8a3a32, #64191d); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform .8s cubic-bezier(.55,.05,.25,1); backface-visibility: hidden; }
.am-flap::after { content: ""; position: absolute; inset: 0; background: var(--parang) 0 0 / 34px 34px; opacity: .55; }
.am-seal { position: absolute; left: 50%; top: 62%; z-index: 2; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f0dca8, #c9a45c 55%, #9a7330); box-shadow: 0 0 0 3px rgba(110,31,36,.9), 0 0 0 4px rgba(227,200,140,.8), 0 6px 14px rgba(0,0,0,.35);
  transition: transform .5s ease, opacity .4s ease; }
.am-seal::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; border: 1.5px solid rgba(110,31,36,.7); }
.amplop.is-open .am-flap { transform: rotateX(180deg); }
.amplop.is-open .am-seal { transform: translateY(-20px) scale(.6); opacity: 0; }
.kotak-cta { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center;
  padding: 10px 18px; border-radius: 999px; background: rgba(36,23,15,.78); border: 1px solid rgba(227,200,140,.7);
  font-family: var(--label); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.gifts { display: grid; gap: 12px; margin-top: 0; max-height: 0; overflow: hidden; opacity: 0; visibility: hidden; transition: max-height .8s ease, opacity .6s ease .2s, margin-top .6s ease, visibility 0s linear .8s; }
.amplop.is-open .gifts { max-height: 1200px; opacity: 1; margin-top: 16px; visibility: visible; transition: max-height .8s ease, opacity .6s ease .2s, margin-top .6s ease, visibility 0s; }
.gift { padding: 20px 18px; border-radius: 14px; background: var(--cream); color: var(--ink); border: 1px solid rgba(154,115,48,.5); }
.gift .bank { margin: 0; color: var(--gold-d); }
.gift .num { margin: 6px 0 2px; font-family: var(--display); font-size: 28px; letter-spacing: .06em; color: var(--maroon); font-variant-numeric: tabular-nums; }
.gift .an { margin: 0 0 12px; font-size: 17px; color: var(--ink-2); }
.gift .btn-line { color: var(--sogan); }

/* Babak 8 · Panutup */
.panutup { padding-bottom: 60px; }
.gn-tancep { width: 76px; height: 114px; }
.bk-head.is-in .gn-tancep .gn-svg { animation: tancep 1.4s cubic-bezier(.3,.7,.2,1) forwards; }
@keyframes tancep { 0% { transform: translateY(-40px) rotate(-14deg); opacity: 0; } 60% { transform: translateY(4px) rotate(3deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
.matur { margin: 26px 0 0; font-family: var(--display); font-size: 40px; line-height: 1.2; color: var(--maroon); }
.matur-aks { font-size: 22px; color: var(--gold-d); margin-bottom: 18px; }
.kami { margin: 0; color: var(--gold-d); }
.families { margin: 6px 0 16px; font-size: 18px; }
.final-names { margin: 0; font-family: var(--display); font-size: 34px; color: var(--sogan); }
.hashtag { margin: 4px 0 18px; font-family: var(--label); font-size: 15px; letter-spacing: .08em; color: var(--gold-d); }
.tancep { margin: 0; color: var(--ink-2); font-size: 13px; }
.foot { padding: 22px 16px calc(28px + env(safe-area-inset-bottom)); text-align: center; background: var(--kelir); color: var(--on-dark-2); font-family: var(--label); font-size: 14px; }
.foot a { color: var(--gold-l); display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

/* ---------- lightbox (latar = tutup) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(20,12,8,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 12px 40px; touch-action: none; cursor: pointer; }
.lb-media img { cursor: default; }
.lb-media { max-width: min(92vw, 520px); }
.lb-media img { max-height: 76vh; width: auto; max-width: 100%; margin: 0 auto; border-radius: 10px; box-shadow: 0 0 0 1px rgba(201,164,92,.5); }
.lb-cap { margin: 12px 0 0; color: var(--on-dark); font-family: var(--label); letter-spacing: .1em; text-transform: uppercase; font-size: 14px; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(227,200,140,.55); background: rgba(36,23,15,.6); color: var(--cream);
  font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.lb-prev { left: 10px; top: 50%; margin-top: -24px; }
.lb-next { right: 10px; top: 50%; margin-top: -24px; }

/* ---------- musik & toast ---------- */
.music-btn { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 45; width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--gold); background: rgba(36,23,15,.85); cursor: pointer; display: grid; place-items: center; }
.gong { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--gold-l) 0 22%, var(--gold-d) 24% 60%, var(--gold) 62%); }
.music-btn.is-on .gong { animation: gong 1.6s ease-in-out infinite; }
@keyframes gong { 0%,100% { transform: scale(1); } 50% { transform: scale(.88); } }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 90; transform: translate(-50%, 20px); max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px; background: var(--kelir); color: var(--cream); font-size: 16px; opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.wish-empty { margin: 0; padding: 16px; text-align: center; color: var(--ink-2); font-style: italic; }

/* ---------- layar kecil & lanskap ---------- */
@media (max-height: 700px) { .gn-cover { display: none; } }
/* HP pendek: foto (diam) digeser ke atas agar wajah mempelai tidak tertutup nama */
@media (max-height: 760px) and (orientation: portrait) {
  .cover-media picture { top: -15%; bottom: 15%; }
  .janur { height: 92px; width: 26px; }
}
@media (max-height: 680px) and (orientation: portrait) { .cover-media picture { top: -19%; bottom: 19%; } }
@media (max-width: 370px) {
  .babak { padding-left: 16px; padding-right: 16px; }
  .t-num { font-size: 88px; }
  .countdown span { font-size: 28px; }
  .choice { grid-template-columns: 1fr; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .cover-ui { inset: 56px 24px 14px; justify-content: center; }
  .gn-cover, .cover-aksara, .guest-note { display: none; }
  .cover-names { flex-direction: row; gap: 12px; font-size: 38px; }
  .cover-names .amp { margin: 0; align-self: center; }
  .cover-tag { font-size: 16px; margin-bottom: 2px; }
  .janur { width: 24px; height: 84px; }
  .guest { margin-bottom: 10px; padding: 6px 14px; }
  .pambuka { min-height: 100vh; min-height: 100svh; padding: 104px 22px 26px; }
  .pambuka .eyebrow { margin-bottom: 4px; }
  .gn-hero, .pambuka .scroll-cue { display: none; }
  .hero-title { font-size: 46px; }
  .hero-names { font-size: 28px; margin: 6px 0 2px; }
  .hero-date { font-size: 18px; margin-bottom: 6px; }
  .hero-guest { font-size: 16px; }
  .hero-media img, .hero-media video { object-position: 50% 58%; }
  .adegan.is-tall .clip { width: min(100%, 240px); }
  .lb-media img { max-height: 70vh; }
  .lightbox { padding: 12px 64px; }
}

/* ---------- Desktop: kartu selebar HP di tengah ---------- */
@media (min-width: 900px) and (min-height: 600px) {
  :root { --cardH: 100vh; --cardW: min(468px, calc(100vh * .58)); --navTop: 64px; }
  body { background: #2a1b13; }
  body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: url(images/bg-blur.webp) center / cover no-repeat; opacity: .55; }
  body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: var(--kawung-faint) 0 0 / 56px 56px, radial-gradient(ellipse 55% 75% at 50% 50%, rgba(36,23,15,.15), rgba(36,23,15,.88)); }
  .shell { width: var(--cardW); max-width: none; z-index: 1; box-shadow: 0 0 0 1px rgba(201,164,92,.35), 0 40px 120px rgba(0,0,0,.5); }
  /* sampul, pintu, dan isi = satu kolom setinggi layar (tanpa celah atas/bawah) */
  .cover, .opener { top: 0; bottom: 0; left: 50%; right: auto; width: var(--cardW); height: auto; transform: translateX(-50%);
    box-shadow: 0 0 0 1px rgba(201,164,92,.35), 0 40px 120px rgba(0,0,0,.5); }
  .cover-frame { inset: 16px; }
  .cover-ui { inset: 72px 30px 34px; }
  .cover-names { font-size: clamp(40px, calc(var(--cardW) * .12), 54px); }
  .pambuka { min-height: 100vh; padding: 140px 30px 100px; }
  .hero-media img, .hero-media video { object-position: 50% 56%; }
  .hero-shade { background: linear-gradient(180deg, rgba(36,23,15,.72) 0%, rgba(36,23,15,.28) 38%, rgba(36,23,15,.5) 70%, #24170f 100%); }
  .hero-title { font-size: clamp(50px, calc(var(--cardW) * .15), 66px); }
  .rangkaian { width: calc(var(--cardW) - 16px); }
  #melati { left: calc(50vw - var(--cardW) / 2); width: var(--cardW); }
  .music-btn { right: calc(50vw - var(--cardW) / 2 - 70px); bottom: 28px; }
  .toast { max-width: calc(var(--cardW) - 32px); }
  body > div[role="note"] { max-width: calc(var(--cardW) - 24px) !important; top: 14px !important; }
}

/* ---------- gerak dikurangi ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cover-ui > *, .reveal, .bk-head > :not(.gn), .bk-head .gn-svg { opacity: 1 !important; transform: none !important; }
  .cover-petals, .cover-dust, .cover-rays, .cover-glint, .btn-open .shine, .btn-open::before { display: none !important; }
  .cover-names .ch, .cover-names .amp, .janur, .band, .fc, .cover-frame::before, .cover-frame::after, .cover-media picture { opacity: 1 !important; transform: none !important; }
  .fl, .cover-aksara .wipe, .cover-aksara .wipe > span, .cover-tag::before, .cover-tag::after, .cover-date::before, .cover-date::after, .guest::before, .guest::after { transform: none !important; }
  .gn-cover .gn-svg path { stroke-dashoffset: 0 !important; }
  .bk-head .gn-svg path { stroke-dashoffset: 0 !important; }
  .arch picture { clip-path: none !important; }
  .arch img { transform: none !important; }
}
