* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 12px;
}

.card {
  background: rgba(255, 255, 255, 0.93);
  padding: 35px 20px 30px 20px;
  border-radius: 24px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  text-align: center;
  max-width: 620px;
  width: 100%;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* Tombol Musik & Badge */
.music-btn {
  position: absolute;
  top: 15px; left: 18px;
  background: rgba(233, 30, 99, 0.15);
  color: #e91e63;
  border: 1px solid #e91e63;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.music-btn:hover {
  background: #e91e63;
  color: #fff;
  transform: scale(1.05);
}

.badge-age {
  position: absolute;
  top: 15px; right: 18px;
  background: #e91e63;
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.heart-icon {
  font-size: 38px;
  margin-top: 10px;
  animation: beat 1s infinite alternate;
}

@keyframes beat { to { transform: scale(1.2); } }

h1 {
  font-family: 'Dancing Script', cursive;
  color: #e91e63;
  font-size: 2.3rem;
  margin-top: 5px;
}

.subtitle {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

/* Galeri Portrait Atas (Foto 1, 2, 7) */
.portrait-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.photo-card {
  border-radius: 14px;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease;
  background: #fff;
}

.portrait-img {
  width: 110px; height: 155px;
  object-fit: cover; display: block;
}

.main-photo {
  border: 4px solid #ff80ab;
  z-index: 3;
  transform: scale(1.15);
}

.main-photo .portrait-img { width: 130px; height: 180px; }
.tilt-left { transform: rotate(-5deg) scale(0.95); }
.tilt-right { transform: rotate(5deg) scale(0.95); }

/* Grid Landscape Tengah (Foto 3, 4, 5, 6) */
.landscape-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff5e7e;
  letter-spacing: 1px;
  margin: 20px 0 10px 0;
  text-transform: uppercase;
}

.landscape-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.landscape-card {
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.landscape-img {
  width: 100%; height: 120px;
  object-fit: cover; display: block;
}

/* Pesan Teks & Tombol */
.message {
  background: #fff0f5;
  padding: 18px;
  border-radius: 14px;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  min-height: 110px;
  text-align: left;
}

button {
  background: linear-gradient(135deg, #e91e63, #ff4081);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

button:hover { transform: scale(1.05); }

.ai-note-main {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: #d81b60;
  margin-top: 18px;
  line-height: 1.4;
  padding: 0 10px;
}

/* ==========================================================
   GALERI FOTO 8 - 12
   1 baris, 5 foto kecil, gaya sama seperti galeri foto 1-2-7:
   foto tengah lebih besar + border pink, foto samping miring.
   Foto DIKUNCI di dalam kotaknya (position:absolute) supaya
   ukuran asli foto tidak bisa merusak tampilan.
   ========================================================== */
.extra-gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 420px;
  margin: 26px auto 6px auto;
  padding: 6px 0;
  overflow: hidden;
}

.extra-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  max-width: 78px;
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.14);
  background: #fff;
  transform: rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.extra-card:nth-child(1) { --rot: -6deg; --scale: 0.92; }
.extra-card:nth-child(2) { --rot: -3deg; --scale: 0.96; }
.extra-card:nth-child(3) { --rot: 0deg;  --scale: 1.15; border-color: #ff80ab; z-index: 3; max-width: 92px; }
.extra-card:nth-child(4) { --rot: 3deg;  --scale: 0.96; }
.extra-card:nth-child(5) { --rot: 6deg;  --scale: 0.92; }

.extra-card:hover {
  transform: rotate(0deg) scale(1.18);
  box-shadow: 0 8px 20px rgba(233, 30, 99, 0.35);
  z-index: 10;
}

.extra-card img,
.extra-card .extra-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}

/* ==========================================================
   TOMBOL SPESIAL + ANIMASI LUCU
   ========================================================== */
.btn-special {
  display: block;
  margin: 14px auto 0 auto;
  background: linear-gradient(135deg, #ff8fb1, #ff5c8d);
  box-shadow: 0 4px 12px rgba(255, 92, 141, 0.4);
  font-size: 0.95rem;
  padding: 10px 24px;
}

.btn-special.wiggle { animation: btnWiggle 0.7s ease; }

@keyframes btnWiggle {
  0%, 100% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-10deg) scale(1.12); }
  30% { transform: rotate(9deg) scale(1.12); }
  45% { transform: rotate(-7deg) scale(1.08); }
  60% { transform: rotate(6deg) scale(1.05); }
  80% { transform: rotate(-3deg) scale(1.02); }
}

.cute-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1200;
}

/* Emoji yang melayang naik */
.cute-float {
  position: absolute;
  bottom: -60px;
  line-height: 1;
  animation: cuteFloatUp var(--dur, 3s) ease-in forwards;
  will-change: transform, opacity;
}

@keyframes cuteFloatUp {
  0%   { transform: translate(0, 0) rotate(0) scale(0.5); opacity: 0; }
  12%  { opacity: 1; }
  50%  { transform: translate(calc(var(--drift) * 0.5), -55vh) rotate(calc(var(--rot) * 0.5)) scale(1.1); }
  100% { transform: translate(var(--drift), -115vh) rotate(var(--rot)) scale(1.3); opacity: 0; }
}

/* Maskot + balon ucapan di tengah layar */
.cute-pop {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  animation: cutePopIn 0.55s cubic-bezier(.3, 1.6, .5, 1) both;
}

.cute-pop.bye { animation: cutePopOut 0.4s ease-in forwards; }

.cute-mascot {
  font-size: 5.5rem;
  line-height: 1;
  display: inline-block;
  animation: cuteBounce 0.6s ease-in-out infinite alternate;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.2));
}

.cute-bubble {
  margin-top: 8px;
  background: #fff;
  color: #d81b60;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
  padding: 10px 20px;
  border-radius: 20px;
  border: 3px solid #ff80ab;
  box-shadow: 0 8px 20px rgba(233, 30, 99, 0.3);
  max-width: min(80vw, 320px);
}

.cute-bubble .ghost { visibility: hidden; }
.cute-bubble.typing .typed::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 1em;
  margin-left: 1px;
  border-right: 2px solid #ff80ab;
  vertical-align: -3px;
  animation: cuteCaret 0.5s steps(1) infinite;
}
@keyframes cuteCaret { 50% { opacity: 0; } }

