/* ===== Palet diambil dari foto: hijab berry, kebaya rose, selempang maroon, sash peach, dinding roster oranye ===== */
:root {
  --heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 58'%3E%3Cpath d='M32 55C10 41 3 29 3 19 3 9.5 10 3 18.5 3c6 0 10.8 3 13.5 8 2.7-5 7.5-8 13.5-8C54 3 61 9.5 61 19c0 10-7 22-29 36z'/%3E%3C/svg%3E");
  --cream: #fbf4ec;
  --paper: #fffaf3;
  --ink: #3b1f27;
  --ink-soft: #7a5a62;
  --berry: #a3305d;
  --rose: #e9b7c3;
  --rose-d: #d48ea2;
  --maroon: #6e1630;
  --peach: #f7c9a0;
  --clay: #e2793f;
  --gold: #d9a441;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.locked, html.locked body, html.noscroll, html.noscroll body { overflow: hidden; }
body {
  margin: 0;
  background-color: var(--cream);
  background-image: radial-gradient(rgba(212, 142, 162, .2) 1.6px, transparent 1.8px);
  background-size: 28px 28px;
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; }
button { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; border-radius: 6px; }
.hand { font-family: var(--hand); }

#fx {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 60;
}

/* ===== Tombol suara ===== */
.sound-btn {
  position: fixed; top: 14px; right: 14px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--maroon); background: var(--paper); color: var(--maroon);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 3px 0 var(--maroon);
  transition: transform .15s, box-shadow .15s;
}
.sound-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--maroon); }
.sound-btn svg { width: 22px; height: 22px; }
.sound-btn .ic-off, .sound-btn.muted .ic-on { display: none; }
.sound-btn.muted .ic-off { display: block; }

/* ===== Roster (motif dinding oranye di foto) ===== */
.roster-band, .roster-strip {
  background: url("roster.svg") 0 0 / 60px 60px repeat;
}

