/* Lilin — template ucapan ulang tahun: kue, lilin, tiup! */
@font-face { font-family: "Baloo 2"; font-weight: 400 800; src: url("fonts/baloo2.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Pacifico"; src: url("fonts/pacifico.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Quicksand"; font-weight: 400 700; src: url("fonts/quicksand.woff2") format("woff2"); font-display: swap; }

:root {
  --cream: #fff6ee; --paper: #fffdf9; --pink: #f7a8bf; --rose: #c2375f; --lav: #c4b1f2; --mint: #b8e6d3; --butter: #ffe08a; --peach: #ffc9a8;
  --ink: #4a2a37; --soft: #7a5664;
}

/* Tone warna (field "tone"): merah-muda = bawaan di atas. */
:root[data-tone="lavender"] { --cream: #f8f4ff; --pink: #c4b1f2; --rose: #6b4fc2; --lav: #f7a8bf; --ink: #33284f; --soft: #655a80; }
:root[data-tone="mint"] { --cream: #f1fbf6; --pink: #9fdcc5; --rose: #23886a; --mint: #f7d6a8; --ink: #1f3d33; --soft: #4f6e63; }
:root[data-tone="langit"] { --cream: #f2f8ff; --pink: #a8cdf7; --rose: #2f6fb5; --ink: #1f3550; --soft: #4f6680; }
* { box-sizing: border-box; }
html { background: var(--cream); }
body {
  margin: 0; color: var(--ink); font: 500 17px/1.65 "Quicksand", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 12% 18%, rgba(247, 168, 191, 0.45) 0 120px, transparent 260px),
    radial-gradient(circle at 88% 70%, rgba(196, 177, 242, 0.45) 0 140px, transparent 300px),
    radial-gradient(circle at 80% 8%, rgba(255, 224, 138, 0.5) 0 80px, transparent 200px),
    radial-gradient(rgba(194, 55, 95, 0.12) 1.5px, transparent 1.6px) 0 0 / 22px 22px,
    var(--cream);
  background-attachment: fixed;
}
main { max-width: 480px; margin: 0 auto; background: var(--cream); position: relative; overflow: hidden; }
@media (min-width: 560px) { main { box-shadow: 0 30px 80px rgba(122, 60, 80, 0.16); } }
section { min-height: 100vh; min-height: 100svh; padding: 64px 26px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; text-align: center; position: relative; }
h1, h2 { margin: 0; font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; color: var(--ink); }
p { margin: 0; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--rose); }
.hint { font-size: 14px; color: var(--soft); }
.js-only { display: none; }

.bunting { position: absolute; top: 0; left: 0; width: 100%; height: 48px; }

/* Hero: kue */
.hero { padding-top: 72px; background: radial-gradient(closest-side circle at 50% 58%, #ffe6d8 0 45%, rgba(255, 230, 216, 0) 100%); }
.hero h1 { font-size: 30px; line-height: 1.15; margin-top: 2px; }
.hero h1 .name { display: block; font-family: "Pacifico", cursive; font-weight: 400; font-size: 54px; line-height: 1.25; color: var(--rose); margin-top: 6px; overflow-wrap: anywhere; }
.cake-wrap { position: relative; width: min(100%, 320px); margin-top: 8px; }
.cake { display: block; width: 100%; height: auto; overflow: visible; }
.age { position: absolute; top: 34%; right: -6px; width: 74px; height: 74px; border-radius: 50%; background: var(--butter); color: var(--ink); display: grid; place-content: center; font: 800 30px/1 "Baloo 2", sans-serif; transform: rotate(10deg); box-shadow: 0 8px 18px rgba(160, 100, 40, 0.22), inset 0 0 0 4px var(--butter), inset 0 0 0 6px #fff; z-index: 2; }
.age small { display: block; font-size: 13px; font-weight: 700; letter-spacing: 1px; margin-bottom: -2px; }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: kedip 1.4s ease-in-out infinite alternate; transition: transform 0.35s ease, opacity 0.35s ease; }
.f2 { animation-duration: 1.1s; animation-delay: -0.4s; }
.f3 { animation-duration: 1.6s; animation-delay: -0.8s; }
.f4 { animation-duration: 1.25s; animation-delay: -0.2s; }
.f5 { animation-duration: 1.45s; animation-delay: -0.6s; }
.glow { animation: pendar 1.8s ease-in-out infinite alternate; transition: opacity 0.4s ease; }
.smoke path { opacity: 0; }
@keyframes kedip {
  0% { transform: scale(1, 1) rotate(-2deg); }
  35% { transform: scale(0.94, 1.08) rotate(2.5deg); }
  70% { transform: scale(1.04, 0.95) rotate(-1deg); }
  100% { transform: scale(0.97, 1.05) rotate(3deg); }
}
@keyframes pendar { from { opacity: 0.65; } to { opacity: 1; } }

.blow { flex-direction: column; align-items: center; gap: 12px; margin-top: 6px; }
.js .blow { display: flex; }
.wish { font-size: 15px; font-weight: 600; color: var(--soft); font-style: italic; }
.yay { font: 800 22px/1.3 "Baloo 2", sans-serif; color: var(--rose); min-height: 0; }
.yay:empty { display: none; }

/* Ditiup */
.blowing .flame { animation: tiup 0.45s ease-in forwards; }
.blowing .glow { opacity: 0; animation: none; }
.blown .flame { opacity: 0; animation: none; transform: scale(0.1, 0.1); }
.blown .glow { opacity: 0; animation: none; }
.blown .smoke path { animation: asap 2.2s ease-out forwards; }
.blown .smoke path:nth-child(2) { animation-delay: 0.12s; }
.blown .smoke path:nth-child(3) { animation-delay: 0.05s; }
.blown .smoke path:nth-child(4) { animation-delay: 0.18s; }
.blown .smoke path:nth-child(5) { animation-delay: 0.09s; }
.blown .blow { display: none; }
@keyframes tiup { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(-28deg) scale(0.8, 1.15); } 100% { transform: rotate(-40deg) scale(0.05); opacity: 0; } }
@keyframes asap { 0% { opacity: 0; transform: translateY(6px); } 20% { opacity: 0.9; } 100% { opacity: 0; transform: translateY(-34px) scaleX(1.4); } }
.smoke path { transform-box: fill-box; transform-origin: 50% 100%; }

/* Belum ditiup: bagian setelah kue menunggu (hanya bila JS aktif). */
.js .waiting:not(.blown) .sealed { display: none !important; }
.blown .sealed { animation: muncul 0.8s ease both; }

/* Pesan */
.message, .gallery, .reply { min-height: 0; padding: 56px 26px; }
.js [data-opener=story] .message, .js [data-opener=story] .gallery, .js [data-opener=story] .reply { min-height: 100vh; min-height: 100svh; }
.card {
  position: relative; width: 100%; background: var(--paper); border-radius: 26px; padding: 40px 26px 32px; text-align: left;
  box-shadow: 0 1px 0 #fff inset, 0 22px 50px rgba(194, 55, 95, 0.14), 0 0 0 1px rgba(194, 55, 95, 0.08);
}
.card::before { content: ""; position: absolute; left: 22px; right: 22px; top: -10px; height: 20px; background: radial-gradient(circle, var(--pink) 0 6px, transparent 6.5px) center / 24px 20px space no-repeat; }
.card .eyebrow { margin-bottom: 14px; }
.message .text { white-space: pre-line; font-size: 18px; font-weight: 600; line-height: 1.7; color: var(--ink); }
.from { margin-top: 22px; font-size: 14px; color: var(--soft); font-weight: 600; }
.from span { display: block; font: 400 30px/1.4 "Pacifico", cursive; color: var(--rose); }

/* Galeri */
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
.photos figure { margin: 0; background: #fff; padding: 8px 8px 26px; border-radius: 6px; box-shadow: 0 10px 24px rgba(122, 60, 80, 0.14); transform: rotate(-2deg); }
.photos figure:nth-child(even) { transform: rotate(2.5deg); }
.photos figure:first-child:last-child, .photos figure:nth-child(3):last-child { grid-column: 1 / -1; }
.photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }

/* Balasan */
.reply { padding-bottom: 72px; background: radial-gradient(closest-side circle at 50% 50%, #e3f5ec 0 50%, rgba(227, 245, 236, 0) 100%); }
.slice { font-size: 54px; line-height: 1; }
.reply h2 { font-size: 34px; line-height: 1.12; max-width: 12em; }
.lead { font-weight: 600; color: var(--soft); margin-top: 10px; }
.reply form { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 4px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--rose); color: #fff; font: 700 16px/1 "Quicksand", sans-serif; cursor: pointer; box-shadow: 0 8px 18px rgba(194, 55, 95, 0.28); transition: transform 0.15s ease; }
.btn:active { transform: scale(0.97); }
.btn:focus-visible, textarea:focus-visible, .envelope:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; }
.btn.big { min-height: 56px; padding: 0 34px; font-size: 18px; }
.btn.big::before { content: ""; width: 20px; height: 20px; margin-right: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 7h9a3 3 0 1 0-3-3'/%3E%3Cpath d='M2 11h13a3 3 0 1 1-3 3'/%3E%3Cpath d='M2 15h5'/%3E%3C/svg%3E") center / contain no-repeat; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(74, 42, 55, 0.25); }
textarea { font: inherit; font-size: 16px; padding: 14px 16px; border: 0; border-radius: 18px; background: #fff; color: var(--ink); min-height: 96px; box-shadow: inset 0 0 0 1.5px rgba(74, 42, 55, 0.18); resize: vertical; }
textarea::placeholder { color: #9b7f8a; }
.note { font-weight: 700; color: var(--rose); }

/* Amplop */
.envelope { display: none; }
.js [data-opener=amplop] .envelope { display: flex; cursor: pointer; background: radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--pink) 30%, #fff) 0 30%, transparent 65%); }
.js [data-opener=amplop] main > section:not(.envelope) { display: none; }
.js [data-opener=amplop].opened .envelope { display: none; }
.js [data-opener=amplop].opened main > section:not(.envelope) { display: flex; animation: muncul 0.7s ease both; }
.js [data-opener=amplop].opened.waiting:not(.blown) main > section.sealed { display: none; }
.env-title { font: 400 36px/1.3 "Pacifico", cursive; color: var(--rose); margin-bottom: 18px; }
.flap { width: 250px; height: 168px; position: relative; border-radius: 16px; background: var(--pink); box-shadow: 0 24px 50px rgba(194, 55, 95, 0.25); animation: goyang 2.8s ease-in-out infinite; overflow: hidden; }
.flap::before { content: ""; position: absolute; inset: 0; background: var(--pink); clip-path: polygon(0 100%, 50% 48%, 100% 100%); }
.flap::after { content: ""; position: absolute; inset: 0 0 auto; height: 100px; background: var(--lav); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.seal { position: absolute; left: 50%; top: 74px; width: 50px; height: 50px; margin-left: -25px; border-radius: 50%; background: var(--rose); z-index: 1; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(122, 30, 60, 0.3), inset 0 0 0 3px rgba(255, 255, 255, 0.25); }
.seal svg { width: 32px; height: 32px; }
.envelope .hint { margin-top: 22px; }
@keyframes goyang { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg) translateY(-6px); } }

/* Story */
.bars { display: none; }
.js [data-opener=story] .bars { display: flex; position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: min(452px, calc(100% - 28px)); gap: 4px; z-index: 5; }
.bars span { flex: 1; height: 4px; border-radius: 4px; background: var(--rose); opacity: 0.2; }
.bars span.done { opacity: 0.85; }
.js [data-opener=story] [data-step] { display: none; cursor: pointer; }
.js [data-opener=story] [data-step].active { display: flex; animation: muncul 0.45s ease both; }
.js [data-opener=story] footer { display: none; }
.js [data-opener=story] .hint.js-only { display: block; }
.js [data-opener=story] .hero .bunting { top: 22px; }
.js [data-opener=story] .hero { padding-top: 92px; }

/* Konfeti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 14px; border-radius: 2px; background: var(--c); animation: jatuh var(--t) cubic-bezier(0.25, 0.6, 0.4, 1) var(--d) both; }
.confetti i.round { width: 10px; height: 10px; border-radius: 50%; }
@keyframes jatuh { from { transform: translate(0, 0) rotate(0); opacity: 1; } 85% { opacity: 1; } to { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: 0; } }

footer { padding: 26px 24px 34px; text-align: center; font-size: 13px; color: var(--soft); max-width: 480px; margin: 0 auto; background: var(--cream); }
footer a { color: var(--rose); font-weight: 700; }
.music-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 20; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--rose); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 8px 20px rgba(194, 55, 95, 0.35); }
.music-toggle[aria-pressed=true] span { display: inline-block; animation: putar 3s linear infinite; }
@keyframes putar { to { transform: rotate(360deg); } }
@keyframes muncul { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Animasi ---------- */
@media (prefers-reduced-motion: no-preference) {
  main .photos figure { animation: mo-pop .8s cubic-bezier(.34,1.56,.64,1) .5s both; }
  main .photos figure:nth-child(2) { animation-delay: .62s; }
  main .photos figure:nth-child(3) { animation-delay: .74s; }
  main .photos figure:nth-child(n+4) { animation-delay: .86s; }
}
@keyframes mo-denyut { 0%, 100% { scale: 1; } 50% { scale: 1.08; } }
@keyframes mo-ambang { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes mo-ayun { from { rotate: -2.2deg; } to { rotate: 2.2deg; } }
@keyframes mo-putar { to { rotate: 360deg; } }
@keyframes mo-kerlip { 0%, 100% { opacity: 1; scale: 1; } 50% { opacity: .35; scale: .72; } }
@keyframes mo-kilau { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes mo-geser { from { translate: -26px 0; } to { translate: 26px 0; } }
@keyframes mo-garis { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes mo-naik { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes mo-blur { from { opacity: 0; filter: blur(10px); scale: 1.05; } to { opacity: 1; filter: blur(0); scale: 1; } }
@keyframes mo-pop { from { opacity: 0; scale: .55; rotate: -8deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes mo-nudge { 0%, 100% { translate: 0 0; } 50% { translate: 5px 0; } }
@keyframes mo-hujan { to { background-position: 0 520px, 0 520px, 0 520px, 0 780px, 0 780px; } }
@keyframes mo-wiggle { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }

/* ---------- 1.2.0: Kado kejutan, gaya mewah. Bagiannya jadi panggung beludru (warna turunan --rose, ikut tone) dengan
   kilau emas; kotak satin berpita emas silang dan pita kupu-kupu emas, kilau satin menyapu pelan. Dibuka: kotak bergetar,
   tutup terlempar, sinar emas berputar di belakang, cipratan emas, foto mengintip, lalu kartu doa berbingkai emas
   bersegel. Tanpa JS kotaknya dilewati dan isinya tampil sebagai kartu. ---------- */
.gifts { --emas: linear-gradient(100deg, #a8761f, #f6e2a0 30%, #cf9d36 50%, #fff0bf 72%, #9b6a17); --beludru: color-mix(in srgb, var(--rose) 42%, #16060d);
  min-height: 0; padding: 64px 22px 70px; color: #fff3e2; overflow: hidden;
  background: radial-gradient(ellipse 70% 45% at 50% 38%, color-mix(in srgb, var(--rose) 55%, #3a1020) 0, transparent 100%), radial-gradient(ellipse 120% 60% at 50% 110%, rgba(214, 165, 70, .28), transparent 70%), var(--beludru); }
.js [data-opener=story] .gifts { min-height: 100vh; min-height: 100svh; }
.emas-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.gifts .bintik { position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background: radial-gradient(circle, #ffe6a6 0 1.2px, transparent 1.6px) 0 0 / 46px 52px, radial-gradient(circle, #fff 0 1px, transparent 1.4px) 23px 26px / 46px 52px, radial-gradient(circle, #f3cf7a 0 1.6px, transparent 2px) 11px 40px / 92px 104px; }
.gifts > :not(.bintik):not(.emas-defs) { position: relative; }
.gifts .eyebrow { color: #f0cf87; letter-spacing: 5px; }
.gifts .eyebrow::before, .gifts .eyebrow::after { content: ""; display: inline-block; vertical-align: middle; width: 28px; height: 1px; margin: 0 10px 3px; background: linear-gradient(90deg, transparent, #f0cf87); }
.gifts .eyebrow::after { background: linear-gradient(90deg, #f0cf87, transparent); }
.gifts h2 { font-size: 34px; line-height: 1.1; color: transparent; background: linear-gradient(180deg, #fff8e6 30%, #f0cf87); -webkit-background-clip: text; background-clip: text; text-shadow: none; }
.gifts .lead { margin-top: 0; color: rgba(255, 240, 222, .8); }
.js .gifts .lead.js-only { display: block; }
.gifts .hint { color: rgba(255, 240, 222, .7); }

.kado-grid { width: 100%; margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 34px 20px; }
.kado { --warna: #fbf1e3; --gelap: #e7d3b8; position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.kado:nth-child(4n+2) { --warna: color-mix(in srgb, var(--pink) 70%, #fff); --gelap: color-mix(in srgb, var(--pink) 85%, var(--rose)); translate: 0 20px; }
.kado:nth-child(4n+3) { --warna: #f3dfb8; --gelap: #d9b77a; }
.kado:nth-child(4n+4) { --warna: color-mix(in srgb, var(--lav) 65%, #fff); --gelap: color-mix(in srgb, var(--lav) 90%, #5a3d8a); translate: 0 20px; }
.kado:last-child:nth-child(odd) { grid-column: 1 / -1; width: 56%; justify-self: center; translate: none; }
.kotak { display: none; position: relative; width: 100%; aspect-ratio: 1 / .98; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.js .kotak { display: block; }
.kotak::before { content: ""; position: absolute; left: -2%; right: -2%; bottom: -9%; height: 22%; border-radius: 50%; background: radial-gradient(closest-side, rgba(246, 210, 130, .45), transparent); }
.kotak:focus-visible { outline: 2px solid #f0cf87; outline-offset: 6px; border-radius: 12px; }
.badan { position: absolute; z-index: 2; left: 9%; right: 9%; bottom: 0; height: 63%; border-radius: 6px; overflow: hidden;
  background: var(--emas) 50% 0 / 15% 100% no-repeat, linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, .1) 44% 46%, transparent 46%),
    radial-gradient(circle, rgba(201, 150, 60, .35) 0 1.4px, transparent 1.8px) 0 0 / 14px 14px, linear-gradient(135deg, var(--warna) 20%, var(--gelap));
  box-shadow: inset 0 -14px 18px -10px rgba(60, 20, 10, .25), inset 0 1px 0 rgba(255, 255, 255, .7), 0 16px 26px rgba(10, 0, 5, .45); }
.badan::before { content: ""; position: absolute; left: 0; right: 0; top: 40%; height: 15%; background: var(--emas); box-shadow: 0 2px 4px rgba(60, 30, 0, .25); }
.badan::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg); }
.tutup { position: absolute; z-index: 3; left: 3%; right: 3%; top: 25%; height: 16%; border-radius: 5px; transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1);
  background: var(--emas) 50% 0 / 14% 100% no-repeat, linear-gradient(180deg, color-mix(in srgb, var(--warna) 70%, #fff), var(--gelap));
  box-shadow: 0 6px 8px rgba(30, 5, 5, .3), inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 0 rgba(160, 110, 40, .5); }
.pita { position: absolute; left: 50%; bottom: 62%; width: 62%; translate: -50% 0; fill: url(#emas-pita); overflow: visible; }
.pita .ekor { fill: url(#emas-gelap); } .pita .lipat { fill: rgba(110, 70, 10, .35); } .pita .simpul { fill: url(#emas-gelap); }
.sinar { position: absolute; z-index: 0; left: 50%; top: 30%; width: 210%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; opacity: 0; scale: .3;
  background: repeating-conic-gradient(from 0deg, rgba(255, 222, 150, .55) 0 5deg, transparent 5deg 15deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 75%); mask-image: radial-gradient(closest-side, #000 20%, transparent 75%);
  transition: opacity .6s ease .5s, scale .9s cubic-bezier(.2, .8, .3, 1) .5s; }
.terbuka .sinar { opacity: .55; scale: 1; }
.intip { position: absolute; z-index: 1; left: 50%; bottom: 30%; width: 56%; aspect-ratio: 1; object-fit: cover; translate: -50% 40%; rotate: -5deg; border: 4px solid #fffaf0; border-radius: 3px; box-shadow: 0 8px 16px rgba(10, 0, 5, .4), 0 0 0 1px rgba(201, 150, 60, .6); opacity: 0; transition: translate .7s cubic-bezier(.3, 1.5, .5, 1) .15s, opacity .3s ease .15s; }
.intip-x { position: absolute; z-index: 1; left: 50%; bottom: 40%; font-size: 34px; line-height: 1; translate: -50% 60%; opacity: 0; transition: translate .7s cubic-bezier(.3, 1.5, .5, 1) .15s, opacity .3s ease .15s; }
.kotak:has(.intip) .intip-x { display: none; }
.tag { padding: 5px 14px 4px; border-radius: 3px; background: linear-gradient(180deg, #fffaf0, #f4e6cc); color: #5a3a1a; font: 700 14px/1.25 "Baloo 2", sans-serif; max-width: 100%; overflow-wrap: anywhere; box-shadow: 0 0 0 1px #d4a53c, 0 0 0 3px rgba(255, 250, 240, .9), 0 0 0 4px #b8862b, 0 6px 12px rgba(10, 0, 5, .35); }
.terbuka .tag::after { content: " ✦"; color: #b8862b; }
.terbuka .tutup { transform: translate(-30%, -40%) rotate(-28deg); }
.terbuka .intip { opacity: 1; translate: -50% -52%; rotate: 6deg; }
.terbuka .intip-x { opacity: 1; translate: -50% -30%; }
.buka .kotak { animation: getar .35s linear 2; }
.buka .tutup { animation: lempar .55s .55s cubic-bezier(.2, .7, .4, 1) both; }
.cipratan { position: absolute; left: 50%; top: 40%; z-index: 4; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); pointer-events: none; animation: ciprat .9s cubic-bezier(.1, .7, .3, 1) both; }
.cipratan.bintang { border-radius: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); width: 14px; height: 14px; }

/* Isi kado: tanpa JS tampil sebagai kartu di bawah judulnya; dengan JS disalin ke dialog .kartu. */
.isi { width: 100%; padding: 16px 12px 18px; background: #fffaf2; color: var(--ink); border-radius: 6px; box-shadow: 0 0 0 1px #d4a53c, 0 10px 24px rgba(10, 0, 5, .35); }
.js .kado .isi { display: none; }
.polaroid { margin: 0 auto 14px; width: 86%; padding: 9px 9px 32px; background: #fff; border-radius: 3px; rotate: -2deg; box-shadow: 0 14px 28px rgba(74, 42, 55, .25), 0 0 0 1px rgba(201, 150, 60, .35); position: relative; }
.polaroid::before { content: ""; position: absolute; left: 50%; top: -11px; width: 74px; height: 22px; translate: -50% 0; rotate: 3deg; background: linear-gradient(100deg, rgba(200, 150, 60, .75), rgba(255, 238, 190, .85) 45%, rgba(200, 150, 60, .75)); }
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.isi-judul { font: 400 27px/1.3 "Pacifico", cursive; color: transparent; background: linear-gradient(100deg, #8a5a10, #c99634 45%, #8a5a10); -webkit-background-clip: text; background-clip: text; overflow-wrap: anywhere; }
.isi-judul::after { content: "✦"; display: block; margin: 4px auto 0; width: 70%; font: 400 11px/1 sans-serif; color: #c99634; background: linear-gradient(90deg, transparent, #d4a53c 30%, transparent 44%, transparent 56%, #d4a53c 70%, transparent) 0 50% / 100% 1px no-repeat; -webkit-background-clip: border-box; background-clip: border-box; }
.isi-doa { margin-top: 8px; font-size: 16px; font-weight: 600; line-height: 1.65; color: var(--ink); white-space: pre-line; }
.semua { margin-top: 30px; font: 800 20px/1.3 "Baloo 2", sans-serif; color: transparent; background: linear-gradient(180deg, #fff3cf, #e7b95a); -webkit-background-clip: text; background-clip: text; }
.semua:empty { display: none; }

.kartu { width: min(88vw, 380px); max-height: 92vh; padding: 34px 24px 24px; border: 2px solid transparent; border-radius: 10px; color: var(--ink); text-align: center; overflow: auto;
  background: radial-gradient(circle, rgba(201, 150, 60, .12) 0 1px, transparent 1.4px) 0 0 / 16px 16px padding-box, linear-gradient(#fffaf2, #fbf0dc) padding-box, linear-gradient(135deg, #a8761f, #f6e2a0 30%, #cf9d36 55%, #fff0bf 75%, #9b6a17) border-box;
  outline: 1px solid rgba(201, 150, 60, .6); outline-offset: -11px; box-shadow: 0 30px 80px rgba(10, 0, 5, .55); }
.kartu::backdrop { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--rose) 35%, rgba(20, 5, 10, .55)), rgba(12, 2, 6, .82)); }
.kartu[open] { animation: kartuMuncul .7s cubic-bezier(.3, 1.4, .5, 1) both; }
.kartu .isi { display: block; padding: 0; background: none; box-shadow: none; }
.kartu .isi::before { content: "♥"; display: grid; place-items: center; width: 46px; height: 46px; margin: -8px auto 26px; border-radius: 50%; color: #fff4d8; font-size: 20px; background: radial-gradient(circle at 35% 30%, #f6dc95, #c9922f 55%, #8a5a10); box-shadow: 0 4px 10px rgba(110, 70, 10, .4), inset 0 0 0 3px rgba(255, 240, 200, .35); }
.kartu .polaroid { animation: polaroidMasuk .8s .15s cubic-bezier(.3, 1.3, .5, 1) both; }
.kartu .btn { margin-top: 20px; width: 100%; background: linear-gradient(100deg, #a8761f, #e6c46e 40%, #b8862b 70%, #8a5a10); color: #fffaf0; text-shadow: 0 1px 1px rgba(80, 50, 0, .5); box-shadow: 0 8px 18px rgba(138, 90, 16, .4), inset 0 1px 0 rgba(255, 255, 255, .45); }

@media (prefers-reduced-motion: no-preference) {
  .js .kado:not(.terbuka):not(.buka) .kotak { animation: goyangKado 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
  .js .kado:nth-child(2):not(.terbuka) .kotak { animation-delay: -.9s; } .js .kado:nth-child(3):not(.terbuka) .kotak { animation-delay: -1.8s; }
  .js .kado:nth-child(4):not(.terbuka) .kotak { animation-delay: -2.7s; } .js .kado:nth-child(5):not(.terbuka) .kotak { animation-delay: -.4s; }
  .js .kado:nth-child(6):not(.terbuka) .kotak { animation-delay: -2.2s; }
  .badan::after { animation: sapuSatin 5s ease-in-out infinite; } .kado:nth-child(even) .badan::after { animation-delay: 2.5s; }
  .terbuka .sinar { animation: putarSinar 14s linear infinite; }
  .gifts .bintik { animation: kerlipEmas 3.2s ease-in-out infinite alternate; }
  .terbuka .intip-x { animation: mo-ambang 2.4s ease-in-out infinite; }
}
@keyframes goyangKado { 0%, 70%, 100% { rotate: 0deg; } 76% { rotate: -5deg; } 82% { rotate: 4deg; } 88% { rotate: -3deg; } 94% { rotate: 2deg; } }
@keyframes getar { 0%, 100% { translate: 0 0; rotate: 0deg; } 25% { translate: -4px 0; rotate: -4deg; } 75% { translate: 4px 0; rotate: 4deg; } }
@keyframes lempar { 0% { transform: none; } 45% { transform: translate(0, -120%) rotate(-12deg); } 100% { transform: translate(-30%, -40%) rotate(-28deg); } }
@keyframes ciprat { from { opacity: 1; transform: translate(-50%, -50%) scale(.4); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--r)); } }
@keyframes kartuMuncul { from { opacity: 0; scale: .6; rotate: -6deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes polaroidMasuk { from { opacity: 0; translate: 0 40px; rotate: 10deg; } to { opacity: 1; translate: 0 0; rotate: -2deg; } }
@keyframes sapuSatin { 0%, 55% { transform: skewX(-18deg) translateX(0); } 100% { transform: skewX(-18deg) translateX(480%); } }
@keyframes putarSinar { to { rotate: 360deg; } }
@keyframes kerlipEmas { from { opacity: .25; } to { opacity: .65; } }

/* Video unggahan (field video): ditaruh sebelum galeri, bingkai mengikuti warna teks template (currentColor). */
.vk { width: min(100%, 440px); margin: 34px auto; padding: 0 20px; text-align: center; flex-direction: column; align-items: center; justify-content: center; }
.vk-layar { width: 100%; }
.vk-judul { margin: 0 0 12px; font-weight: 700; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.vk-layar { position: relative; margin: 0; padding: 10px; border-radius: 20px; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); background: color-mix(in srgb, currentColor 7%, transparent); box-shadow: 0 16px 34px rgba(0, 0, 0, .16); }
.vk-layar video { display: block; width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
.vk-layar figcaption { margin-top: 10px; font-size: 14px; font-style: italic; opacity: .75; }
