:root {
  --bg: #f6f1e4; --bg2: #ede4cc; --ink: #2a2a26; --muted: #6b685c;
  --primary: #0f4c3a; --deep: #082e23; --on-primary: #fff; --accent: #c9a24b; --card: #fffdf8;
  --line: rgba(0, 0, 0, .12);
}
.theme-sakinah { --bg: #fbf7ee; --bg2: #f1ead9; --ink: #232a38; --muted: #667086; --primary: #27406b; --deep: #14233f; --accent: #b89b5e; --card: #fffefb; }
.theme-mawar   { --bg: #fbf3ee; --bg2: #f4e4dc; --ink: #35232a; --muted: #79636a; --primary: #7a2e3b; --deep: #46161f; --accent: #c98f78; --card: #fffaf7; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg2); color: var(--ink);
  font: 16px/1.7 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.page { max-width: 520px; margin: 0 auto; background: var(--bg); min-height: 100vh; box-shadow: 0 0 40px rgba(0, 0, 0, .12); overflow: hidden; }
h1, h2, h3, .cname { font-family: "Lora", Georgia, serif; font-weight: 500; margin: 0; }
.names, .hero-names { font-family: "Cormorant Garamond", "Lora", Georgia, serif; font-style: italic; font-weight: 600; margin: 0; }
p { margin: 0 0 1em; }
.arab { font-family: "Amiri", "Traditional Arabic", "Noto Naskh Arabic", serif; font-size: 1.7rem; line-height: 2.3; }
.muted { color: var(--muted); }
.center { text-align: center; }
[hidden] { display: none !important; }

.geo-line { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .26; }
.star-line { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.fill-accent { fill: var(--accent); }
.lan-line { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.lan-cap { fill: var(--accent); }
.lan-body { fill: rgba(255, 255, 255, .06); stroke: var(--accent); stroke-width: 1.6; }
.lan-glow { fill: var(--accent); opacity: .8; animation: flicker 3.2s ease-in-out infinite; }

.mode-banner { background: #222; color: #fff; text-align: center; font-size: .85rem; padding: 8px 12px; position: sticky; top: 0; z-index: 90; }
.mode-demo section[id], .mode-preview section[id] { scroll-margin-top: 40px; }

/* ---------- Animasi dasar ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes flicker { 0%, 100% { opacity: .75; } 40% { opacity: 1; } 62% { opacity: .55; } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 4px var(--accent)); } 50% { filter: drop-shadow(0 0 14px var(--accent)); } }
@keyframes rise { 0% { transform: translateY(0) scale(.5); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-105vh) scale(1); opacity: 0; } }
@keyframes shine { to { background-position: 200% center; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------- Langit (hiasan bulan, lentera, bintang) ---------- */
.sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.moon { position: absolute; top: 5%; right: 8%; width: 64px; height: 64px; animation: glow 5s ease-in-out infinite; }
.lantern { position: absolute; top: 0; width: 38px; height: 88px; transform-origin: 50% 0; animation: sway 6s ease-in-out infinite; }
.lantern.l1 { left: 9%; }
.lantern.l2 { left: 21%; height: 66px; width: 28px; animation-delay: -2.4s; animation-duration: 7s; }
.spark { position: absolute; width: 14px; height: 14px; animation: twinkle 3.4s ease-in-out infinite; }
.spark.s1 { top: 14%; left: 38%; animation-delay: 0s; }
.spark.s2 { top: 26%; right: 24%; width: 10px; height: 10px; animation-delay: .9s; }
.spark.s3 { top: 62%; left: 10%; width: 11px; height: 11px; animation-delay: 1.7s; }
.spark.s4 { bottom: 14%; right: 12%; animation-delay: 2.3s; }
.spark.s5 { top: 40%; left: 4%; width: 8px; height: 8px; animation-delay: 1.2s; }
.dust { position: absolute; bottom: -10px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: rise 11s linear infinite; opacity: 0; }
.dust:nth-child(9) { left: 8%; animation-delay: 0s; animation-duration: 12s; }
.dust:nth-child(10) { left: 22%; animation-delay: 2.5s; animation-duration: 9s; width: 3px; height: 3px; }
.dust:nth-child(11) { left: 35%; animation-delay: 5s; animation-duration: 13s; }
.dust:nth-child(12) { left: 48%; animation-delay: 1.2s; animation-duration: 10s; width: 4px; height: 4px; }
.dust:nth-child(13) { left: 61%; animation-delay: 6.4s; animation-duration: 12s; }
.dust:nth-child(14) { left: 74%; animation-delay: 3.3s; animation-duration: 9.5s; width: 3px; height: 3px; }
.dust:nth-child(15) { left: 86%; animation-delay: 7.2s; animation-duration: 11s; }
.dust:nth-child(16) { left: 94%; animation-delay: 4.1s; animation-duration: 14s; width: 4px; height: 4px; }

/* ---------- Gerbang pembuka ---------- */
.gate {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden; background: var(--deep);
}
.js .gate { position: fixed; inset: 0; z-index: 60; background: transparent; }
.door {
  position: absolute; top: 0; bottom: 0; width: 50.6%; z-index: 1; will-change: transform;
  background: var(--primary); background: linear-gradient(165deg, var(--primary), var(--deep));
  transition: transform 1.55s cubic-bezier(.77, 0, .18, 1) .3s;
}
.door-l { left: 0; border-right: 2px solid var(--accent); box-shadow: 8px 0 30px rgba(0, 0, 0, .35); }
.door-r { right: 0; border-left: 2px solid var(--accent); box-shadow: -8px 0 30px rgba(0, 0, 0, .35); }
.door svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gate .sky { transition: opacity .8s ease .15s; }
.gate-content { position: relative; z-index: 3; width: min(100%, 520px); padding: 48px 28px; transition: opacity .6s ease, transform .9s ease; }
.gate-content > * { animation: fadeUp 1s cubic-bezier(.2, .7, .2, 1) both; }
.gate-content > :nth-child(1) { animation-delay: .1s; }
.gate-content > :nth-child(2) { animation-delay: .25s; }
.gate-content > :nth-child(3) { animation-delay: .4s; }
.gate-content > :nth-child(4) { animation-delay: .6s; }
.gate-content > :nth-child(5) { animation-delay: .8s; }
.gate-content > :nth-child(6) { animation-delay: 1s; }
.gate-content > :nth-child(7) { animation-delay: 1.2s; }

.cover-art { display: block; margin: 0 auto 18px; max-width: 200px; width: 55%; height: auto; border-radius: 120px 120px 16px 16px; border: 1px solid var(--accent); }
.orn { width: 60px; height: 60px; margin: 0 auto 8px; display: block; animation: glow 4s ease-in-out infinite; }
.orn.spin { animation: spin 38s linear infinite, glow 4s ease-in-out infinite; }
.eyebrow { letter-spacing: .24em; text-transform: uppercase; font-size: .76rem; color: var(--accent); margin-bottom: 10px; }
.gate .names { font-size: clamp(2.6rem, 12vw, 3.5rem); line-height: 1.05; display: flex; flex-direction: column; align-items: center; margin-bottom: 14px; }
.names i { font-style: normal; font-size: 1.5rem; color: var(--accent); line-height: 1.3; }
.cover-date { color: rgba(255, 255, 255, .92); margin-bottom: 24px; letter-spacing: .04em; }
.to { border-top: 1px solid rgba(255, 255, 255, .25); border-bottom: 1px solid rgba(255, 255, 255, .25); padding: 16px 8px; margin: 0 auto 28px; max-width: 320px; }
.to p { margin: 0; }
.to-name { font-family: "Lora", Georgia, serif; font-size: 1.4rem; margin: 4px 0 !important; word-break: break-word; }
.to-note { font-size: .78rem; color: rgba(255, 255, 255, .7); }

.btn-open {
  position: relative; display: inline-block; text-decoration: none; font-weight: 600; color: #1c1a14; letter-spacing: .03em;
  padding: 13px 34px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(100deg, var(--accent) 20%, #f4e2a8 45%, var(--accent) 70%) 0 0 / 200% 100%;
  animation: shine 3.2s linear infinite, fadeUp 1s cubic-bezier(.2, .7, .2, 1) 1.2s both;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .5);
}
.btn-open:hover { box-shadow: 0 6px 24px rgba(0, 0, 0, .35); transform: translateY(-1px); }
.btn-open:focus-visible, .btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--primary); }

/* Urutan membuka: pintu bergeser, isi memudar, lalu gerbang hilang */
.js body.is-opening .door-l { transform: translateX(-102%); }
.js body.is-opening .door-r { transform: translateX(102%); }
.js body.is-opening .gate-content { opacity: 0; transform: scale(1.18); }
.js body.is-opening .gate .sky { opacity: 0; }
.js body.is-opening .gate { pointer-events: none; }
.js body.is-open .gate { display: none; }
.js body:not(.is-open) { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden; background: var(--primary);
  background: linear-gradient(165deg, var(--primary), var(--deep));
}
.hero-pat { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .sky { z-index: 1; }
.hero-in { position: relative; z-index: 3; padding: 64px 26px 90px; width: 100%; }
.bismillah { color: var(--accent); font-size: 1.5rem; margin-bottom: 18px; }
.hero-names { font-size: clamp(3rem, 14vw, 4.2rem); line-height: 1.05; display: flex; flex-direction: column; align-items: center; margin-bottom: 14px; }
.hero-names span { display: block; }
.hero-names i { font-style: normal; font-size: 1.7rem; color: var(--accent); line-height: 1.4; }
.hero-date { letter-spacing: .08em; opacity: .92; }
.scroll-hint { position: absolute; left: 50%; bottom: 34px; margin-left: -14px; width: 28px; height: 44px; border: 1.5px solid var(--accent); border-radius: 16px; display: block; }
.scroll-hint span { position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 3px; background: var(--accent); animation: bob 1.8s ease-in-out infinite; }

/* ---------- Bagian ---------- */
.sec { padding: 60px 26px; position: relative; }
.sec.alt { background: var(--bg2); }
.salam { font-family: "Lora", Georgia, serif; color: var(--primary); font-size: 1.15rem; }
.intro { color: var(--muted); }
.h { font-family: "Cormorant Garamond", "Lora", serif; font-style: italic; font-weight: 600; font-size: 2.1rem; color: var(--primary); margin-bottom: 22px; line-height: 1.2; }
.divider { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 240px; margin: 0 auto 22px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.divider::after { transform: scaleX(-1); }
.divider svg { width: 28px; height: 28px; animation: spin 24s linear infinite; }

.couple { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 38px; }
.medal { position: relative; width: 104px; height: 104px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, var(--card) 52%, transparent 54%); }
.medal svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 50s linear infinite; }
.medal span { font: italic 600 2.4rem "Cormorant Garamond", "Lora", serif; color: var(--primary); position: relative; line-height: 1; }
.cname { font-size: 1.6rem; color: var(--primary); line-height: 1.3; }
.parents { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.amp { font: italic 600 2.6rem "Cormorant Garamond", "Lora", serif; color: var(--accent); line-height: 1; }
.quote { margin: 0; padding: 26px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; position: relative; }
.quote::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--accent); border-radius: 13px; opacity: .45; pointer-events: none; }
.quote .arab { color: var(--primary); margin-bottom: 8px; }
.quote .terjemah { font-style: italic; color: var(--muted); font-size: .93rem; }
.quote footer { font-size: .85rem; color: var(--primary); font-weight: 600; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 auto 30px; max-width: 360px; }
.countdown.done { display: block; color: var(--primary); font-weight: 600; }
.countdown div { background: var(--primary); background: linear-gradient(160deg, var(--primary), var(--deep)); color: #fff; border-radius: 14px; padding: 12px 4px; border: 1px solid var(--accent); }
.countdown b { display: block; font: 600 1.6rem "Lora", Georgia, serif; line-height: 1.2; }
.countdown [data-cd="s"] { animation: pulse 1s ease-in-out infinite; }
.countdown span { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }

/* Kartu acara berbentuk lengkung mihrab */
.event {
  position: relative; background: var(--card); padding: 70px 22px 28px; margin-bottom: 22px;
  border: 1px solid var(--line); border-radius: 50% 50% 22px 22px / 130px 130px 22px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}
.event::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--accent); border-radius: inherit; opacity: .45; pointer-events: none; }
.event-orn { position: absolute; top: 20px; left: 50%; margin-left: -16px; width: 32px; height: 32px; animation: spin 30s linear infinite; }
.event h3 { font: italic 600 1.7rem "Cormorant Garamond", "Lora", serif; color: var(--primary); margin-bottom: 8px; }
.event p { margin-bottom: .4em; }
.ev-date { font-weight: 600; }
.ev-addr { color: var(--muted); font-size: .93rem; }
.ev-actions { margin-top: 16px !important; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; border: 1px solid var(--primary); background: var(--primary); color: var(--on-primary);
  padding: 10px 22px; border-radius: 999px; font: 600 .92rem "Plus Jakarta Sans", sans-serif; cursor: pointer; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .16); }