/* ===================== COVER ===================== */
.cover {
  position: fixed; inset: 0; z-index: 50;
  background: var(--cream);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: opacity .6s ease, transform .6s ease, visibility 0s linear .6s;
}
.cover[hidden] { display: none; }
.cover.leaving { opacity: 0; transform: translateY(-18px); visibility: hidden; pointer-events: none; }
.roster-band { height: 58px; flex: none; }
.roster-band.top { mask: linear-gradient(#000 40%, transparent); -webkit-mask: linear-gradient(#000 40%, transparent); }
.roster-band.bottom { mask: linear-gradient(transparent, #000 60%); -webkit-mask: linear-gradient(transparent, #000 60%); }

.cover-inner {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 20px; text-align: center;
}
.cover-kicker {
  margin: 0; font-size: 1.55rem; color: var(--ink-soft);
  animation: fadeUp .7s ease both .1s;
}
.cover-name {
  margin: 2px 0 88px;
  font: 700 clamp(1.9rem, 8vw, 2.8rem)/1.1 var(--serif);
  color: var(--maroon);
  animation: fadeUp .7s ease both .25s;
}
.cover-name span { color: var(--berry); }

.envelope {
  position: relative;
  width: min(76vw, 330px);
  aspect-ratio: 3 / 2;
  padding: 0; border: 0; background: none; cursor: pointer;
  perspective: 900px;
  animation: popIn .8s var(--bounce) both .4s, wobble 3.4s ease-in-out 1.6s infinite;
}
.envelope > span { position: absolute; display: block; }
.env-back { inset: 0; background: var(--rose-d); border-radius: 10px; box-shadow: 0 18px 30px -14px rgba(110, 22, 48, .55); }
.env-letter {
  left: 7%; right: 7%; top: 6%; height: 86%;
  z-index: 2;
  background: var(--paper);
  border-radius: 6px;
  padding-top: 8%;
  display: flex !important; flex-direction: column; align-items: center;
  color: var(--maroon);
  transition: transform .75s var(--bounce) .4s;
}
.env-letter .hand { font-size: 1.35rem; line-height: 1; color: var(--berry); }
.env-letter b { font: 700 1.55rem/1.1 var(--serif); }
.env-letter .env-heart { position: static; width: 22px; height: 20px; margin-top: 6px; background: var(--berry); -webkit-mask: var(--heart) center / contain no-repeat; mask: var(--heart) center / contain no-repeat; }
.env-front {
  inset: 0; z-index: 3;
  background: var(--rose);
  border-radius: 10px;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  left: 0; right: 0; top: 0; height: 60%;
  z-index: 4;
  background: #dfa0b2;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  transition: transform .5s ease-in, z-index 0s linear .25s;
}
.env-seal {
  left: 50%; top: 60%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  z-index: 5;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--berry), var(--maroon) 72%);
  color: #f3d08b;
  font: italic 700 1.6rem/54px var(--serif);
  box-shadow: 0 3px 0 #4a0c1f, inset 0 0 0 4px rgba(255, 255, 255, .08);
  transition: transform .35s ease, opacity .35s ease;
}
.opening .envelope { animation: none; }
.opening .env-seal { transform: scale(1.5) rotate(25deg); opacity: 0; }
.opening .env-flap { transform: rotateX(180deg); z-index: 1; }
.opening .env-letter { transform: translateY(-64%); }

.cover-hint {
  margin: 30px 0 0;
  display: inline-flex; align-items: center; gap: 6px;
  font: 800 .95rem var(--sans); letter-spacing: .02em; color: var(--berry);
  animation: fadeUp .6s ease both 1s;
}
.cover-hint svg { width: 20px; height: 20px; animation: nudge 1.2s ease-in-out infinite; }
.opening .cover-hint, .opening .cover-kicker, .opening .cover-name { animation: fadeOutUp .35s ease forwards; }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  max-width: 1060px; margin: 0 auto;
  padding: 76px 20px 90px;
  display: grid; align-content: center; justify-items: center;
  gap: 18px;
  text-align: center;
}
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.1fr .9fr; align-items: center; text-align: left; justify-items: start; gap: 40px; }
  .hero-pic { justify-self: center; }
}
.hero-kicker { margin: 0; font-size: clamp(1.8rem, 6vw, 2.4rem); color: var(--berry); line-height: 1; }
.hero-name {
  margin: 4px 0 0;
  font: 700 clamp(3.4rem, 16vw, 6.6rem)/.95 var(--serif);
  color: var(--maroon);
  letter-spacing: -.01em;
}
.hero-name .l { display: inline-block; }
.hero-sub {
  margin: 6px 0 0;
  font: 600 clamp(1.6rem, 6.5vw, 2.4rem)/1.2 var(--serif);
  color: var(--ink);
}
.stamp {
  display: inline-block;
  margin-left: 10px; padding: 0 10px;
  font: 800 .62em/1.5 var(--sans); letter-spacing: .06em;
  color: var(--berry);
  border: 3px solid currentColor; border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--cream), inset 0 0 0 4px currentColor;
  transform: rotate(-10deg);
  vertical-align: .12em;
}
.hero-meta {
  margin: 16px 0 0;
  font-size: .98rem; line-height: 1.55; color: var(--ink-soft);
}
.hero-meta b { color: var(--maroon); }

.hero-pic { position: relative; width: min(76vw, 400px); }
.sway { transform-origin: 50% 0; }
.tap-note { margin: 10px 0 0; text-align: center; font-size: 1.2rem; color: var(--ink-soft); }

.scroll-hint {
  position: absolute; left: 0; right: 0; bottom: 18px;
  display: flex; flex-direction: column; align-items: center;
  font: 800 .78rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}
.scroll-hint svg { width: 22px; height: 22px; }

/* Hero: diam sebelum amplop dibuka, lalu main */
.hero:not(.go) .l, .hero:not(.go) .a-fade, .hero:not(.go) .a-up, .hero:not(.go) .a-pop, .hero:not(.go) .stamp { opacity: 0; }
.hero.go .l { animation: letterDrop .8s var(--bounce) both; animation-delay: calc(var(--i) * 70ms + 250ms); }
.hero.go .hero-kicker { animation: fadeUp .6s ease both .05s; }
.hero.go .hero-sub { animation: fadeUp .6s ease both .85s; }
.hero.go .stamp { animation: stampIn .45s cubic-bezier(.2, .8, .3, 1.2) both 1.35s; }
.hero.go .a-up { animation: fadeUp .7s ease both 1.6s; }
.hero.go .a-pop { animation: polaroidIn .9s var(--bounce) both .45s; }
.hero.go .sway { animation: sway 4.5s ease-in-out 1.5s infinite; }
.hero.go .scroll-hint svg { animation: nudge 1.3s ease-in-out 2.2s infinite; }
.hero.shake { animation: shake .35s ease; }