@keyframes cutePopIn {
  from { transform: translate(-50%, -30%) scale(0.2) rotate(-20deg); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
}

@keyframes cutePopOut {
  to { transform: translate(-50%, -80%) scale(0.3); opacity: 0; }
}

@keyframes cuteBounce {
  from { transform: translateY(0) rotate(-8deg) scaleY(0.94); }
  to   { transform: translateY(-22px) rotate(8deg) scaleY(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .cute-float { animation-duration: 1.5s; }
  .cute-mascot { animation: none; }
}

/* ==========================================================
   AMPLOP PEMBUKA
   ========================================================== */
.env-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(40, 10, 25, 0.84);
  backdrop-filter: blur(6px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 20px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.env-overlay.leaving { opacity: 0; transform: scale(1.08); }

.env-hint {
  font-family: 'Caveat', cursive;
  font-size: 1.7rem;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  margin-top: 0;
}

.envelope {
  position: relative;
  width: min(320px, 84vw);
  aspect-ratio: 3 / 2;
  margin-top: 90px;
  perspective: 900px;
  animation: envFloat 2.2s ease-in-out infinite alternate;
}
.envelope.open { animation: none; }
@keyframes envFloat {
  from { transform: translateY(0) rotate(-1.5deg); }
  to   { transform: translateY(-8px) rotate(1.5deg); }
}

.env-back {
  position: absolute; inset: 0;
  background: #f4b6cf;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.env-letter {
  position: absolute;
  left: 7%; right: 7%;
  top: 12%; height: 80%;
  background-color: #fffdf8;
  background-image: linear-gradient(#f3cfdc 1px, transparent 1px);
  background-size: 100% 22px;
  border-radius: 4px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.9s cubic-bezier(.3, 1.15, .5, 1) 0.5s;
}
.envelope.open .env-letter { transform: translateY(-62%); }
.env-letter-text {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
  color: #d81b60;
  padding-top: 6px;
}

.env-front {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #ffc2d9, #ff9cc0);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  border-radius: 8px;
  z-index: 3;
}

.env-flap {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 54%;
  background: #ff80ab;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.6s ease, z-index 0s 0.3s;
  z-index: 4;
}
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 1; }

.env-seal {
  position: absolute;
  left: 50%; top: 54%;
  width: 60px; height: 60px;
  padding: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff5c8a, #d81b60);
  font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  transform: translate(-50%, -50%);
  animation: sealBeat 0.9s ease-in-out infinite alternate;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}
.env-seal:hover { transform: translate(-50%, -50%) scale(1.1); }
@keyframes sealBeat {
  from { transform: translate(-50%, -50%) scale(1); }
  to   { transform: translate(-50%, -50%) scale(1.14); }
}
.envelope.open .env-seal { animation: sealPop 0.5s ease-out forwards; pointer-events: none; }
@keyframes sealPop {
  to { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}

.env-skip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  box-shadow: none;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.8;
}

/* Tombol balas WhatsApp di halaman terakhir */
.reply-btn {
  display: block;
  margin: 14px auto 0 auto;
  background: linear-gradient(135deg, #e91e63, #ff6f91);
  padding: 9px 22px;
  font-size: 0.95rem;
  animation: replyPulse 1.4s ease-in-out infinite alternate;
}
@keyframes replyPulse {
  from { box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3); }
  to   { box-shadow: 0 4px 22px rgba(233, 30, 99, 0.65); }
}

/* ==========================================================
   TOMBOL "JANGAN DIKLIK" (KABUR-KABURAN) + HADIAH
   ========================================================== */
.dodge-zone {
  position: relative;
  height: 124px;
  margin: 10px auto 0 auto;
  width: 100%;
}
.btn-dodge {
  position: absolute;
  left: 0; top: 0;
  white-space: nowrap;
  background: linear-gradient(135deg, #f06292, #ad1457);
  box-shadow: 0 4px 12px rgba(173, 20, 87, 0.35);
  font-size: 0.9rem;
  padding: 10px 20px;
  touch-action: manipulation;
}
.btn-dodge:hover { transform: none; }

/* Balon chat tombol kabur */
.dodge-bubble {
  position: absolute;
  left: 0; top: 0;
  z-index: 3;
  pointer-events: none;
  white-space: nowrap;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  color: #ad1457;
  background: #fff;
  border: 2px solid #f48fb1;
  border-radius: 14px;
  padding: 2px 12px;
  box-shadow: 0 3px 8px rgba(233, 30, 99, 0.2);
  opacity: 0;
  transform: scale(0.6);
}
.dodge-bubble.show { opacity: 1; transform: scale(1); }
.dodge-bubble::after {
  content: "";
  position: absolute;
  left: var(--tail, 50%);
  margin-left: -7px;
  bottom: -9px;
  border: 7px solid transparent;
  border-top-color: #f48fb1;
}
.dodge-bubble.below::after {
  bottom: auto;
  top: -9px;
  border-top-color: transparent;
  border-bottom-color: #f48fb1;
}
.btn-dodge.tired {
  background: linear-gradient(135deg, #ffb199, #ff8a80);
  animation: dodgePant 0.5s ease-in-out infinite alternate;
}
@keyframes dodgePant {
  from { transform: scale(1) rotate(-2deg); }
  to   { transform: scale(1.06) rotate(2deg); }
}

.gift-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: rgba(40, 10, 25, 0.7);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.gift-card {
  background: #fff;
  border: 4px solid #ff80ab;
  border-radius: 24px;
  padding: 26px 24px 22px 24px;
  max-width: 380px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: giftPop 0.55s cubic-bezier(.3, 1.6, .5, 1) both;
}
.gift-emoji {
  font-size: 4.2rem;
  line-height: 1;
  display: inline-block;
  animation: giftJump 0.7s ease-in-out infinite alternate;
}
.gift-title {
  font-family: 'Dancing Script', cursive;
  font-size: 2.2rem;
  color: #e91e63;
  margin: 6px 0 4px 0;
}
.gift-text {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  line-height: 1.35;
  color: #444;
  margin-bottom: 16px;
}
.gift-end { display: block; margin-top: 8px; line-height: 1.3; }
.gift-line {
  display: block;
  margin-top: 8px;
  line-height: 1.3;
  font-size: 1.3rem;
  color: #d81b60;
  font-weight: 700;
}
.gift-from {
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  color: #e91e63;
  margin: -6px 0 14px 0;
}
@keyframes giftPop {
  from { transform: scale(0.3) rotate(-10deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes giftJump {
  from { transform: translateY(0) rotate(-8deg); }
  to   { transform: translateY(-14px) rotate(8deg); }
}

/* ==========================================================
   PESAN SUARA
   ========================================================== */
.voice-card {
  margin: 12px auto 0 auto;
  padding: 10px 12px 12px 12px;
  background: #fff0f5;
  border: 2px dashed #ff80ab;
  border-radius: 16px;
  text-align: center;
  transform: rotate(-1deg);
}
.voice-btn {
  background: linear-gradient(135deg, #f06292, #d81b60);
  font-size: 0.95rem;
  padding: 9px 20px;
}
.voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 22px;
  margin-top: 8px;
}
.voice-wave span {
  width: 5px;
  height: 6px;
  border-radius: 3px;
  background: #ec407a;
  opacity: 0.55;
}
.voice-wave.playing span { animation: voiceBar 0.8s ease-in-out infinite alternate; opacity: 1; }
.voice-wave.playing span:nth-child(2) { animation-delay: 0.15s; }
.voice-wave.playing span:nth-child(3) { animation-delay: 0.3s; }
.voice-wave.playing span:nth-child(4) { animation-delay: 0.45s; }
.voice-wave.playing span:nth-child(5) { animation-delay: 0.6s; }
@keyframes voiceBar {
  from { height: 5px; }
  to   { height: 22px; }
}
.voice-progress {
  height: 4px;
  margin-top: 6px;
  border-radius: 2px;
  background: #f8bbd0;
  overflow: hidden;
}
.voice-progress-bar { height: 100%; width: 0; background: #e91e63; transition: width 0.25s linear; }

/* ==========================================================
   HIASAN LATAR: HATI & BINTANG MELAYANG
   ========================================================== */
.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}
.amb {
  position: absolute;
  bottom: -50px;
  opacity: 0;
  animation: ambRise var(--dur, 22s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
}
@keyframes ambRise {
  0%   { transform: translate(0, 0) rotate(0); opacity: 0; }
  10%  { opacity: var(--op, 0.35); }
  90%  { opacity: var(--op, 0.35); }
  100% { transform: translate(var(--drift, 30px), -115vh) rotate(var(--rot, 40deg)); opacity: 0; }
}

/* ==========================================================
   ANIMASI MEMBALIK HALAMAN BUKU
   ========================================================== */
.flip-stage {
  position: absolute;
  inset: 0;
  z-index: 30;              /* di bawah cincin spiral (z-index 40) */
  display: grid;
  grid-template-columns: 1fr 1fr;
  perspective: 1800px;
  pointer-events: none;
}
.flip-half {
  position: relative;
  overflow: hidden;
  background: #fdfbf7;
}
.flip-half-left  { border-radius: 8px 0 0 8px; }
.flip-half-right { border-radius: 0 8px 8px 0; }
.flip-half .notebook-page,
.leaf-face .notebook-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.flip-leaf {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  z-index: 5;
  transform-style: preserve-3d;
  will-change: transform;
}
.flip-leaf.next {
  left: 50%;
  transform-origin: left center;
  animation: leafNext 0.95s cubic-bezier(.5, .05, .25, 1) forwards;
}
.flip-leaf.prev {
  left: 0;
  transform-origin: right center;
  animation: leafPrev 0.95s cubic-bezier(.5, .05, .25, 1) forwards;
}
.leaf-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #fdfbf7;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.leaf-back { transform: rotateY(180deg); }

/* bayangan lembut di permukaan lembar saat melengkung */
.leaf-face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  animation: leafShade 0.95s ease-in-out forwards;
}
.flip-leaf.next .leaf-front::after { background: linear-gradient(to left,  rgba(0,0,0,0), rgba(0,0,0,0.28)); }
.flip-leaf.next .leaf-back::after  { background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.28)); }
.flip-leaf.prev .leaf-front::after { background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.28)); }
.flip-leaf.prev .leaf-back::after  { background: linear-gradient(to left,  rgba(0,0,0,0), rgba(0,0,0,0.28)); }

@keyframes leafNext { from { transform: rotateY(0); }  to { transform: rotateY(-180deg); } }
@keyframes leafPrev { from { transform: rotateY(0); }  to { transform: rotateY(180deg); } }
@keyframes leafShade { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

/* HP / layar sempit: halaman bertumpuk, jadi pakai geser + pudar */
.book-spread.flip-next { animation: spreadOutNext 0.4s ease-in forwards; }
.book-spread.flip-prev { animation: spreadOutPrev 0.4s ease-in forwards; }
.book-spread.enter-next { animation: spreadInNext 0.45s ease-out both; }
.book-spread.enter-prev { animation: spreadInPrev 0.45s ease-out both; }
@keyframes spreadOutNext { to { opacity: 0; transform: translateX(-28px); } }
@keyframes spreadOutPrev { to { opacity: 0; transform: translateX(28px); } }
@keyframes spreadInNext  { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes spreadInPrev  { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* MODAL BUKU / SCRAPBOOK */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999;
  justify-content: center;
  align-items: center;
  padding: 10px;
  overflow-y: auto;
}

.notebook-wrapper {
  background: #d4a373;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  padding: 38px 15px 15px 15px;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: popIn 0.4s ease-out;
  perspective: 1200px;
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.close-btn {
  position: absolute;
  top: 8px; right: 12px;
  width: 36px; height: 36px;
  background: #e91e63;
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  border: 2px solid #fff;
}

.spiral-binder {
  position: absolute;
  left: 50%; top: 35px; bottom: 60px;
  transform: translateX(-50%);
  width: 24px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  pointer-events: none;
}

.ring-hole {
  width: 30px; height: 10px;
  background: linear-gradient(90deg, #111, #555, #111);
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.book-container-3d {
  position: relative;
  width: 100%;
  min-height: 380px;
}

.book-spread {
  display: none;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1);
  min-height: 380px;
  position: relative;
}

.book-spread.active { display: grid; }

.lined-paper {
  background-color: #fdfbf7;
  background-image: linear-gradient(#e5e5e5 1px, transparent 1px);
  background-size: 100% 28px;
  padding: 25px 18px 30px 18px;
  position: relative;
  text-align: left;
}

.left-page {
  border-right: 1px solid #ddd;
  box-shadow: inset -8px 0 12px -8px rgba(0, 0, 0, 0.15);
}

.right-page {
  box-shadow: inset 8px 0 12px -8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================
   VARIASI KERTAS SCRAPBOOK (tiap halaman beda-beda)
   ========================================================== */
.paper-grid {
  background-color: #fbfdff;
  background-image:
    linear-gradient(#cfe3f5 1px, transparent 1px),
    linear-gradient(90deg, #cfe3f5 1px, transparent 1px);
  background-size: 22px 22px;
}
.paper-dots {
  background-color: #fff5f8;
  background-image: radial-gradient(#f8bbd0 1.6px, transparent 1.9px);
  background-size: 18px 18px;
}
.paper-blue-dots {
  background-color: #f2f9ff;
  background-image: radial-gradient(#b9dcf5 1.6px, transparent 1.9px);
}
.paper-kraft {
  background-color: #f3e1c8;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.18) 0 2px, transparent 2px 7px);
}
.paper-mint {
  background-color: #effaf3;
  background-image: linear-gradient(#cdebd8 1px, transparent 1px);
  background-size: 100% 28px;
}
.paper-sky {
  background-color: #eef7ff;
  background-image: linear-gradient(#c9e2f6 1px, transparent 1px);
  background-size: 100% 28px;
}
.paper-yellow {
  background-color: #fffbe3;
  background-image: linear-gradient(#f3e3a0 1px, transparent 1px);
  background-size: 100% 28px;
}
.paper-cream { background-color: #fffdf8; }
.paper-confetti {
  background-color: #fffafc;
  background-image:
    radial-gradient(circle, #ff80ab 2px, transparent 3px),
    radial-gradient(circle, #81d4fa 2px, transparent 3px),
    radial-gradient(circle, #ffd54f 2px, transparent 3px);
  background-size: 60px 60px, 80px 80px, 100px 100px;
  background-position: 0 0, 25px 35px, 50px 10px;
}
.paper-hearts {
  background-color: #fff6f9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M22 34 C7 23 9 12 16 12 C19.5 12 22 14.5 22 17 C22 14.5 24.5 12 28 12 C35 12 37 23 22 34Z' fill='%23f8bbd0' fill-opacity='.55'/%3E%3C/svg%3E");
  background-size: 44px 44px;
}

/* Bingkai jahitan putus-putus di pinggir kertas */
.paper-frame::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed var(--frame, #f48fb1);
  border-radius: 10px;
  pointer-events: none;
  opacity: 0.8;
}

/* Tape washi */
.washi {
  position: absolute;
  width: 84px;
  height: 20px;
  z-index: 11;
  opacity: 0.92;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}
.washi-top { top: -6px; left: 50%; transform: translateX(-50%) rotate(-3deg); }
.washi-pink   { background: repeating-linear-gradient(45deg, #ffc1d9 0 6px, #ffe3ee 6px 12px); }
.washi-blue   { background: repeating-linear-gradient(45deg, #b9e3fb 0 6px, #e3f4fd 6px 12px); }
.washi-yellow { background: repeating-linear-gradient(45deg, #ffe9a0 0 6px, #fff6cf 6px 12px); }
.washi-green  { background: repeating-linear-gradient(45deg, #c4ecd0 0 6px, #e6f7ec 6px 12px); }

/* Hiasan kecil yang berkedip */
.mini {
  position: absolute;
  font-size: 0.95rem;
  z-index: 9;
  pointer-events: none;
  animation: miniTwinkle 2.2s ease-in-out infinite alternate;
}
@keyframes miniTwinkle {
  from { transform: scale(0.85) rotate(-8deg); opacity: 0.6; }
  to   { transform: scale(1.15) rotate(8deg);  opacity: 1; }
}

/* Karakter lucu + balon ucapan */
.has-char { padding-bottom: 105px; }
.char {
  position: absolute;
  bottom: 8px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.char-br { right: 10px; }
.char-bl { left: 10px; }
.char-emoji {
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.15));
  animation: charBob 1.8s ease-in-out infinite alternate;
}
.char-say {
  position: relative;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: #d81b60;
  background: #fff;
  border: 2px solid #ffb3cf;
  border-radius: 12px;
  padding: 1px 9px;
  margin-bottom: 7px;
  white-space: nowrap;
  transform: rotate(-3deg);
  box-shadow: 0 2px 5px rgba(233, 30, 99, 0.15);
}
.char-say::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: #ffb3cf;
}
@keyframes charBob {
  from { transform: translateY(0) rotate(-5deg); }
  to   { transform: translateY(-6px) rotate(5deg); }
}

/* Variasi judul chapter */
.heading-hand.h-blue   { color: #0277bd; border-bottom-color: #81d4fa; }
.heading-hand.h-green  { color: #2e7d32; border-bottom-color: #a5d6a7; }
.heading-hand.h-orange { color: #e65100; border-bottom-color: #ffcc80; }

/* Variasi teks: highlight, garis bergelombang, sticky note */
.hl-pink, .hl-yellow { padding: 0 4px; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl-pink   { background: linear-gradient(transparent 55%, #ffc9de 55%); }
.hl-yellow { background: linear-gradient(transparent 55%, #fff176 55%); }
.wavy { text-decoration: underline wavy #f06292; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }

.handwritten .sticky {
  position: relative;
  margin: 10px 2px;
  padding: 8px 12px;
  line-height: 26px;
  border-radius: 2px;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.16);
  transform: rotate(-1.2deg);
}
.handwritten .sticky:nth-of-type(even) { transform: rotate(1deg); }
.handwritten .sticky::before {
  content: "";
  position: absolute;
  top: -8px; left: 50%;
  width: 46px; height: 14px;
  margin-left: -23px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transform: rotate(-2deg);
}
.sticky-pink   { background: #ffd9e8; }
.sticky-blue   { background: #d3effd; }
.sticky-mint   { background: #d8f5e2; }
.sticky-yellow { background: #fff7a8; }

/* Bingkai video & foto polaroid */
.page-media.tilt-a { transform: rotate(-1.5deg); }
.page-media.polaroid {
  padding: 8px 8px 30px 8px;
  border: 1px solid #eee;
  border-radius: 4px;
  background: #fff;
}
.page-media.tilt-b { transform: rotate(2deg); }
.page-media.polaroid .page-photo { border-radius: 2px; max-height: 160px; }

.page-num {
  position: absolute;
  top: 8px; right: 12px;
  font-size: 0.75rem;
  color: #aaa;
  font-family: 'Poppins', sans-serif;
}

/* Stiker & Hiasan Notebook */
.sticker {
  position: absolute;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 10;
}

.tape-top-left {
  top: 8px; left: 10px;
  background: rgba(255, 182, 193, 0.7);
  padding: 2px 10px;
  font-size: 0.65rem;
  font-weight: bold;
  color: #d81b60;
  transform: rotate(-8deg);
  border-radius: 2px;
}

.tape-top-right {
  top: 8px; right: 10px;
  background: rgba(179, 229, 252, 0.8);
  padding: 2px 10px;
  font-size: 0.65rem;
  font-weight: bold;
  color: #0288d1;
  transform: rotate(6deg);
  border-radius: 2px;
}

.tape-bottom {
  bottom: 10px; right: 15px;
  background: rgba(255, 236, 179, 0.8);
  padding: 2px 10px;
  font-size: 0.65rem;
  font-weight: bold;
  color: #f57c00;
  transform: rotate(-4deg);
}

.heart-sticker { top: 12px; right: 15px; transform: rotate(12deg); }
.flower-sticker { bottom: 12px; right: 15px; font-size: 1.4rem; }
.star-sticker { top: 35px; left: 12px; transform: rotate(-15deg); }
.spark-sticker { bottom: 15px; left: 15px; }
.cat-sticker { top: 8px; right: 12px; font-size: 1.3rem; }
.love-badge { bottom: 10px; left: 12px; background: #ff80ab; color: #fff; padding: 2px 8px; font-size: 0.6rem; border-radius: 10px; font-weight: bold; }
.crown-sticker { top: 10px; right: 12px; }
.rainbow-sticker { top: 8px; right: 12px; }
.sun-sticker { bottom: 12px; left: 12px; }
.butterfly-sticker { top: 8px; right: 12px; }
.teddy-sticker { top: 8px; right: 12px; font-size: 1.3rem; }
.heart-sticker-2 { bottom: 12px; left: 12px; }
.party-sticker { top: 8px; right: 12px; }
.cake-sticker { bottom: 15px; left: 12px; font-size: 1.4rem; }
.seal-sticker { bottom: 10px; right: 12px; background: #e91e63; color: white; padding: 3px 8px; border-radius: 12px; font-size: 0.65rem; font-weight: bold; }

.handwritten {
  font-family: 'Caveat', cursive;
  font-size: 1.45rem;
  color: #2b2b2b;
  line-height: 28px;
}

.handwritten p { margin-bottom: 0; }

.heading-hand {
  font-family: 'Cinzel', 'Playfair Display', serif;
  font-weight: 700;
  color: #c2185b;
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 1px dashed #f48fb1;
  padding-bottom: 3px;
  margin-bottom: 8px !important;
  display: inline-block;
}

.center-text { text-align: center; }
.doodle-box { text-align: center; margin: 10px 0; }
.rose-doodle { font-size: 3rem; display: inline-block; }

.ghost-doodle {
  font-size: 3.5rem;
  display: inline-block;
  animation: float 2s infinite ease-in-out alternate;
}

@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

/* Halaman 11 (video) & 12 (foto 13) */
.page-media {
  margin-top: 10px;
  background: #fff;
  border: 4px solid #fff;
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.video-frame video {
  display: block;
  width: 100%;
  max-height: 260px;
  background: #000;
  object-fit: contain;
}

.photo-frame .page-photo {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.signature-box { margin-top: 10px; }
.sig-name { font-family: 'Dancing Script', cursive; font-size: 1.7rem; line-height: 1.3; color: #e91e63; }

.scrapbook-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  gap: 8px;
}

.scrapbook-nav button {
  background: linear-gradient(135deg, #e91e63, #ff4081);
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 15px;
}

.scrapbook-nav button:disabled {
  background: #b5838d;
  cursor: not-allowed;
  box-shadow: none;
}

.page-indicator {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Responsif Layar HP (Mobile) */
@media (max-width: 580px) {
  .extra-gallery {
    gap: 4px;
    max-width: 100%;
  }

  .extra-card {
    border-width: 2px;
    border-radius: 8px;
  }

  .notebook-wrapper {
    padding: 40px 10px 12px 10px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }

  .book-container-3d {
    min-height: unset;
    flex: 1;
    overflow-y: auto;
  }

  .book-spread {
    grid-template-columns: 1fr;
    position: relative;
    min-height: unset;
  }

  .lined-paper {
    padding: 22px 14px 20px 14px;
  }

  .left-page {
    border-right: none;
    border-bottom: 2px dashed #e0e0e0;
  }

  .handwritten {
    font-size: 1.3rem;
    line-height: 25px;
  }

  .spiral-binder {
    display: none;
  }

  .scrapbook-nav button {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .sticker {
    opacity: 0.65;
  }

  .has-char { padding-bottom: 95px; }
  .char-emoji { font-size: 2.3rem; }
  .char-say { font-size: 0.95rem; }
  .washi { width: 70px; }
}

/* ==========================================================
   TIUP LILIN & KOTAK DOA
   ========================================================== */


.fun-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1150; /* di bawah layer emoji melayang (1200) supaya emoji tampak di atas kartu */
  background: rgba(40, 10, 25, 0.72);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fun-overlay.open { display: flex; }

.fun-card {
  position: relative;
  background: #fff;
  border: 4px solid #ff80ab;
  border-radius: 24px;
  padding: 28px 20px 22px 20px;
  width: 100%;
  max-width: 380px;
  max-height: 94vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: giftPop 0.5s cubic-bezier(.3, 1.6, .5, 1) both;
}
.fun-hidden { display: none; }

.fun-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 34px;
  background: #fce4ec;
  color: #d81b60;
  box-shadow: none;
}
.fun-close:hover { transform: rotate(90deg) scale(1.08); }

.fun-title {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  line-height: 1.15;
  color: #e91e63;
  margin: 0 0 4px 0;
  padding: 0 22px;
  text-wrap: balance;
}
.fun-sub {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #555;
  margin-bottom: 10px;
}
.fun-count {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  color: #d81b60;
  margin-top: 6px;
}
.fun-hint {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  line-height: 1.3;
  color: #666;
  min-height: 2.6em;
  margin: 2px 0 8px 0;
}
.fun-mic {
  font-size: 0.95rem;
  padding: 10px 22px;
  background: linear-gradient(135deg, #ff8fb1, #ff5c8d);
}
.fun-mic.on {
  background: linear-gradient(135deg, #7e57c2, #5e35b1);
  animation: micPulse 1.2s ease-in-out infinite;
}
.fun-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.btn-ghost {
  background: #fff;
  color: #d81b60;
  border: 2px solid #ff80ab;
  box-shadow: none;
  padding: 10px 22px;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(126, 87, 194, 0.55); }
  50%      { box-shadow: 0 0 0 10px rgba(126, 87, 194, 0); }
}

/* ---------- KUE & LILIN ---------- */
.cake {
  display: flex;
  justify-content: center;
  height: 196px;
  margin-top: 4px;
}
.cake-stage {
  position: relative;
  flex: 0 0 300px;
  width: 300px;
  height: 196px;
}
.cake-plate {
  position: absolute;
  left: -8px;
  right: -8px;
  top: 158px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, #fff, #f8bbd0);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.18);
}
.cake-body {
  position: absolute;
  left: 0;
  right: 0;
  top: 80px;
  height: 88px;
  border-radius: 0 0 150px 150px / 0 0 24px 24px;
  background:
    radial-gradient(circle at 10% 58%, #fff59d 2.5px, transparent 3.5px),
    radial-gradient(circle at 24% 80%, #81d4fa 2.5px, transparent 3.5px),
    radial-gradient(circle at 38% 66%, #fff 2.5px, transparent 3.5px),
    radial-gradient(circle at 66% 74%, #b39ddb 2.5px, transparent 3.5px),
    radial-gradient(circle at 80% 60%, #fff59d 2.5px, transparent 3.5px),
    radial-gradient(circle at 92% 78%, #81d4fa 2.5px, transparent 3.5px),
    linear-gradient(180deg, #ff8fb1, #f06292);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cake-text {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-family: 'Dancing Script', cursive;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 0 rgba(173, 20, 87, 0.45);
}
.cake-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #fffafc, #ffd6e4);
  box-shadow: inset 0 -5px 0 #ffb3cc;
}
.cake-candles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.candle {
  position: absolute;
  width: 22px;
  height: 62px;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transform: translateX(-50%);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.candle:hover { transform: translateX(-50%) translateY(-2px); }
.candle.back  { top: 3px; }
.candle.front { top: 33px; }

.candle .stick {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 8px;
  height: 34px;
  margin-left: -4px;
  border-radius: 3px 3px 1px 1px;
  background: repeating-linear-gradient(135deg, #fff 0 4px, var(--c, #ff80ab) 4px 8px);
  box-shadow: inset -2px 0 0 rgba(0, 0, 0, 0.1);
}
.candle .wick {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 2px;
  height: 6px;
  margin-left: -1px;
  border-radius: 1px;
  background: #5d4037;
}
.candle .flame {
  position: absolute;
  left: 50%;
  bottom: 39px;
  width: 11px;
  height: 17px;
  margin-left: -5.5px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 72%, #fff8c4 0 25%, #ffd54f 55%, #ff9800 100%);
  box-shadow: 0 0 10px 3px rgba(255, 193, 7, 0.55);
  transform-origin: 50% 90%;
  animation: flameFlick 0.5s ease-in-out infinite alternate;
  animation-delay: var(--fd, 0s);
  transition: opacity 0.25s, transform 0.25s;
}
.candle.out .flame {
  opacity: 0;
  transform: scale(0.2) translateY(4px);
  animation: none;
  box-shadow: none;
}
.candle.out .wick { background: #212121; }
.cake.blowing .candle:not(.out) .flame {
  animation: flameBlow 0.16s ease-in-out infinite alternate;
}
.smoke {
  position: absolute;
  left: 50%;
  bottom: 44px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: rgba(150, 150, 150, 0.7);
  filter: blur(1.5px);
  pointer-events: none;
  animation: smokeUp 1s ease-out forwards;
}
@keyframes flameFlick {
  from { transform: scale(1, 1) rotate(-3deg); }
  to   { transform: scale(0.92, 1.1) rotate(3deg); }
}
@keyframes flameBlow {
  from { transform: skewX(18deg) scaleY(0.75) rotate(8deg); }
  to   { transform: skewX(34deg) scaleY(0.55) rotate(16deg); }
}
@keyframes smokeUp {
  from { opacity: 0.8; transform: translate(0, 0) scale(1); }
  to   { opacity: 0;   transform: translate(6px, -34px) scale(3); }
}

/* ---------- KOTAK DOA ---------- */
.doa-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
  padding: 4px 6px 8px 6px;
}
.doa-box {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 18px;
  font-size: 2.5rem;
  line-height: 1;
  color: inherit;
  background: var(--bg, #fce4ec);
  border: 3px solid var(--bd, #f48fb1);
  box-shadow: 0 5px 0 var(--bd, #f48fb1), 0 8px 14px rgba(0, 0, 0, 0.12);
  touch-action: manipulation;
  transition: transform 0.2s, opacity 0.35s;
}
.doa-box:hover { transform: translateY(-3px) rotate(-3deg); }
.doa-box:nth-child(1) { --bg: #fce4ec; --bd: #f48fb1; }
.doa-box:nth-child(2) { --bg: #fff3e0; --bd: #ffb74d; }
.doa-box:nth-child(3) { --bg: #ede7f6; --bd: #b39ddb; }
.doa-box:nth-child(4) { --bg: #e8f5e9; --bd: #81c784; }
.doa-box:nth-child(5) { --bg: #e1f5fe; --bd: #4fc3f7; }
.doa-box:nth-child(6) { --bg: #fffde7; --bd: #ffd54f; }
.doa-ico {
  display: inline-block;
  animation: boxBob 2.2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.18s);
}
.doa-num {
  position: absolute;
  top: 4px;
  left: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bd, #f48fb1);
}
.doa-box.opening { animation: boxShake 0.6s ease both; z-index: 2; }
.doa-box.fade {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}
.pop-in { animation: giftPop 0.5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes boxBob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-5px) rotate(4deg); }
}
@keyframes boxShake {
  0%   { transform: rotate(0) scale(1); }
  20%  { transform: rotate(-14deg) scale(1.1); }
  40%  { transform: rotate(14deg) scale(1.15); }
  60%  { transform: rotate(-10deg) scale(1.2); }
  80%  { transform: rotate(8deg) scale(1.28); }
  100% { transform: rotate(0) scale(1.35); opacity: 0.2; }
}

@media (max-width: 380px) {
  .cake { height: 173px; }
  .cake-stage { transform: scale(0.88); transform-origin: 50% 0; }
}
@media (max-width: 340px) {
  .cake { height: 153px; }
  .cake-stage { transform: scale(0.78); transform-origin: 50% 0; }
  .fun-card { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .doa-ico, .candle .flame, .fun-mic.on, .fun-card, .pop-in { animation: none !important; }
  .smoke { animation-duration: 0.01s; }
}


/* ==========================================================
   SERTIFIKAT RESMI 📜
   ========================================================== */
.cert-input {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 4px auto 14px auto;
  padding: 11px 14px;
  border: 2px solid #f48fb1;
  border-radius: 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  text-align: center;
  color: #444;
  background: #fff8fb;
  outline: none;
}
.cert-input:focus { border-color: #e91e63; box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15); }

.cert {
  position: relative;
  margin: 4px 0 8px 0;
  padding: 18px 16px 12px 16px;
  background: radial-gradient(circle at 50% 0%, #fffdf5, #fff2cf);
  border: 3px solid #c9a227;
  border-radius: 6px;
  outline: 2px solid #c9a227;
  outline-offset: -10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  color: #5d4037;
  text-align: center;
}
.cert p { margin: 0; }
.cert-org {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #8d6e00;
}
.cert-head {
  margin-top: 4px !important;
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #b8860b;
}
.cert-sub { font-size: 0.66rem; color: #8d6e63; margin-bottom: 8px !important; }
.cert-small { font-size: 0.72rem; color: #6d4c41; margin-top: 6px !important; }
.cert-name {
  margin-top: 2px !important;
  font-family: 'Dancing Script', cursive;
  font-size: 2.3rem;
  line-height: 1.15;
  color: #c2185b;
  word-break: break-word;
}
.cert-name.m { font-size: 1.9rem; }
.cert-name.s { font-size: 1.5rem; }
.cert-gelar {
  margin: 4px 6px 0 6px !important;
  font-family: 'Cinzel', serif;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: #ad1457;
}
.cert-note {
  margin-top: 8px !important;
  font-size: 0.64rem;
  font-style: italic;
  color: #8d6e63;
}
.cert-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 0 4px;
}
.cert-sign { display: flex; flex-direction: column; align-items: center; flex: 1; }
.cert-sig {
  font-family: 'Dancing Script', cursive;
  font-size: 1.35rem;
  line-height: 1.1;
  color: #283593;
  border-bottom: 1.5px solid #8d6e63;
  padding: 0 8px 1px 8px;
}
.cert-role { font-size: 0.58rem; margin-top: 3px; color: #6d4c41; }
.cert-stamp {
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  border: 3px double #c62828;
  border-radius: 50%;
  color: #c62828;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.5rem;
  letter-spacing: 0.05em;
  line-height: 1.15;
  opacity: 0.88;
  transform: rotate(-14deg);
}
.cert-stamp b { font-size: 1rem; line-height: 1; }
.cert-stamp.stamping { animation: stampThump 0.5s cubic-bezier(.3, 1.4, .5, 1) both; }
.cert-serial {
  margin-top: 10px !important;
  font-family: 'Courier New', monospace;
  font-size: 0.62rem;
  line-height: 1.4;
  color: #8d6e63;
}
@keyframes stampThump {
  0%   { transform: rotate(-30deg) scale(2.6); opacity: 0; }
  70%  { transform: rotate(-12deg) scale(0.92); opacity: 1; }
  100% { transform: rotate(-14deg) scale(1); opacity: 0.88; }
}
@media (prefers-reduced-motion: reduce) {
  .cert-stamp.stamping { animation: none !important; }
}


/* ==========================================================
   CABUT KELOPAK 🌼
   ========================================================== */
.flower {
  position: relative;
  width: 260px;
  max-width: 100%;
  height: 290px;
  margin: 4px auto 0 auto;
}
.flower-stem {
  position: absolute;
  left: 50%;
  top: 125px;
  width: 8px;
  height: 165px;
  margin-left: -4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #66bb6a, #43a047);
}
.flower-stem .leaf {
  position: absolute;
  top: 88px;
  width: 46px;
  height: 22px;
  background: linear-gradient(135deg, #81c784, #43a047);
}
.flower-stem .leaf.r { left: 6px;  border-radius: 0 100% 0 100%; transform: rotate(-22deg); }
.flower-stem .leaf.l { right: 6px; border-radius: 100% 0 100% 0; transform: rotate(22deg); }

.flower-petals {
  position: absolute;
  left: 50%;
  top: 125px;
  width: 0;
  height: 0;
}
.petal {
  --r: 64px;
  position: absolute;
  left: -22px;
  top: -42px;
  width: 44px;
  height: 84px;
  z-index: 2;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: linear-gradient(180deg, #fff, #ffe4ef);
  border: 2px solid #f8bbd0;
  box-shadow: inset 0 -8px 10px rgba(244, 143, 177, 0.28);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--a, 0deg)) translateY(calc(-1 * var(--r))) rotate(var(--sp, 0deg));
  transition: transform 0.9s cubic-bezier(.4, 0, .9, .6), opacity 0.9s ease-in;
}
.petal:hover { --r: 70px; transition-duration: 0.2s, 0.9s; }
.petal:focus-visible { outline: 3px solid #e91e63; outline-offset: 2px; }
.petal.gone { opacity: 0; pointer-events: none; }

.flower-center {
  position: absolute;
  left: 50%;
  top: 125px;
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid #ff8f00;
  background: radial-gradient(circle at 35% 30%, #fff59d, #ffca28 60%, #ffa000);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  font-size: 2rem;
  line-height: 1;
  user-select: none;
}
.flower-center.pop { animation: centerPop 0.45s ease; }
@keyframes centerPop {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.25) rotate(-8deg); }
  70%      { transform: scale(0.95) rotate(6deg); }
}

.petal-say {
  font-family: 'Caveat', cursive;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  color: #d81b60;
  min-height: 2.5em;
  margin-top: 8px;
}
.petal-say.bump { animation: sayBump 0.35s ease; }
@keyframes sayBump {
  0%   { transform: scale(0.85); opacity: 0.4; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.petal-result { margin-top: 6px; }
.petal-note {
  display: block;
  margin-top: 8px;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 400;
  color: #777;
}
@media (prefers-reduced-motion: reduce) {
  .flower-center.pop, .petal-say.bump { animation: none !important; }
  .petal { transition-duration: 0.01s !important; }
}


/* ==========================================================
   ARSIP AIB 🤫
   ========================================================== */
.fun-card.aib-wrap {
  max-width: 440px;
  background: #fff7e3;
  border-color: #d4a85c;
}
.aib-stamp {
  display: inline-block;
  margin: 0 0 8px 0;
  padding: 2px 12px;
  border: 3px double #c62828;
  border-radius: 6px;
  color: #c62828;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  transform: rotate(-5deg);
  opacity: 0.9;
}
.aib-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 14px;
  margin: 10px 0 6px 0;
  padding: 6px 4px 0 4px;
}
.aib-card {
  position: relative;
  padding: 8px 8px 10px 8px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
  transform: rotate(var(--rot, 0deg));
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s;
}
.aib-card:nth-child(1) { --rot: -2.5deg; }
.aib-card:nth-child(2) { --rot: 2deg; }
.aib-card:nth-child(3) { --rot: 1.5deg; }
.aib-card:nth-child(4) { --rot: -2deg; }
.aib-card:not(.open):hover { transform: rotate(0deg) scale(1.03); }
.aib-card:focus-visible { outline: 3px solid #e91e63; outline-offset: 3px; }
.aib-card::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 54px;
  height: 16px;
  margin-left: -27px;
  background: rgba(255, 224, 130, 0.85);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transform: rotate(-3deg);
  z-index: 3;
}
.aib-card.shake { animation: aibShake 0.5s ease; }

.aib-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 3px;
  background: #f3e5ec;
}
.aib-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: filter 0.6s ease, transform 0.6s ease;
}
.aib-card:not(.open) .aib-img {
  filter: blur(14px) grayscale(0.5) brightness(0.92);
  transform: scale(1.15);
}
.aib-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  color: #fff;
  background: rgba(60, 20, 40, 0.28);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  transition: opacity 0.35s;
}
.aib-cover span { font-size: 2.2rem; line-height: 1; }
.aib-cover b { font-family: 'Cinzel', serif; letter-spacing: 0.14em; font-size: 0.95rem; }
.aib-cover small { font-family: 'Poppins', sans-serif; font-size: 0.68rem; }
.aib-card.open .aib-cover { opacity: 0; pointer-events: none; }

.aib-frame.broken::after {
  content: "📷\A Fotonya lagi ngumpet 🙈";
  white-space: pre-line;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  line-height: 1.3;
  color: #ad1457;
  background: #fce4ec;
}
.aib-frame.broken .aib-img { display: none; }
.aib-frame.broken .aib-cover { background: rgba(60, 20, 40, 0.5); }

.aib-case {
  margin: 8px 0 0 0;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c62828;
}
.aib-cap {
  margin: 3px 0 0 0;
  font-family: 'Caveat', cursive;
  font-size: 1.12rem;
  line-height: 1.2;
  color: #444;
  min-height: 3.6em;
  opacity: 0;
  transition: opacity 0.5s 0.25s;
}
.aib-card.open .aib-cap { opacity: 1; }
.aib-meter {
  margin: 4px 0 0 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.62rem;
  line-height: 1.4;
  color: #8d6e63;
  opacity: 0;
  transition: opacity 0.5s 0.4s;
}
.aib-card.open .aib-meter { opacity: 1; }

.aib-final { margin-top: 10px; }
.aib-final-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.7rem;
  color: #e91e63;
  margin-bottom: 8px;
}
.aib-status {
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 700;
  color: #c62828;
  min-height: 2.6em;
  margin: 10px 0 8px 0;
}
.aib-final .fun-btns { margin-top: 4px; }

@keyframes aibShake {
  0%, 100% { transform: rotate(var(--rot, 0deg)) translateX(0); }
  20% { transform: rotate(calc(var(--rot, 0deg) - 3deg)) translateX(-5px); }
  40% { transform: rotate(calc(var(--rot, 0deg) + 3deg)) translateX(5px); }
  60% { transform: rotate(calc(var(--rot, 0deg) - 2deg)) translateX(-4px); }
  80% { transform: rotate(calc(var(--rot, 0deg) + 2deg)) translateX(4px); }
}
@media (max-width: 340px) {
  .aib-grid { gap: 14px 10px; }
  .aib-cap { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .aib-card.shake { animation: none !important; }
  .aib-img, .aib-cap, .aib-meter, .aib-cover { transition-duration: 0.01s !important; transition-delay: 0s !important; }
}


/* ==========================================================
   BIODATA PEMBUAT 🙋‍♂️
   ========================================================== */
.maker-btnrow { margin-top: 14px; }
.maker-btnrow .btn-special { margin: 0 auto; }

.fun-card.maker-card {
  max-width: 420px;
  background: #fffdf6;
  padding-top: 24px;
}
.maker-head {
  display: inline-block;
  margin: 0 0 6px 0;
  padding: 3px 12px;
  border-radius: 8px;
  background: #f06292;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transform: rotate(-1.5deg);
}
.maker-photo {
  position: relative;
  width: 210px;
  max-width: 70%;
  margin: 12px auto 4px auto;
  padding: 8px 8px 22px 8px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
  transform: rotate(-2deg);
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s;
}
.maker-photo:hover { transform: rotate(0deg) scale(1.02); }
.maker-photo:focus-visible { outline: 3px solid #e91e63; outline-offset: 4px; }
.maker-photo.flip { animation: makerFlip 0.45s ease; }
.maker-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 58px;
  height: 17px;
  margin-left: -29px;
  background: rgba(255, 224, 130, 0.88);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transform: rotate(3deg);
  z-index: 2;
}
.maker-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  background: #fce4ec;
}
.maker-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  pointer-events: none;
  -webkit-user-drag: none;
}
.maker-frame.broken::after {
  content: "📷\A Fotonya lagi ngumpet 🙈";
  white-space: pre-line;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #ad1457;
  background: #fce4ec;
}
.maker-frame.broken .maker-img { display: none; }

.maker-cap {
  min-height: 2.6em;
  margin: 10px 6px 0 6px;
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: #d81b60;
}
.maker-cap.bump { animation: sayBump 0.35s ease; }
.maker-tip {
  margin: 2px 0 8px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.68rem;
  color: #a1887f;
}
.maker-thumbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.maker-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid #f8bbd0;
  background: #fce4ec;
  box-shadow: none;
  overflow: hidden;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.2s, border-color 0.2s;
}
.maker-thumb:hover { transform: scale(1.1); }
.maker-thumb.active { border-color: #e91e63; transform: scale(1.12); box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.18); }
.maker-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
}
.maker-thumb.broken img { display: none; }

.maker-bio {
  list-style: none;
  margin: 4px 0 10px 0;
  padding: 0;
  text-align: left;
}
.maker-bio li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  padding: 7px 2px;
  border-bottom: 1.5px dotted #f48fb1;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #444;
  opacity: 0;
  transform: translateY(8px);
  animation: makerRow 0.4s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.09s + 0.15s);
}
.maker-bio li b {
  font-weight: 600;
  color: #d81b60;
}
.maker-sign {
  margin: 8px 0 0 0;
  font-family: 'Dancing Script', cursive;
  font-size: 1.7rem;
  color: #283593;
}
.maker-fine {
  margin-top: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.64rem;
  font-style: italic;
  color: #a1887f;
}
@keyframes makerRow {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes makerFlip {
  0%   { transform: rotate(-2deg) rotateY(0); }
  50%  { transform: rotate(-2deg) rotateY(90deg) scale(0.96); }
  100% { transform: rotate(-2deg) rotateY(0); }
}
@media (max-width: 340px) {
  .maker-bio li { grid-template-columns: 78px 1fr; font-size: 0.74rem; }
  .maker-thumb { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .maker-photo.flip, .maker-cap.bump { animation: none !important; }
  .maker-bio li { animation-duration: 0.01s !important; animation-delay: 0s !important; }
}


/* ---- biodata: slot video + panah ---- */
.maker-stage { position: relative; }
.maker-arrow {
  position: absolute;
  top: 38%;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  background: #fce4ec;
  color: #d81b60;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.maker-arrow.prev { left: 2px; }
.maker-arrow.next { right: 2px; }
.maker-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.maker-frame.is-video.broken::after { content: "🎬\A Videonya lagi ngumpet 🙈"; }
.maker-frame.broken .maker-vid { display: none !important; }
.maker-thumb.is-video { font-size: 1.3rem; }


/* ==========================================================
   KENANGAN MPLS 🏕️  (Gugus 13 · Purahsara)
   ========================================================== */
.fun-card.mpls-card {
  max-width: 440px;
  background: #fbf5e6;
  border-color: #9ccc65;
}
.mpls-badge {
  display: inline-block;
  margin: 0 0 8px 0;
  padding: 3px 14px;
  border-radius: 6px;
  background: #558b2f;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  box-shadow: 0 3px 0 #33691e;
  transform: rotate(-2deg);
}
.mpls-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin: 16px 0 6px 0;
}
.mpls-item {
  position: relative;
  width: 88%;
  max-width: 300px;
  padding: 9px 9px 14px 9px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
  transform: rotate(var(--rot, 0deg));
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s;
  animation: mplsIn 0.6s ease backwards;
  animation-delay: calc(var(--i, 0) * 0.18s + 0.1s);
}
.mpls-item:nth-child(1) { --rot: -2deg; }
.mpls-item:nth-child(2) { --rot: 1.8deg; }
.mpls-item:nth-child(3) { --rot: -1.2deg; }
.mpls-item:hover { transform: rotate(0deg) scale(1.02); }
.mpls-item:focus-visible, .mpls-secret-frame:focus-visible { outline: 3px solid #e91e63; outline-offset: 4px; }
.mpls-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 56px;
  height: 17px;
  margin-left: -28px;
  background: rgba(255, 224, 130, 0.88);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transform: rotate(-3deg);
  z-index: 2;
}
.mpls-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 3px;
  background: #fce4ec;
}
.mpls-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform 0.5s ease;
}
.mpls-frame.broken::after {
  content: "📷\A Fotonya lagi ngumpet 🙈";
  white-space: pre-line;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  line-height: 1.3;
  color: #ad1457;
  background: #fce4ec;
}
.mpls-frame.broken .mpls-img { display: none; }
.mpls-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 9px;
  border-radius: 3px;
  background: rgba(85, 139, 47, 0.92);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transform: rotate(-4deg);
}
.mpls-cap {
  margin: 10px 2px 0 2px;
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: #d81b60;
}
.mpls-hint {
  margin: 4px 0 0 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.64rem;
  color: #a1887f;
}
.mpls-note {
  display: block;
  margin: 8px 2px 0 2px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fff0f5;
  border: 1.5px dashed #f48fb1;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  line-height: 1.25;
  color: #555;
}
.mpls-item.open .mpls-hint { display: none; }
.mpls-done {
  margin: 18px 0 0 0;
  font-family: 'Caveat', cursive;
  font-size: 1.55rem;
  font-weight: 700;
  color: #e91e63;
}

.mpls-secret {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 2px dashed #bcaaa4;
}
.mpls-secret-head {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8d6e63;
  margin-bottom: 14px;
}
.mpls-secret-wrap {
  position: relative;
  width: 64%;
  max-width: 230px;
  margin: 0 auto;
}
.mpls-secret-frame {
  position: relative;
  padding: 8px 8px 12px 8px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
  transform: rotate(2deg);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mpls-secret-frame .mpls-img {
  --secret-blur: 20px;           /* makin besar = makin burem. 0px = fotonya apa adanya */
  filter: blur(var(--secret-blur));
  transform: scale(1.25);        /* sedikit diperbesar supaya tepi blur tidak bocor */
}
.mpls-secret-frame.shake { animation: mplsShake 0.45s ease; }
.mpls-q {
  position: absolute;
  z-index: 3;
  font-size: 1.6rem;
  line-height: 1;
  pointer-events: none;
  animation: mplsBob 1.8s ease-in-out infinite;
}
.mpls-q.q1 { top: -14px; left: -22px; }
.mpls-q.q2 { top: 28%; right: -26px; animation-delay: 0.5s; }
.mpls-q.q3 { bottom: 6px; left: -24px; animation-delay: 1s; }
.mpls-secret-q {
  margin-top: 14px;
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  color: #e91e63;
}
.mpls-secret-say {
  min-height: 2.7em;
  margin: 2px 6px 10px 6px;
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  line-height: 1.25;
  color: #555;
}

@keyframes mplsIn {
  from { opacity: 0; transform: translateY(22px) rotate(var(--rot, 0deg)); }
  to   { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)); }
}
@keyframes mplsShake {
  0%, 100% { transform: rotate(2deg) translateX(0); }
  20% { transform: rotate(-2deg) translateX(-6px); }
  40% { transform: rotate(5deg) translateX(6px); }
  60% { transform: rotate(-1deg) translateX(-4px); }
  80% { transform: rotate(4deg) translateX(4px); }
}
@keyframes mplsBob {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-6px) rotate(8deg); }
}
@media (max-width: 340px) {
  .mpls-item { width: 94%; }
  .mpls-cap { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mpls-item, .mpls-q, .mpls-secret-frame.shake { animation: none !important; }
}


/* ==========================================================
   KEJUTAN BUAT KAMU 🎁  +  PESAN TERAKHIR 💌
   ========================================================== */
.kejutan {
  margin-top: 22px;
  padding: 16px 12px 12px 12px;
  border: 2px dashed #f8bbd0;
  border-radius: 20px;
  background: rgba(255, 240, 245, 0.65);
}
.kejutan-title {
  font-family: 'Dancing Script', cursive;
  font-size: 1.9rem;
  line-height: 1.1;
  color: #e91e63;
}
.kejutan-sub {
  margin: 2px 0 14px 0;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  color: #666;
}
.kejutan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 12px;
}
@media (min-width: 560px) {
  .kejutan-grid { grid-template-columns: repeat(3, 1fr); }
}
.kejutan-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 96px;
  padding: 16px 8px 10px 8px;
  border-radius: 18px;
  background: var(--bg, #fce4ec);
  border: 3px solid var(--bd, #f48fb1);
  box-shadow: 0 5px 0 var(--bd, #f48fb1), 0 8px 12px rgba(0, 0, 0, 0.08);
  color: #444;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}
.kejutan-tile:hover { transform: translateY(-3px) rotate(-1.5deg); }
.kejutan-tile:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--bd, #f48fb1); }
.kejutan-tile:nth-child(1) { --bg: #fce4ec; --bd: #f48fb1; }
.kejutan-tile:nth-child(2) { --bg: #fff3e0; --bd: #ffb74d; }
.kejutan-tile:nth-child(3) { --bg: #fffde7; --bd: #ffd54f; }
.kejutan-tile:nth-child(4) { --bg: #e8f5e9; --bd: #81c784; }
.kejutan-tile:nth-child(5) { --bg: #e1f5fe; --bd: #4fc3f7; }
.kejutan-tile:nth-child(6) { --bg: #ede7f6; --bd: #b39ddb; }
.kejutan-tile:nth-child(7) { --bg: #f3e5f5; --bd: #ce93d8; }
.kejutan-tile:nth-child(8) { --bg: #fbe9e7; --bd: #ff8a65; }
.kj-ico { font-size: 2rem; line-height: 1; }
.kj-num, .kj-check {
  position: absolute;
  top: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 22px;
}
.kj-num { left: 8px; background: var(--bd, #f48fb1); }
.kj-check {
  right: 8px;
  background: #43a047;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s, transform 0.3s cubic-bezier(.3, 1.8, .5, 1);
}
.kejutan-tile.done .kj-check { opacity: 1; transform: scale(1); }

.kejutan-final {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.3;
}
.kejutan-final.locked {
  background: #f3e7ec;
  color: #a98a98;
  border: 2px dashed #d7b8c6;
  box-shadow: none;
}
.kejutan-final.locked:hover { transform: none; }
.kejutan-final.unlocked { animation: finalPulse 1.6s ease-in-out infinite; }
.kejutan-final.shake { animation: finalShake 0.4s ease; }
.kejutan-progress {
  min-height: 1.5em;
  margin-top: 8px;
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  line-height: 1.25;
  color: #d81b60;
}
.bonus { margin-top: 22px; }
.bonus-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8d6e63;
}
@keyframes finalPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3); }
  50%      { transform: scale(1.03); box-shadow: 0 6px 20px rgba(233, 30, 99, 0.55); }
}
@keyframes finalShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* ---- pesan terakhir ---- */
.fun-card.finale-card {
  max-width: 400px;
  background: #fffafc;
  padding-top: 24px;
}
.finale-heart {
  font-size: 3rem;
  line-height: 1;
  display: inline-block;
  animation: giftJump 0.9s ease-in-out infinite alternate;
}
.finale-body { margin: 6px 0 10px 0; text-align: center; }
.finale-body p {
  margin: 0 0 10px 0;
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  line-height: 1.35;
  color: #444;
  opacity: 0;
  animation: finaleIn 0.8s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.9s + 0.3s);
}
.finale-body .finale-big { font-size: 1.7rem; font-weight: 700; color: #e91e63; }
.finale-body .finale-sign { font-family: 'Dancing Script', cursive; font-size: 1.8rem; color: #283593; margin-top: 4px; }
.finale-body .finale-ps { font-size: 1.15rem; color: #888; }
.finale-btns {
  opacity: 0;
  animation: finaleIn 0.8s ease forwards;
  animation-delay: 6s;
}
@keyframes finaleIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .kejutan-final.unlocked, .kejutan-final.shake, .finale-heart { animation: none !important; }
  .finale-body p, .finale-btns { animation-duration: 0.01s !important; animation-delay: 0s !important; }
}


/* ========== Voucher maaf ========== */
.fun-card.vm-card { max-width: 440px; }
.vm-list { display: flex; flex-direction: column; gap: 14px; margin: 14px 0 6px 0; }
.vm-ticket {
  position: relative;
  text-align: left;
  padding: 12px 14px 46px 18px;
  border-radius: 14px;
  background: #fffdf7;
  border: 2px dashed #ffab91;
  border-left: 8px solid #ff8a65;
  box-shadow: 0 3px 10px rgba(255, 138, 101, 0.18);
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  animation: popIn 0.4s ease both;
  animation-delay: calc(var(--i, 0) * 0.08s);
  transition: transform 0.2s ease;
}
.vm-ticket:nth-child(even) { border-left-color: #f48fb1; border-color: #f8bbd0; }
.vm-ticket:hover { transform: translateY(-2px); }
.vm-ticket:focus-visible { outline: 3px solid #e91e63; outline-offset: 3px; }
.vm-no { font-family: 'Poppins', sans-serif; font-size: 0.62rem; letter-spacing: 0.12em; color: #a1887f; }
.vm-title { margin: 2px 0 0 0; font-family: 'Caveat', cursive; font-size: 1.45rem; font-weight: 700; line-height: 1.15; color: #d84315; padding-right: 8px; }
.vm-desc { margin: 4px 0 0 0; font-family: 'Poppins', sans-serif; font-size: 0.78rem; line-height: 1.45; color: #6d4c41; }
.vm-ticket::after {
  content: "ketuk buat stempel 👆";
  position: absolute; left: 18px; bottom: 14px;
  font-family: 'Poppins', sans-serif; font-size: 0.62rem; color: #bcaaa4;
}
.vm-ticket.stamped::after { content: ""; display: none; }
.vm-stamp {
  position: absolute; right: 10px; bottom: 10px;
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border: 3px double #2e7d32; border-radius: 8px;
  color: #2e7d32; background: rgba(255, 255, 255, 0.55);
  font-family: 'Cinzel', serif; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
  transform: rotate(-9deg) scale(2.4);
  opacity: 0; pointer-events: none;
}
.vm-ticket.stamped .vm-stamp { animation: vmStamp 0.45s cubic-bezier(.2,.9,.3,1.2) forwards; }
@keyframes vmStamp {
  0% { opacity: 0; transform: rotate(-9deg) scale(2.4); }
  70% { opacity: 1; transform: rotate(-9deg) scale(0.92); }
  100% { opacity: 0.92; transform: rotate(-9deg) scale(1); }
}
.vm-note { margin: 10px 0 0 0; font-family: 'Caveat', cursive; font-size: 1.4rem; font-weight: 700; color: #e91e63; }
.vm-foot { margin: 8px 0 12px 0; font-family: 'Poppins', sans-serif; font-size: 0.7rem; color: #a1887f; }
@media (max-width: 380px) {
  .vm-title { font-size: 1.3rem; }
  .vm-stamp { font-size: 0.7rem; padding: 3px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .vm-ticket, .vm-ticket.stamped .vm-stamp { animation: none !important; }
  .vm-ticket.stamped .vm-stamp { opacity: 0.92; transform: rotate(-9deg) scale(1); }
}


/* ========== Gacha semangat ========== */
.fun-card.gacha-card { max-width: 420px; }
.gacha-machine {
  position: relative; margin: 34px auto 8px auto; width: 150px; height: 150px;
  border-radius: 28px; background: linear-gradient(160deg, #f3e5f5, #fce4ec);
  border: 3px solid #ce93d8; box-shadow: 0 6px 16px rgba(171, 71, 188, 0.2);
  display: flex; align-items: center; justify-content: center;
}
.gacha-top { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 2.6rem; }
.gacha-capsule { font-size: 3.4rem; line-height: 1; margin-top: 14px; }
.gacha-capsule.spinning { animation: gachaShake 0.28s linear infinite; }
.gacha-capsule.pop { animation: gachaPop 0.5s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes gachaShake {
  0% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-6px,3px) rotate(-12deg); }
  50% { transform: translate(5px,-3px) rotate(10deg); } 75% { transform: translate(-4px,-2px) rotate(-8deg); }
  100% { transform: translate(0,0) rotate(0); }
}
@keyframes gachaPop { 0% { transform: scale(0.3); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.gacha-result {
  margin: 10px 0 6px 0; padding: 12px 14px; border-radius: 16px;
  background: #fff; border: 2px solid #e0e0e0;
}
.gacha-rar {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-family: 'Poppins', sans-serif; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  background: #eeeeee; color: #616161;
}
.gacha-text { margin: 8px 0 0 0; font-family: 'Caveat', cursive; font-size: 1.5rem; font-weight: 700; line-height: 1.25; color: #555; }
.gacha-result[data-rar="R"] { border-color: #81c784; } .gacha-result[data-rar="R"] .gacha-rar { background: #c8e6c9; color: #2e7d32; }
.gacha-result[data-rar="SR"] { border-color: #64b5f6; } .gacha-result[data-rar="SR"] .gacha-rar { background: #bbdefb; color: #1565c0; }
.gacha-result[data-rar="SSR"] { border-color: #ffb300; background: #fffde7; } .gacha-result[data-rar="SSR"] .gacha-rar { background: #ffe082; color: #e65100; }
.gacha-result[data-rar="UR"] { border-color: #ec407a; background: linear-gradient(135deg, #fff0f5, #f3e5f5); box-shadow: 0 0 18px rgba(236, 64, 122, 0.35); }
.gacha-result[data-rar="UR"] .gacha-rar { background: linear-gradient(90deg, #f06292, #ba68c8); color: #fff; }
.gacha-result[data-rar="UR"] .gacha-text { color: #c2185b; }
.gacha-count { margin: 8px 0 0 0; font-family: 'Poppins', sans-serif; font-size: 0.7rem; color: #a1887f; }
#gacha-btn:disabled { opacity: 0.6; cursor: default; }
@media (prefers-reduced-motion: reduce) {
  .gacha-capsule.spinning, .gacha-capsule.pop { animation: none !important; }
}