.btn.alt { background: transparent; color: var(--primary); }
.btn.alt:hover { background: var(--primary); color: var(--on-primary); }
.btn.small { padding: 6px 14px; font-size: .82rem; }

.notes { list-style: none; padding: 0; margin: 0; text-align: left; display: grid; gap: 10px; }
.notes li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px 13px 46px; position: relative; }
.notes li::before { content: "✦"; position: absolute; left: 17px; top: 12px; color: var(--accent); animation: twinkle 3.6s ease-in-out infinite; }

.acc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; align-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .05); }
.acc .num { font: 600 1.35rem "Lora", Georgia, serif; letter-spacing: .05em; color: var(--primary); }
.acc .holder { color: var(--muted); font-size: .9rem; }

/* RSVP */
.rsvp-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; }
.rsvp-form fieldset:disabled { opacity: .55; }
.rsvp-form label { display: grid; gap: 4px; font-size: .9rem; font-weight: 500; }
.rsvp-form input:not([type="radio"]), .rsvp-form select, .rsvp-form textarea {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: inherit; font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.radios { display: grid; gap: 8px; }
.radios label { display: flex; align-items: center; gap: 8px; font-weight: 400; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; cursor: pointer; }
.radios label:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--card)); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: .92rem; animation: fadeUp .6s both; }
.notice.ok { background: #e4f3e8; color: #17512a; }
.notice.err { background: #fbe7e7; color: #7a1d1d; }
.wishes { margin-top: 38px; }
.wishes h3 { font: italic 600 1.6rem "Cormorant Garamond", "Lora", serif; color: var(--primary); margin-bottom: 14px; }
.wishes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 420px; overflow-y: auto; }
.wishes li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; }
.wishes li p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; overflow-wrap: anywhere; }