/* ===================== POLAROID ===================== */
.polaroid {
  position: relative; display: block; width: 100%;
  margin: 0; padding: 10px 10px 0; border: 0;
  background: #fffdf9;
  cursor: pointer; text-align: center;
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 1px 2px rgba(59, 31, 39, .12), 0 16px 30px -14px rgba(59, 31, 39, .45);
  transition: transform .35s var(--bounce);
}
.polaroid img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4 / 5; object-fit: cover; object-position: var(--pos, 50% 35%);
  background: #eadfd6;
}
.polaroid .cap {
  display: block;
  padding: 8px 4px 12px;
  font-size: clamp(1.1rem, 4vw, 1.4rem); line-height: 1.15;
  color: var(--ink);
}
.tape::before {
  content: ""; position: absolute; z-index: 2;
  top: -13px; left: 50%; width: 92px; height: 26px; margin-left: -46px;
  background: repeating-linear-gradient(45deg, rgba(247, 201, 160, .85) 0 8px, rgba(240, 186, 140, .85) 8px 16px);
  transform: rotate(-4deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.tap-love:active { transform: rotate(var(--r, 0deg)) scale(.97); }

/* ===================== SECTIONS ===================== */
.roster-strip { height: 34px; opacity: .9; }
.sec {
  max-width: 1060px; margin: 0 auto;
  padding: 80px 20px;
  text-align: center;
}
.sec-title {
  margin: 0;
  font: 700 clamp(2.1rem, 8vw, 3.2rem)/1.08 var(--serif);
  color: var(--ink);
}
.sec-title em {
  font-style: italic; color: var(--berry);
  padding-bottom: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 7c9-6 13 4 22 0s13-6 22 0 13 4 22 0 13-6 22 0 13 4 22 0' fill='none' stroke='%23f2b78a' stroke-width='3.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 100% / 100% 12px no-repeat;
}
.sec-text { margin: 12px auto 0; max-width: 34ch; color: var(--ink-soft); }
.sec-text.hand { font-size: 1.35rem; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* --- Lempar toga --- */
.toss { background: radial-gradient(60% 60% at 50% 62%, rgba(233, 183, 195, .45), transparent 70%); }
.cap-btn {
  position: relative;
  width: 150px; height: 150px; margin: 34px auto 0;
  display: grid; place-items: center;
  border-radius: 50%; border: 0;
  background: var(--paper);
  cursor: pointer;
  box-shadow: 0 6px 0 var(--rose-d), 0 18px 30px -12px rgba(110, 22, 48, .45);
}
.cap-btn::after {
  content: ""; position: absolute; inset: -10px;
  border-radius: 50%; border: 2px dashed var(--rose-d);
  animation: spin 14s linear infinite;
}
.cap-btn .toga { width: 104px; transform: translateY(-2px); }
.cap-btn:active { box-shadow: 0 2px 0 var(--rose-d), 0 10px 20px -12px rgba(110, 22, 48, .45); }
.toss-count { margin: 26px 0 0; font-size: 1.5rem; color: var(--maroon); min-height: 1.6em; }
.toss-count.bump { animation: bump .35s var(--bounce); }

/* --- Album --- */
.grid {
  margin: 40px auto 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 16px;
  max-width: 900px;
}
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 34px; } }
.pol { opacity: 0; transform-origin: 50% 0; }
.pol.in { animation: swingIn 1s var(--bounce) both; animation-delay: var(--d, 0ms); }
.pol .polaroid { transform: rotate(var(--r)); }
@media (hover: hover) {
  .pol .polaroid:hover { transform: rotate(0deg) scale(1.04); }
}

/* --- Surat --- */
.paper {
  position: relative;
  max-width: 560px; margin: 64px auto 0;
  padding: 50px 26px 30px 48px;
  text-align: left;
  background:
    linear-gradient(90deg, transparent 32px, rgba(163, 48, 93, .35) 32px 34px, transparent 34px),
    repeating-linear-gradient(var(--paper) 0 31px, rgba(122, 90, 98, .16) 31px 32px),
    var(--paper);
  background-position: 0 0, 0 44px, 0 0;
  box-shadow: 0 2px 3px rgba(59, 31, 39, .08), 0 22px 40px -20px rgba(59, 31, 39, .4);
  rotate: -.8deg;
  font-size: 1.02rem; line-height: 32px;
}
.paper p { margin: 0; text-indent: 1.4em; }
.paper .greet, .paper .sign { text-indent: 0; }
.paper .greet { font-size: 1.9rem; color: var(--maroon); }
.paper .sign { font-size: 1.8rem; color: var(--berry); text-align: right; margin-top: 32px; }
.line { opacity: 0; transform: translateX(-10px); transition: opacity .6s ease, transform .6s ease; }
.line.in { opacity: 1; transform: none; }

/* --- Kartu gosok --- */
.scratch {
  position: relative;
  width: min(100%, 400px); height: 230px;
  margin: 34px auto 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 0 var(--rose-d), 0 20px 34px -16px rgba(110, 22, 48, .5);
}
.scratch-under {
  position: absolute; inset: 0;
  padding: 20px 24px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  background: var(--paper);
}
.scratch-under p { margin: 0; font-size: 1.45rem; line-height: 1.25; color: var(--maroon); }
.scratch-under span { font: 800 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--berry); }
#scratchCv {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: grab;
  transition: opacity .6s ease;
}
.scratch.done #scratchCv { opacity: 0; pointer-events: none; }
.link-btn {
  margin-top: 18px; padding: 8px 10px;
  background: none; border: 0; cursor: pointer;
  font: 600 .92rem var(--sans); color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 3px;
}
.scratch.done + .link-btn { visibility: hidden; }