.closing { padding-bottom: 120px; }
.closing .doa { color: var(--primary); font-size: 1.5rem; }
.closing .names.small { font-size: 1.9rem; color: var(--primary); margin: 14px 0 22px; }
.credit { font-size: .75rem; color: var(--muted); }

/* ---------- Navigasi bawah ---------- */
.dock {
  position: fixed; left: 50%; bottom: 14px; z-index: 70; display: flex; justify-content: space-around; gap: 2px;
  width: min(92vw, 420px); padding: 6px; border-radius: 999px; transform: translateX(-50%);
  background: rgba(255, 255, 255, .86); border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s ease;
}
.js body:not(.is-open) .dock { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.dock a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 999px; text-decoration: none; color: #5c5a52; font-size: .64rem; font-weight: 500; transition: background .25s, color .25s; }
.dock svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dock a.on { background: var(--primary); color: #fff; }
.dock a:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ---------- Muncul saat digulir ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); will-change: opacity, transform; }
.js [data-reveal="left"] { transform: translateX(-40px); }
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal="zoom"] { transform: scale(.78); }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (min-width: 560px) {
  body { padding: 24px 0; }
  .page { min-height: 0; border-radius: 22px; }
  .lantern.l1 { left: 18%; } .lantern.l2 { left: 26%; } .moon { right: 18%; }
}

/* Hormati preferensi "kurangi gerakan" */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) *, html:not([data-motion="on"]) *::before, html:not([data-motion="on"]) *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js:not([data-motion="on"]) [data-reveal] { opacity: 1; transform: none; }
}
/* Pengunjung yang menekan "Hentikan gerakan" mematikan semua animasi berulang */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; }

/* ---------- Tombol gerakan latar ---------- */
.motion-btn { display: none; }
.js .motion-btn {
  display: grid; place-items: center; position: fixed; top: 14px; right: 14px; z-index: 80; width: 42px; height: 42px; padding: 0;
  border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--primary); border: 1px solid var(--accent); cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22); opacity: 0; pointer-events: none; transition: opacity .7s ease .3s, transform .2s ease;
}
.js body.is-open .motion-btn { opacity: 1; pointer-events: auto; }
.motion-btn:hover { transform: scale(1.07); }
.motion-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.motion-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
/* Selama gerbang belum dibuka, tombol suara dan gerak tak terlihat, jadi juga tidak boleh menerima fokus keyboard */
.js body:not(.is-open) .sound-btn, .js body:not(.is-open) .motion-btn { visibility: hidden; }
.sound-btn ~ .motion-btn { top: 66px; }
.mode-banner ~ .motion-btn { top: 54px; }
.mode-banner ~ .sound-btn ~ .motion-btn { top: 106px; }