/* --- Penutup --- */
.finale { padding-bottom: 60px; }
.finale-pic { width: min(70vw, 340px); margin: 10px auto 46px; }
.actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.btn {
  min-width: 150px; padding: 14px 24px;
  border: 2px solid var(--maroon); border-radius: 999px;
  background: var(--maroon); color: var(--cream);
  font: 800 1rem var(--sans); letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 4px 0 #3e0a1a;
  transition: transform .12s, box-shadow .12s;
}
.btn.alt { background: var(--paper); color: var(--maroon); box-shadow: 0 4px 0 var(--maroon); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #3e0a1a; }
.btn.alt:active { box-shadow: 0 1px 0 var(--maroon); }
.foot { margin: 56px 0 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.foot p { margin: 0; font: 600 .85rem var(--sans); color: var(--ink-soft); letter-spacing: .03em; }
.toga.mini { width: 56px; animation: bob 2.8s ease-in-out infinite; }

/* ===================== LIGHTBOX ===================== */
.lb {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 12px 70px;
  background: rgba(43, 20, 28, .9);
  opacity: 0; transition: opacity .25s ease;
  touch-action: none;
}
.lb[hidden] { display: none; }
.lb.show { opacity: 1; }
.lb-fig {
  margin: 0; max-width: min(100%, 560px); max-height: 100%;
  display: flex; flex-direction: column; align-items: center;
  background: #fffdf9; padding: 10px 10px 0;
  transform: scale(.92) rotate(-2deg); transition: transform .35s var(--bounce);
}
.lb.show .lb-fig { transform: none; }
.lb-fig img {
  display: block; max-width: 100%;
  max-height: calc(100vh - 210px); max-height: calc(100svh - 210px);
  width: auto; height: auto; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
}
.lb-fig figcaption { padding: 8px 6px 12px; font-size: 1.5rem; line-height: 1.15; color: var(--ink); text-align: center; }
.lb-close, .lb-nav {
  position: absolute; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: rgba(255, 250, 243, .14); color: #fff;
  cursor: pointer;
}
.lb-close svg, .lb-nav svg { width: 24px; height: 24px; }
.lb-close { top: 12px; right: 12px; }
.lb-nav { top: 50%; margin-top: -23px; }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
@media (max-width: 640px) {
  .lb-nav { top: auto; bottom: 14px; margin: 0; }
  .lb-nav.prev { left: calc(50% - 90px); }
  .lb-nav.next { right: calc(50% - 90px); }
}
.lb-count { position: absolute; top: 22px; left: 0; right: 0; margin: 0; text-align: center; color: rgba(255, 255, 255, .75); font: 800 .85rem var(--sans); letter-spacing: .1em; pointer-events: none; }
@media (max-width: 640px) { .lb-count { top: auto; bottom: 28px; } }

/* ===================== TOAST ===================== */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  font: 700 .92rem var(--sans);
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  transition: transform .3s var(--bounce), opacity .3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ===================== KEYFRAMES ===================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeOutUp { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-14px); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.6) rotate(-6deg); } 100% { opacity: 1; transform: none; } }
@keyframes wobble {
  0%, 70%, 100% { transform: rotate(0); }
  74% { transform: rotate(-4deg) scale(1.03); }
  80% { transform: rotate(3.5deg) scale(1.03); }
  86% { transform: rotate(-2deg); }
  92% { transform: rotate(1deg); }
}
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes letterDrop {
  0% { opacity: 0; transform: translateY(-90%) rotate(-14deg) scale(.8); }
  55% { opacity: 1; transform: translateY(8%) rotate(4deg) scale(1.05); }
  75% { transform: translateY(-4%) rotate(-2deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes stampIn {
  0% { opacity: 0; transform: rotate(-24deg) scale(3); }
  70% { opacity: 1; transform: rotate(-8deg) scale(.92); }
  100% { opacity: 1; transform: rotate(-10deg) scale(1); }
}
@keyframes polaroidIn {
  0% { opacity: 0; transform: translateY(60px) rotate(10deg) scale(.85); }
  100% { opacity: 1; transform: none; }
}
@keyframes sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
@keyframes shake {
  0%, 100% { transform: none; }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, 1px); }
}
@keyframes swingIn {
  0% { opacity: 0; transform: translateY(-34px) rotate(16deg); }
  45% { opacity: 1; transform: translateY(4px) rotate(-7deg); }
  70% { transform: rotate(3deg); }
  88% { transform: rotate(-1deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bump { 0% { transform: scale(1); } 50% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ===================== TAMBAHAN: maskot, stiker, pita, balon, prangko ===================== */

/* Si Toga (maskot) */
.toga { display: block; overflow: visible; }
.toga .tg-happy { display: none; }
.toga.happy .tg-eyes { display: none; }
.toga.happy .tg-happy { display: inline; }
.tg-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.2s infinite; }

.cover-toga {
  top: -66px; right: 3%;
  width: 82px;
  z-index: 6;
  animation: popIn .6s var(--bounce) both 1.1s;
}
.cover-toga .toga { animation: bob 2.6s ease-in-out infinite 1.7s; }
.bubble {
  position: absolute; right: 88%; top: -4px;
  padding: 4px 12px 6px;
  background: #fff; color: var(--maroon);
  border-radius: 14px;
  font-size: 1.25rem; line-height: 1.1; white-space: nowrap;
  box-shadow: 0 3px 0 var(--rose-d);
  animation: popIn .5s var(--bounce) both 1.6s;
}
.bubble::after {
  content: ""; position: absolute; right: -7px; bottom: 7px;
  border: 7px solid transparent; border-left-color: #fff; border-right: 0;
}
.opening .cover-toga { animation: hopAway .75s cubic-bezier(.5, -0.4, .7, .4) forwards; }

/* Stiker di foto hero */
.sticker-ring {
  position: absolute; z-index: 3;
  top: -30px; right: -26px;
  width: 96px; height: 96px;
  filter: drop-shadow(0 4px 6px rgba(59, 31, 39, .25));
  transform: rotate(12deg);
}
.ring-spin { transform-box: view-box; transform-origin: 50px 50px; animation: spin 14s linear infinite; }
.sticker-heart {
  position: absolute; z-index: 3;
  left: -20px; bottom: 74px;
  width: 58px; height: 54px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 72 66'%3E%3Cpath d='M32 55C10 41 3 29 3 19 3 9.5 10 3 18.5 3c6 0 10.8 3 13.5 8 2.7-5 7.5-8 13.5-8C54 3 61 9.5 61 19c0 10-7 22-29 36z' fill='%23a3305d' stroke='%23fff' stroke-width='5' stroke-linejoin='round'/%3E%3Cellipse cx='18' cy='16' rx='6' ry='3.6' fill='%23fff' opacity='.45' transform='rotate(-35 18 16)'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 4px 5px rgba(59, 31, 39, .25));
  transform: rotate(-12deg);
}
.hero:not(.go) .sticker-ring, .hero:not(.go) .sticker-heart { opacity: 0; }
.hero.go .sticker-ring { animation: stickerIn .6s var(--bounce) both 1.9s; }
.hero.go .sticker-heart { animation: stickerIn .6s var(--bounce) both 2.1s, beat 1.6s ease-in-out 2.8s infinite; }

/* Pita berjalan */
.marquee { overflow: hidden; padding: 28px 0; }
.marquee-band {
  width: calc(100% + 80px); margin-left: -40px;
  padding: 13px 0;
  background: var(--maroon); color: var(--cream);
  transform: rotate(-2.2deg);
  box-shadow: 0 6px 0 var(--rose-d);
}
.marquee-track { display: flex; align-items: center; width: max-content; animation: marquee 34s linear infinite; }
.marquee-track span { margin-right: 22px; font: 900 1rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.marquee-track span:nth-of-type(3n+2) { color: var(--peach); }
.marquee-track i {
  flex: none; width: 16px; height: 16px; margin-right: 22px;
  background: var(--gold);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

/* Balon */
.bl-grid {
  max-width: 540px; margin: 34px auto 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 10px;
}
.bl {
  position: relative; height: 176px;
  padding: 0; border: 0; background: none;
  cursor: pointer;
}
.bl-body {
  position: absolute; left: 50%; top: 4px;
  width: 80px; margin-left: -40px;
  transform-origin: 50% 90%;
  animation: floaty 3.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  color: var(--c);
}
.bl-body svg { display: block; width: 80px; height: auto; overflow: visible; }
.bl-fact {
  position: absolute; left: 2px; right: 2px; top: 30px;
  padding: 12px 6px 14px;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--rose-d), 0 12px 20px -12px rgba(59, 31, 39, .5);
  font: 600 .84rem/1.25 var(--sans); color: var(--ink-soft);
  opacity: 0; transform: scale(.4) rotate(-10deg);
  pointer-events: none;
}
.bl-fact b { display: block; margin-bottom: 2px; font: 700 1.35rem/1.05 var(--hand); color: var(--maroon); }
.bl.popped { cursor: default; }
.bl.popped .bl-body { animation: popB .3s ease-out forwards; }
.bl.popped .bl-fact { animation: factIn .55s var(--bounce) forwards .06s; }
.bl-done { margin: 26px auto 0; max-width: 30ch; min-height: 1.6em; font-size: 1.5rem; line-height: 1.2; color: var(--maroon); }
.bl-done.show { animation: bump .45s var(--bounce); }

/* Prangko di surat */
.postage {
  position: absolute; z-index: 2;
  top: -46px; right: -12px;
  width: 90px; padding: 6px 6px 5px;
  background: #fff;
  rotate: 7deg;
  -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle at center, transparent 3px, #000 3.5px) -5px -5px / 10px 10px;
  mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle at center, transparent 3px, #000 3.5px) -5px -5px / 10px 10px;
}
.postage-wrap { position: absolute; top: -46px; right: -12px; z-index: 2; filter: drop-shadow(0 4px 6px rgba(59, 31, 39, .22)); }
.postage-wrap .postage { position: static; }
.postage img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; }
.postage span { display: block; margin-top: 4px; font: 900 .56rem/1 var(--sans); letter-spacing: .1em; text-align: center; color: var(--maroon); }

@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes hopAway {
  0% { transform: none; opacity: 1; }
  35% { transform: translateY(-50px) rotate(-12deg); opacity: 1; }
  100% { transform: translate(60px, -180px) rotate(30deg) scale(.6); opacity: 0; }
}
@keyframes stickerIn { 0% { opacity: 0; transform: scale(0) rotate(-40deg); } 100% { opacity: 1; } }
@keyframes beat { 0%, 100% { transform: scale(1) rotate(-12deg); } 15% { transform: scale(1.14) rotate(-12deg); } 30% { transform: scale(1) rotate(-12deg); } 45% { transform: scale(1.1) rotate(-12deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes popB { 0% { transform: scale(1); opacity: 1; } 40% { transform: scale(1.25, 1.15); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes factIn { to { opacity: 1; transform: rotate(var(--rot, -3deg)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* Bayangan prangko jangan sampai bikin halaman melebar di HP */
.letter-sec { overflow: hidden; }