/* ---------- Tombol suara ---------- */
.sound-btn { display: none; }
.js .sound-btn {
  display: grid; place-items: center; position: fixed; top: 14px; right: 14px; z-index: 80; width: 42px; height: 42px; padding: 0;
  border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--primary); border: 1px solid var(--accent); cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity .7s ease .3s, transform .2s ease;
}
.js body.is-open .sound-btn { opacity: 1; pointer-events: auto; }
.sound-btn:hover { transform: scale(1.07); }
.sound-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.sound-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn.on::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--accent); animation: ripple 2.4s ease-out infinite; }
.mode-banner ~ .sound-btn { top: 54px; }
.sound-note { margin: 16px auto 0; max-width: 300px; font-size: .74rem; color: rgba(255, 255, 255, .72); }
.gate-content > :nth-child(8) { animation-delay: 1.5s; }
@keyframes ripple { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Ornamen bunga (warna mengikuti tema) ---------- */
:root { --petal-d: #d8b45f; --petal2-d: #f0dba0; --leaf-d: #2f7a5b; --petal-l: #f6e7b8; --petal2-l: #e6c978; --leaf-l: #58b08c; }
.theme-sakinah { --petal-d: #8fa6cf; --petal2-d: #cdd9ee; --leaf-d: #4f7f86; --petal-l: #dbe5f7; --petal2-l: #a9bde0; --leaf-l: #7fb3b8; }
.theme-mawar { --petal-d: #d98ea0; --petal2-d: #f1c6d0; --leaf-d: #6f8f5b; --petal-l: #f8d3dc; --petal2-l: #e9a6b6; --leaf-l: #9fbf86; }
body { --petal: var(--petal-d); --petal2: var(--petal2-d); --leaf: var(--leaf-d); }
.gate, .hero { --petal: var(--petal-l); --petal2: var(--petal2-l); --leaf: var(--leaf-l); }

.fl-back ellipse { fill: var(--petal); stroke: rgba(0, 0, 0, .14); stroke-width: .7; }
.fl-front ellipse { fill: var(--petal2); stroke: rgba(0, 0, 0, .1); stroke-width: .6; }
.fl-core { fill: var(--accent); }
.fl-dot { fill: rgba(0, 0, 0, .28); }
.leaf { fill: var(--leaf); }
.leaf-vein { fill: none; stroke: rgba(255, 255, 255, .4); stroke-width: 1; }
.stem { fill: none; stroke: var(--leaf); stroke-width: 2.2; stroke-linecap: round; }

@keyframes bloom { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.1) rotate(8deg); } }
@keyframes floraSway { 0%, 100% { transform: rotate(-2.5deg) scale(1); } 50% { transform: rotate(2.5deg) scale(1.04); } }
@keyframes petalFall {
  0% { transform: translate3d(0, -6vh, 0) rotate(0); opacity: 0; }
  8% { opacity: .95; }
  35% { transform: translate3d(28px, 34vh, 0) rotate(140deg); }
  65% { transform: translate3d(-24px, 68vh, 0) rotate(260deg); }
  100% { transform: translate3d(18px, 112vh, 0) rotate(400deg); opacity: 0; }
}
@keyframes halo { 0%, 100% { opacity: .25; } 50% { opacity: .65; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }

.bloom { transform-box: fill-box; transform-origin: center; animation: bloom 6s ease-in-out infinite; }
.bloom.b2 { animation-delay: -1.5s; } .bloom.b3 { animation-delay: -3s; } .bloom.b4 { animation-delay: -4.5s; }

/* Rangkaian di sudut */
.flora { position: absolute; width: clamp(96px, 30vw, 140px); aspect-ratio: 1; pointer-events: none; z-index: 0; opacity: .95; }
.flora svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 0 0; animation: floraSway 8s ease-in-out infinite; }
.fl-tl { top: 0; left: 0; }
.fl-tr { top: 0; right: 0; transform: scaleX(-1); }
.fl-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.fl-br { bottom: 0; right: 0; transform: scale(-1, -1); }
.fl-tr svg, .fl-br svg { animation-delay: -4s; }
#acara, .closing { overflow: hidden; }
.sec > *:not(.flora) { position: relative; z-index: 1; }

/* Kelopak yang jatuh pelan */
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.petals i { position: absolute; top: -30px; width: 13px; height: 17px; border-radius: 0 100% 0 100%; background: var(--petal); opacity: 0; animation: petalFall 15s linear infinite; box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .08); }
.petals i:nth-child(1) { left: 6%; animation-delay: 0s; }
.petals i:nth-child(2) { left: 19%; animation-delay: 3.5s; animation-duration: 17s; width: 10px; height: 13px; }
.petals i:nth-child(3) { left: 33%; animation-delay: 8s; animation-duration: 14s; }
.petals i:nth-child(4) { left: 48%; animation-delay: 1.5s; animation-duration: 18s; width: 11px; height: 14px; }
.petals i:nth-child(5) { left: 62%; animation-delay: 6s; }
.petals i:nth-child(6) { left: 77%; animation-delay: 10s; animation-duration: 16s; width: 12px; height: 15px; }
.petals i:nth-child(7) { left: 90%; animation-delay: 4.5s; animation-duration: 13s; }

/* Pembatas bunga */
.divider { max-width: 320px; }
.divider svg.fl-div { width: 140px; height: 44px; animation: none; overflow: visible; }

/* Karakter mempelai + bunga di bahu bingkai */
.avatar { position: relative; width: 148px; margin: 0 auto 16px; }
.avatar::before { content: ""; position: absolute; inset: -9px; border: 1px dashed var(--accent); border-radius: 84px 84px 22px 22px; animation: halo 4.5s ease-in-out infinite; pointer-events: none; }
.avatar .avatar-frame { background: linear-gradient(180deg, var(--card), var(--bg2)); }
.avatar .avatar-frame img { transform-origin: 50% 100%; animation: breathe 5.5s ease-in-out infinite; }
.av-fl { position: absolute; width: 36px; height: 36px; top: 30px; animation: bloom 6s ease-in-out infinite; }
.av-fl.l { left: -17px; } .av-fl.r { right: -17px; animation-delay: -3s; }
.av-lf { position: absolute; width: 30px; height: 15px; top: 62px; }
.av-lf.l { left: -26px; transform: rotate(35deg); } .av-lf.r { right: -26px; transform: rotate(-35deg); }

/* Bunga di sudut bawah kartu acara */
.ev-fl { position: absolute; bottom: -14px; width: 40px; height: 40px; animation: bloom 7s ease-in-out infinite; }
.ev-fl.l { left: 20px; } .ev-fl.r { right: 20px; animation-delay: -3.5s; }
