/* =====================================================================
   SUNFLOWER WEDDING INVITATION — "You Are My Sunshine, My Forever"
   Everything lives in this one file. Sections of the stylesheet:
   1. Tokens & base        6. Story / timeline       11. Closing
   2. Texture & helpers    7. Invitation card        12. UI widgets
   3. Decor (flowers…)     8. Countdown              13. Responsive
   4. Intro / envelope     9. Gallery & lightbox     14. Reduced motion
   5. Title scene         10. Location & RSVP
   ===================================================================== */

/* ---------- 1. Tokens & base ---------- */
:root {
  /* --sun: #f6c945;
        --butter: #fbe8a6;
        --cream: #fff8e7;
        --vanilla: #fff1cc;
        --honey: #d9a441;
        --sage: #a8b58a;
        --olive: #68794d;
        --brown: #76543a;
        --peach: #f5c6a5;
        --ink: #5e4230;
        --paper: #fffbf7; */
  --sun: #f6c945;
  --butter: #f8edcf;
  --cream: #fffdf6;
  --vanilla: #f8f5e9;
  --honey: #d9a441;
  --sage: #b9c9a8;
  --olive: #68794d;
  --brown: #806653;
  --peach: #efd2bd;
  --ink: #514638; /* deeper earthy brown for readable text */
  --paper: #fffdf9;
  --blush: #fbeee3; /* soft peach tint */
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-display: "Playfair Display", Georgia, serif;
  --f-hand: "Caveat", "Segoe Script", cursive;
  --f-script: "Dancing Script", "Brush Script MT", cursive;
  --f-ui: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 12px 26px -12px rgba(118, 84, 58, 0.55);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked {
  overflow: hidden;
  height: 100svh;
}
/* ---------- Global lining + tabular figures ---------- */
html {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum", "tnum";
}

button,
input,
select,
textarea {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum", "tnum";
}

/* Pseudo-element dan teks yang diset font-family sendiri */
*,
*::before,
*::after {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum", "tnum";
}

img,
svg {
  max-width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
  border-radius: 6px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 2. Texture & helpers ---------- */
/* Film grain over everything (very light, never blocks clicks) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .32  0 0 0 0 .2  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.paper {
  background-image: radial-gradient(
    rgba(118, 84, 58, 0.06) 1px,
    transparent 1.2px
  );
  background-size: 7px 7px;
}
.checker {
  background-image: conic-gradient(
    rgba(246, 201, 69, 0.22) 25%,
    transparent 0 50%,
    rgba(246, 201, 69, 0.22) 0 75%,
    transparent 0
  );
  background-size: 46px 46px;
}

.hand {
  font-family: var(--f-hand);
  font-weight: 700;
}
.script {
  font-family: var(--f-script);
  font-weight: 700;
}
.label {
  font-family: var(--f-ui);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--olive);
}

/* Sections */
.sec {
  position: relative;
  padding: clamp(76px, 12vw, 140px) 20px;
  overflow: hidden;
  background-color: var(--bg, var(--cream));
}
.sec.scallop::before {
  /* scalloped paper edge on top of a section */
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 18px;
  z-index: 3;
  background: radial-gradient(
      circle at 10px 0,
      var(--prev, var(--cream)) 9.5px,
      transparent 10px
    )
    0 0/20px 18px repeat-x;
}
.wrap {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
}
.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 7vw, 3.3rem);
  line-height: 1.15;
  text-align: center;
  color: var(--brown);
}
.kicker {
  display: block;
  text-align: center;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--olive);
  /* margin-bottom: 6px; */
}
.lead {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  text-align: center;
  max-width: 36rem;
  margin: 18px auto 0;
  color: var(--ink);
}

/* Reveal on scroll (uses individual transform properties so it never fights other transforms) */
.reveal {
  opacity: 0;
  translate: 0 30px;
  scale: 0.96;
  transition:
    opacity 0.9s ease,
    translate 0.9s ease,
    scale 0.9s ease;
}
.reveal.in {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

/* Word-by-word text */
.w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotate(2deg);
  filter: blur(4px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease,
    filter 0.7s ease;
  transition-delay: calc(var(--i) * 0.13s + var(--base, 0s));
}
.words.in .w {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Handwriting "wipe" effect */
.write {
  display: inline-block;
  clip-path: inset(-10% 100% -10% 0);
  transition: clip-path 2.2s steps(28, end);
}
.write.in {
  clip-path: inset(-10% 0 -10% 0);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0.7em 1.7em;
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  background: var(--sun);
  color: var(--brown);
  border: 2px solid var(--brown);
  border-radius: 999px;
  box-shadow: 3px 5px 0 var(--brown);
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  transform: translate(-1px, -2px) rotate(-1deg);
  box-shadow: 5px 8px 0 var(--brown);
  background: #ffd65a;
}
.btn:active {
  transform: translate(3px, 4px);
  box-shadow: 0 0 0 var(--brown);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

/* ---------- 3. Decor: flowers, petals, critters ---------- */
.ic {
  display: block;
  width: 1em;
  aspect-ratio: 1;
}
.spin {
  animation: spin 70s linear infinite;
}
.spin.rev {
  animation-direction: reverse;
  animation-duration: 90s;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Flower clusters tucked into corners (filled by JS) */
.cluster {
  position: absolute;
  width: clamp(150px, 38vw, 300px);
  aspect-ratio: 1;
  pointer-events: none;
  z-index: 1;
}
.cluster.sm {
  width: clamp(96px, 26vw, 175px);
}
.cluster.tl {
  top: -4%;
  left: -7%;
}
.cluster.tr {
  top: -4%;
  right: -7%;
  scale: -1 1;
}
.cluster.bl {
  bottom: -4%;
  left: -7%;
  scale: 1 -1;
}
.cluster.br {
  bottom: -4%;
  right: -7%;
  scale: -1 -1;
}
.cluster > * {
  position: absolute;
  display: block;
}
.cluster .c-sf {
  aspect-ratio: 1;
  filter: drop-shadow(0 4px 4px rgba(118, 84, 58, 0.28));
}
.cluster .c-sf.big {
  width: 62%;
  left: -6%;
  top: -6%;
}
.cluster .c-sf.mid {
  width: 38%;
  left: 48%;
  top: 30%;
}
.cluster .c-sf.small {
  width: 26%;
  left: 12%;
  top: 58%;
}
.cluster .c-dz {
  width: 15%;
  aspect-ratio: 1;
}
.cluster .c-dz.d1 {
  left: 62%;
  top: 6%;
}
.cluster .c-dz.d2 {
  left: 36%;
  top: 70%;
}
.cluster .c-leaf {
  width: 34%;
  aspect-ratio: 40/28;
}
.cluster .c-leaf.a {
  left: 46%;
  top: 2%;
  rotate: 25deg;
}
.cluster .c-leaf.b {
  left: 2%;
  top: 50%;
  rotate: 75deg;
}
.cluster .c-leaf.c {
  left: 42%;
  top: 52%;
  rotate: -20deg;
}

/* Stickers & sticky notes scattered around sections */
.sticker {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.95;
}
.sticker .ic {
  width: 100%;
  height: auto;
}
.sticky {
  position: relative;
  display: inline-block;
  padding: 16px 18px 14px;
  background: #ffe98a;
  color: var(--brown);
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.1;
  text-align: center;
  box-shadow: var(--shadow);
  transform: rotate(var(--rot, 3deg));
}
.sticky::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 70px;
  height: 22px;
  translate: -50% 0;
  background: rgba(245, 198, 165, 0.8);
  rotate: -3deg;
}
.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 84px;
  height: 24px;
  translate: -50% 0;
  background: rgba(245, 198, 165, 0.78);
  rotate: -4deg;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Sunlight rays */
.sunbeams {
  position: absolute;
  inset: -50%;
  pointer-events: none;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 255, 255, 0.42) 0 6deg,
    transparent 6deg 20deg
  );
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 0, transparent 42%);
  mask: radial-gradient(circle at 50% 50%, #000 0, transparent 42%);
  animation: spin 140s linear infinite;
}

/* Ambient layers (petals, butterflies, bees) */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 6;
}
.petal {
  position: absolute;
  top: -30px;
  width: 12px;
  height: 17px;
  background: linear-gradient(135deg, #ffd65a, #f6c945 60%, #d9a441);
  border-radius: 80% 0 80% 0;
  opacity: 0.85;
  animation: fall var(--dur, 16s) linear var(--delay, 0s) infinite;
}
@keyframes fall {
  0% {
    transform: translate3d(0, -5vh, 0) rotate(0);
  }
  25% {
    transform: translate3d(30px, 28vh, 0) rotate(120deg);
  }
  50% {
    transform: translate3d(-24px, 55vh, 0) rotate(250deg);
  }
  75% {
    transform: translate3d(34px, 82vh, 0) rotate(330deg);
  }
  100% {
    transform: translate3d(-10px, 112vh, 0) rotate(440deg);
  }
}
.critter {
  position: absolute;
  left: 0;
  top: var(--top);
  animation: cross var(--dur) linear var(--delay) infinite;
}
.critter.rev {
  animation-direction: reverse;
}
.critter.rev .flip {
  scale: -1 1;
}
@keyframes cross {
  from {
    translate: -14vw 0;
  }
  to {
    translate: 114vw 0;
  }
}
.crit-in {
  animation: bob 2.6s ease-in-out infinite alternate;
}
@keyframes bob {
  from {
    transform: translateY(-22px) rotate(-8deg);
  }
  to {
    transform: translateY(22px) rotate(8deg);
  }
}
.bf {
  width: 46px;
  height: auto;
  display: block;
}
.bf .wl,
.bf .wr {
  animation: flap 0.32s ease-in-out infinite alternate;
}
.bf .wl {
  transform-origin: 30px 20px;
}
.bf .wr {
  transform-origin: 30px 20px;
  animation-direction: alternate-reverse;
}
@keyframes flap {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0.25);
  }
}
.bee {
  position: absolute;
  left: 0;
  top: var(--top);
  animation: beeCross 9s linear forwards;
}
@keyframes beeCross {
  from {
    translate: -12vw 0;
  }
  to {
    translate: 112vw 0;
  }
}
.bee-mid {
  animation: beeY 3.2s ease-in-out infinite alternate;
}
@keyframes beeY {
  from {
    transform: translateY(-38px);
  }
  to {
    transform: translateY(38px);
  }
}
.bee-in {
  animation: wobble 0.5s ease-in-out infinite alternate;
}
@keyframes wobble {
  from {
    transform: rotate(-10deg);
  }
  to {
    transform: rotate(10deg);
  }
}
.bee svg {
  width: 40px;
  display: block;
}
.bee .bw {
  transform-origin: 24px 12px;
  animation: buzz 0.12s linear infinite alternate;
}
@keyframes buzz {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(0.4);
  }
}

/* Floating hearts & stars */
.float-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.fi {
  position: absolute;
  bottom: -30px;
  width: var(--s, 18px);
  aspect-ratio: 1;
  color: var(--c, #e9a88a);
  opacity: 0;
  animation: rise var(--dur, 9s) ease-in var(--delay, 0s) infinite;
}
@keyframes rise {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0);
  }
  15% {
    opacity: 0.85;
  }
  50% {
    transform: translate(14px, -45vh) rotate(14deg);
  }
  100% {
    opacity: 0;
    transform: translate(-12px, -95vh) rotate(-12deg);
  }
}

/* Custom sunflower cursor (desktop only, never intercepts clicks) */
#cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 30px;
  aspect-ratio: 1;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition:
    opacity 0.3s,
    scale 0.2s;
}
#cursor.on {
  opacity: 0.95;
}
#cursor.big {
  scale: 1.5;
}

/* ---------- 4. Intro / envelope ---------- */
#intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 28%,
    #fffbee 0%,
    var(--butter) 100%
  );
  transition:
    opacity 1.3s ease,
    visibility 1.3s;
}
#intro.gone {
  opacity: 0;
  visibility: hidden;
}
.petal-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.intro-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.6vh, 24px);
  padding: 20px;
  text-align: center;
  max-width: 620px;
}
.intro-line.l1 {
  font-size: clamp(1.45rem, 5.6vw, 2.3rem);
  line-height: 1.15;
  color: var(--brown);
}
.intro-line.l2 {
  font-size: clamp(1.5rem, 5.6vw, 2.2rem);
  color: var(--olive);
  line-height: 1.2;
}
#openBtn {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 1s,
    visibility 1s,
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
#openBtn.show {
  opacity: 1;
  visibility: visible;
  animation: pulse 2.6s ease-in-out 1s infinite;
}
@keyframes pulse {
  50% {
    scale: 1.04;
  }
}

.env-wrap {
  perspective: 900px;
  width: min(74vw, 330px, 50vh);
}
.envelope {
  position: relative;
  width: 100%;
  aspect-ratio: 1.4;
  filter: drop-shadow(0 14px 14px rgba(118, 84, 58, 0.3));
  animation: envFloat 4.5s ease-in-out infinite alternate;
}
@keyframes envFloat {
  from {
    transform: translateY(-5px) rotate(-1deg);
  }
  to {
    transform: translateY(5px) rotate(1deg);
  }
}
.env-back {
  position: absolute;
  inset: 0;
  background: #e7bd62;
  border-radius: 6px;
}
.env-letter {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 9%;
  height: 80%;
  background: var(--paper);
  z-index: 2;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 1.1s cubic-bezier(0.3, 0.9, 0.3, 1) 0.6s;
  color: var(--brown);
}
.env-letter .hand {
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  line-height: 1;
}
.env-letter .ic {
  font-size: clamp(34px, 10vw, 52px);
}
.env-front {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 6px;
  background: linear-gradient(160deg, #f6d88a, #efc768);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 60%;
  z-index: 4;
  transform-origin: top center;
  background: linear-gradient(180deg, #e9bf5f, #f2ce76);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 6px 6px 0 0;
}
.env-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18%;
  translate: -50% -50%;
  z-index: 5;
  transition:
    opacity 0.4s,
    scale 0.4s;
}
.env-seal .ic {
  width: 100%;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.25));
}
#intro.open .env-flap {
  animation: flapOpen 1s ease forwards;
}
@keyframes flapOpen {
  0% {
    transform: rotateX(0);
    z-index: 4;
  }
  49% {
    z-index: 4;
  }
  50% {
    z-index: 1;
  }
  100% {
    transform: rotateX(180deg);
    z-index: 1;
  }
}
#intro.open .env-letter {
  transform: translateY(-62%);
}
#intro.open .env-seal {
  opacity: 0;
  scale: 0.2;
}
#intro.open .envelope {
  animation: none;
}
.intro-guest-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

#introGuestName {
  /* Menjaga konsistensi gaya teks tulisan tangan */
  font-family: var(--f-hand);
  text-shadow: 0 2px 4px rgba(118, 84, 58, 0.08);
}
/* ---------- 5. Title scene ---------- */
.title {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  --bg: var(--cream);
  background: radial-gradient(
    circle at 50% 15%,
    #fffdf2,
    var(--cream) 60%,
    var(--vanilla)
  );
}
.title .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.sun {
  width: clamp(96px, 24vw, 150px);
  overflow: visible;
  filter: drop-shadow(0 6px 8px rgba(217, 164, 65, 0.4));
}
.sun-rays {
  transform-origin: 0 0;
  animation: spin 60s linear infinite;
}
.sun {
  --c: 0;
}
.invited {
  font-size: clamp(0.72rem, 2.6vw, 0.9rem);
  letter-spacing: 0.34em;
  margin-top: 6px;
}
.names {
  font-family: var(--f-serif);
  font-weight: 600;
  color: var(--brown);
  line-height: 0.98;
  font-size: clamp(2.6rem, 12.5vw, 6.2rem);
  overflow-wrap: anywhere;
}
.amp {
  font-family: var(--f-script);
  font-weight: 700;
  color: var(--honey);
  font-size: clamp(2.4rem, 10vw, 4.4rem);
  line-height: 1;
  margin: -2px 0;
}
.tagline {
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: var(--olive);
  margin-top: 10px;
}
.scroll-hint {
  margin-top: 22px;
  font-family: var(--f-hand);
  font-size: 1.3rem;
  color: var(--brown);
  opacity: 0.8;
  animation: nudge 2.4s ease-in-out infinite;
}
@keyframes nudge {
  50% {
    transform: translateY(8px);
  }
}

/* ---------- 6. Story / timeline ---------- */
.story {
  --bg: var(--vanilla);
  --prev: var(--cream);
}
.story .sticky.s1 {
  position: absolute;
  top: clamp(20px, 4vw, 50px);
  right: 5%;
  --rot: 5deg;
  font-size: 1.2rem;
  z-index: 3;
}

.timeline {
  position: relative;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 70px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 3px dashed rgba(217, 164, 65, 0.7);
  translate: -50% 0;
}
.tl-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.tl-item .badge {
  position: absolute;
  left: 50%;
  top: -18px;
  translate: -50% 0;
  z-index: 3;
  width: 46px;
  font-size: 46px;
  background: var(--vanilla);
  border-radius: 50%;
  padding: 2px;
}
.tl-item .badge span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brown);
}
.note {
  position: relative;
  width: min(
    100%,
    280px
  ); /* Sedikit diperlebar agar proporsional dengan polaroid */
  margin: 0 auto;
  padding: 24px 22px 26px;
  background-color: #fffdf9; /* Warna kertas jurnal hangat */
  background-image: linear-gradient(
    rgba(118, 84, 58, 0.03) 1px,
    transparent 1px
  ); /* Garis tipis buku tulis gaya vintage */
  background-size: 100% 24px; /* Jarak antar garis buku tulis */
  border: 1px solid rgba(118, 84, 58, 0.15);
  border-radius: 4px;
  text-align: center;
  box-shadow:
    0 4px 15px rgba(118, 84, 58, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
  isolation: isolate;
  transform: rotate(
    0.6deg
  ); /* Sedikit miring alami seperti catatan buku tempel */
}

/* Hiasan selotip/tape di atas catatan ala jurnal scrapbook */
.note::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 20px;
  background-color: rgba(
    233,
    208,
    160,
    0.55
  ); /* Warna transparan seperti washi tape */
  border-left: 2px dashed rgba(217, 164, 65, 0.4);
  border-right: 2px dashed rgba(217, 164, 65, 0.4);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  z-index: 3;
}

.note-in {
  position: relative;
  padding: 2px 0;
}

.note .date {
  font-family: var(--f-hand);
  font-size: 1.1rem;
  color: var(--olive);
  display: block;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.note h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--brown);
  margin: 2px 0 10px;
  line-height: 1.2;
  border-bottom: 1px dashed rgba(118, 84, 58, 0.2); /* Garis pemisah kecil di bawah judul */
  padding-bottom: 6px;
}

.note p {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
}

.note .heart {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 18px;
  color: #e9a88a;
  rotate: 12deg;
}

.note .mini {
  position: absolute;
  left: -14px;
  top: -12px;
  width: 36px;
  font-size: 36px;
  rotate: -14deg;
}

/* Polaroids */
.polaroid {
  --rot: 0deg;
  position: relative;
  display: block;
  width: 100%;
  max-width: 240px; /* Diubah dari 290px agar lebih proporsional di HP */
  margin: 0 auto; /* Memastikan posisinya di tengah secara otomatis pada tampilan mobile */
  padding: 10px 10px 0;
  background: #fffdf6;
  border: 0;
  text-align: center;
  box-shadow: var(--shadow);
  transform: rotate(var(--rot));
  transition:
    opacity 0.9s ease,
    translate 0.9s ease,
    scale 0.9s ease,
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.45s;
}

.polaroid .ph {
  display: block;
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--vanilla);
}

.polaroid .ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.18) saturate(1.1) contrast(0.97);
}

.polaroid .ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 55%, rgba(118, 84, 58, 0.28));
  pointer-events: none;
}

.polaroid .cap {
  display: block;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.15rem; /* Ukuran font caption sedikit disesuaikan untuk mobile */
  color: var(--brown);
  line-height: 1.1;
  padding: 10px 6px 12px;
}

.polaroid .stk {
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 36px;
  font-size: 36px;
  rotate: 12deg;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.2));
}

/* Kembalikan max-width ke ukuran semula khusus untuk layar Desktop (min-width: 860px) */
@media (min-width: 860px) {
  .tl-item .polaroid {
    margin-left: auto;
    max-width: 290px;
  }
}
/* Default: Tampilkan versi desktop, sembunyikan versi mobile */
.note p .text-mobile {
  display: none;
}
.note p .text-desktop {
  display: inline;
}

/* Jika layar di bawah 768px (HP/Mobile): Tampilkan versi mobile, sembunyikan desktop */
@media (max-width: 768px) {
  .note p .text-mobile {
    display: inline;
  }
  .note p .text-desktop {
    display: none;
  }
}
/* ---------- 7. Invitation card ---------- */
.invite {
  --bg: var(--butter);
  --prev: var(--butter);
}
.card {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(34px, 7vw, 64px) clamp(22px, 6vw, 56px);
  background-color: var(--cream);
  border: 2px solid var(--honey);
  border-radius: 6px;
  box-shadow: 0 22px 40px -20px rgba(118, 84, 58, 0.6);
  text-align: center;
  transform: rotate(-0.4deg);
}
.card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1.5px dashed rgba(217, 164, 65, 0.8);
  pointer-events: none;
  border-radius: 3px;
}
.card .cluster {
  z-index: 3;
}
.card-in {
  position: relative;
  z-index: 2;
}
.greet {
  font-family: var(--f-hand);
  font-size: clamp(1.4rem, 4.8vw, 1.85rem);
  line-height: 1.3;
  color: var(--olive);
}
.greet.big {
  font-size: clamp(1.55rem, 5.4vw, 2.1rem);
  /* color: var(--brown); */
  color: var(--olive);
}
.greet.small {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  color: var(--olive); /* Bisa disesuaikan warnanya jika ingin berbeda */
}

.orn {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin: 20px auto;
  max-width: 300px;
  color: var(--honey);
}
.orn::before,
.orn::after {
  content: "";
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--honey) 0 6px,
    transparent 6px 11px
  );
}
.orn .ic {
  font-size: 30px;
}
.inv-names {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 8vw, 3.2rem);
  line-height: 1.08;
  color: var(--brown);
  overflow-wrap: anywhere;
}
.inv-amp {
  font-family: var(--f-script);
  color: var(--honey);
  font-size: 2.2rem;
  line-height: 1;
  margin: 2px 0;
}
.date-hero {
  margin: 22px 0 8px;
}
.date-hero .dow {
  font-family: var(--f-script);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  color: var(--olive);
  line-height: 1;
}
.date-hero .dnum {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 16vw, 6rem);
  line-height: 1;
  color: var(--brown);
}
.date-hero .dmon {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown);
}
/* Styling untuk area details baru tanpa kotak penuh */
.details {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 24px;
}

.detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: center;
  padding: 16px 0;
  position: relative;
}

/* Garis pemisah putus-putus di atas baris venue */
.detail-row.venue-row {
  grid-template-columns: 1fr;
  border-top: 1.5px dashed rgba(217, 164, 65, 0.7);
  margin-top: 4px;
  padding-top: 20px;
}

.detail-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.detail-col.wide {
  grid-column: 1 / -1;
}

/* Teks label kecil di atas */
.details .label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--f-ui);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--olive);
}

/* Teks waktu dan nama tempat */
.details b {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  color: var(--brown);
  line-height: 1.2;
}

/* Alamat venue di bawah */
.details .addr {
  display: block;
  font-family: var(--f-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: 4px;
}
.card .sticky.s2 {
  position: absolute;
  left: -10px;
  bottom: -26px;
  --rot: -6deg;
  font-size: 1.25rem;
  z-index: 4;
}

/* Vintage postage stamp (perforated edge) */
.stamp {
  position: relative;
  isolation: isolate;
  display: inline-block;
}
.stamp::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  background: radial-gradient(
      circle at 6px 6px,
      transparent 3.5px,
      var(--paper) 4px
    )
    0 0/12px 12px;
}
.stamp-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1.5px solid rgba(118, 84, 58, 0.3);
  text-align: center;
  color: var(--brown);
}
.stamp-in .ic {
  font-size: 44px;
}
.stamp-in small {
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
}
.stamp-in em {
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--olive);
}
.card .stamp {
  position: absolute;
  top: -16px;
  right: -10px;
  rotate: 7deg;
  z-index: 4;
  filter: drop-shadow(0 4px 4px rgba(118, 84, 58, 0.25));
}
.parent-name {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1rem, 3.2vw, 1.25rem);
  color: var(--ink);
  margin: 6px 0 12px;
  line-height: 1.4;
}
/* ---------- 8. Countdown ---------- */
.count {
  --bg: var(--vanilla);
  --prev: var(--butter);
}
.cd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 640px;
  margin: 44px auto 0;
}
.cd-card {
  position: relative;
  padding: 26px 8px 18px;
  text-align: center;
  background: var(--paper);
  border: 2px solid var(--brown);
  border-radius: 10px;
  box-shadow: 4px 6px 0 var(--honey);
  animation: float 5s ease-in-out infinite;
  animation-delay: var(--fd, 0s);
}
.cd-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed rgba(217, 164, 65, 0.8);
  border-radius: 6px;
  pointer-events: none;
}
@keyframes float {
  50% {
    transform: translateY(-7px) rotate(0.6deg);
  }
}
.cd-card .num {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 13vw, 4.2rem);
  line-height: 1;
  color: var(--brown);
  font-variant-numeric: tabular-nums;
}
.cd-card .num.pop {
  animation: pop 0.45s ease;
}
@keyframes pop {
  40% {
    transform: scale(1.15);
    color: var(--honey);
  }
}
.cd-card .label {
  display: block;
  margin-top: 8px;
}
.cd-card .ic {
  position: absolute;
  top: -16px;
  right: -10px;
  font-size: 40px;
  rotate: 14deg;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.2));
}
.cd-done {
  max-width: 560px;
  margin: 44px auto 0;
  padding: 30px 22px;
  text-align: center;
  background: var(--paper);
  border: 2px dashed var(--honey);
  border-radius: 10px;
}
.cd-done h3 {
  font-family: var(--f-script);
  font-size: clamp(2rem, 8vw, 3rem);
  color: var(--brown);
  line-height: 1.1;
}
.cd-done p {
  font-family: var(--f-serif);
  font-size: 1.4rem;
  margin-top: 8px;
}

/* ---------- 9. Gallery & lightbox ---------- */
.gallery {
  --bg: var(--cream);
  --prev: var(--vanilla);
}
.g-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 14px;
  margin-top: 50px;
  justify-items: center;
}
.g-item {
  cursor: zoom-in;
  font-family: inherit;
}
.g-item:hover,
.g-item:focus-visible {
  transform: rotate(0) scale(1.06) translateY(-6px);
  box-shadow: 0 22px 30px -14px rgba(118, 84, 58, 0.7);
  z-index: 3;
}
.g-item .cap {
  font-size: 1.15rem;
}
.g-item .stk {
  width: 34px;
  font-size: 34px;
}

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(58, 40, 26, 0.9);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
}
#lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lb-fig {
  position: relative;
  margin: 0;
  max-width: min(92vw, 560px);
  background: #fffdf6;
  padding: 12px 12px 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: rotate(-1deg);
}
.lb-fig img {
  display: block;
  max-width: 100%;
  max-height: 66vh;
  width: auto;
  margin: 0 auto;
  filter: sepia(0.12) saturate(1.08);
}
.lb-fig figcaption {
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.6rem;
  text-align: center;
  color: var(--brown);
  padding: 12px 8px 6px;
}
.lb-count {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--olive);
  padding-bottom: 12px;
  font-weight: 700;
}
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--brown);
  background: var(--sun);
  color: var(--brown);
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 2px 3px 0 var(--brown);
  transition: transform 0.2s;
}
.lb-btn:hover {
  transform: scale(1.08);
}
.lb-prev {
  left: max(10px, 2vw);
  top: 50%;
  translate: 0 -50%;
}
.lb-next {
  right: max(10px, 2vw);
  top: 50%;
  translate: 0 -50%;
}
.lb-close {
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, 2vw);
}

/* ---------- 10. Location & RSVP ---------- */
.location {
  --bg: var(--butter);
  --prev: var(--vanilla);
}
.postcard {
  position: relative;
  max-width: 860px;
  margin: 50px auto 0;
  padding: 12px;
  transform: rotate(0.6deg);
  box-shadow: 0 22px 40px -20px rgba(118, 84, 58, 0.65);
  background: repeating-linear-gradient(
    -45deg,
    var(--sun) 0 14px,
    var(--cream) 14px 28px,
    var(--sage) 28px 42px,
    var(--cream) 42px 56px
  );
}
.pc-in {
  position: relative;
  display: grid;
  gap: 22px;
  padding: clamp(20px, 5vw, 34px);
  background-color: var(--cream);
}
.pc-msg .hand {
  font-size: 1.5rem;
  color: var(--olive);
  line-height: 1.1;
}
.pc-msg h3 {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 7vw, 2.5rem);
  color: var(--brown);
  line-height: 1.1;
  margin: 6px 0 8px;
}
.pc-msg p {
  font-family: var(--f-serif);
  font-size: 1.3rem;
  line-height: 1.35;
  margin-bottom: 20px;
}
.pc-msg .lines {
  display: none;
}
.pc-map {
  position: relative;
  border: 2px solid var(--brown);
  border-radius: 6px;
  overflow: hidden;
  background: var(--vanilla);
  min-height: 200px;
}
.pc-map svg.map {
  display: block;
  width: 100%;
  height: auto;
}
.pc-map iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
}
.pin {
  animation: pinBounce 1.8s ease-in-out infinite;
  transform-origin: 160px 100px;
}
@keyframes pinBounce {
  50% {
    transform: translateY(-8px);
  }
}
.postcard .stamp {
  position: absolute;
  top: -18px;
  right: 14px;
  rotate: 6deg;
  z-index: 3;
  filter: drop-shadow(0 4px 4px rgba(118, 84, 58, 0.25));
}
.postmark {
  position: absolute;
  top: 2px;
  right: 96px;
  width: 84px;
  height: 84px;
  rotate: -12deg;
  opacity: 0.55;
  z-index: 3;
  pointer-events: none;
}

.rsvp {
  --bg: var(--vanilla);
  --prev: var(--butter);
}
.rsvp-card {
  position: relative;
  max-width: 600px;
  margin: 46px auto 0;
  padding: clamp(28px, 6vw, 48px) clamp(18px, 5vw, 40px) clamp(28px, 6vw, 44px);
  background: #fffef8
    repeating-linear-gradient(
      transparent 0 33px,
      rgba(168, 181, 138, 0.45) 33px 34px
    );
  border: 2px solid var(--brown);
  border-radius: 6px;
  box-shadow: 5px 7px 0 var(--honey);
}
.rsvp-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(14px, 4vw, 28px);
  border-left: 2px solid rgba(233, 168, 138, 0.7);
}
.rsvp-card > .tape {
  top: -12px;
}
.dev-note {
  position: relative;
  background: #fff3c4;
  border: 2px dashed var(--honey);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--brown);
  margin-bottom: 22px;
}
.dev-note b {
  font-family: var(--f-hand);
  font-size: 1.15rem;
}
.field {
  margin-bottom: 22px;
  position: relative;
}
.field > label,
.field > legend {
  display: block;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--brown);
  margin-bottom: 6px;
  padding: 0;
}
fieldset.field {
  border: 0;
  padding: 0;
  margin-inline: 0;
}
.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--brown);
  border-radius: 10px;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.input:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 4px rgba(246, 201, 69, 0.55);
}
textarea.input {
  min-height: 110px;
  resize: vertical;
  line-height: 1.4;
}
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 68px;
  padding: 10px 8px;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
  background: var(--paper);
  color: var(--brown);
  border: 2px solid var(--brown);
  border-radius: 12px;
  transition:
    transform 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}
.choice span:hover {
  transform: translateY(-2px);
}
.choice input:checked + span {
  background: var(--sun);
  box-shadow: 3px 4px 0 var(--brown);
  transform: translateY(-2px) rotate(-1deg);
}
.choice input:focus-visible + span {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 14px; /* Memberikan jarak (berjarak) antar elemen */
  width: 100%;
}

.stepper button {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px; /* Dibuat sedikit melengkung agar senada dengan input */
  border: 2px solid var(--brown);
  background: var(--sun);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brown);
  line-height: 1;
  box-shadow: 2px 3px 0 var(--brown);
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.stepper button:hover {
  transform: translateY(-2px);
}

.stepper button:active {
  transform: translate(2px, 3px);
  box-shadow: none;
}

/* Input angka di tengah dibuat fleksibel mengisi ruang */
.stepper .input {
  text-align: center;
  flex: 1; /* Lebar penuh di antara kedua tombol */
  width: auto;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 8px;
  border-radius: 12px; /* Menyamakan lengkungan */
}
.err {
  display: block;
  min-height: 1.2em;
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #a5432b;
}
.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.rsvp-done {
  text-align: center;
  padding: 10px 0 4px;
}
.rsvp-done .bloom {
  width: 110px;
  font-size: 110px;
  margin: 0 auto;
  animation: bloom 1.4s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.rsvp-done .bloom .ic {
  width: 100%;
  animation: spin 20s linear infinite;
}
@keyframes bloom {
  from {
    scale: 0;
    rotate: -120deg;
  }
  to {
    scale: 1;
    rotate: 0;
  }
}
.rsvp-done h3 {
  font-family: var(--f-script);
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: var(--brown);
  line-height: 1.1;
  margin: 10px 0;
}
.rsvp-done p {
  font-family: var(--f-serif);
  font-size: 1.35rem;
  line-height: 1.35;
}
.rsvp-done .demo {
  margin-top: 14px;
  font-family: var(--f-ui);
  font-size: 0.85rem;
  color: var(--olive);
  background: #fff3c4;
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
}
.rsvp .sticky.s3 {
  position: absolute;
  right: 4%;
  bottom: clamp(14px, 3vw, 40px);
  --rot: -5deg;
  font-size: 1.2rem;
  z-index: 3;
}
/* Styling untuk Daftar Ucapan / Wishes agar senada dengan RSVP Card */ /* Styling untuk Daftar Ucapan / Wishes agar senada dengan RSVP Card */
.rsvp-list-wrap {
  max-width: 600px;
  margin: 40px auto 0;
}

#rsvpEntries {
  background: #fffef8
    repeating-linear-gradient(
      transparent 0 33px,
      rgba(168, 181, 138, 0.25) 33px 34px
    );
  border: 2px solid var(--brown);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 5px 7px 0 var(--honey);
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Desain Kartu Individual di dalam List ala Catatan Kertas */
.rsvp-card-item {
  background: #ffffff;
  border: 2px solid var(--brown);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 3px 4px 0 rgba(118, 84, 58, 0.15);
  position: relative;
  transition: transform 0.2s ease;
}

.rsvp-card-item:hover {
  transform: translateY(-2px);
}

.rsvp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(118, 84, 58, 0.2);
  padding-bottom: 6px;
}

/* Menggunakan font tulisan tangan (handwritten) atau display agar unik */
.rsvp-card-name {
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.35rem; /* Dibuat lebih menonjol */
  color: var(--brown);
}

.rsvp-card-badge {
  font-size: 0.7rem;
  font-family: var(--f-ui, sans-serif);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px; /* Dibuat melengkung penuh (pill shape) */
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.badge-accept {
  background: var(--sage, #78866b);
}

.badge-decline {
  background: var(--burg, #b2533e);
}

/* Font ucapan diubah menggunakan gaya tulisan tangan yang manis atau serif lembut */
.rsvp-card-wish {
  font-family: var(--f-hand); /* Mengikuti gaya font tangan agar senada */
  font-size: 1.15rem; /* Ukuran diperbesar sedikit agar lebih mudah dibaca */
  line-height: 1.5;
  color: var(--ink, #333);
  margin: 0;
  padding-top: 2px;
}
/* Styling Scrollbar kustom untuk elemen #rsvpEntries (dan bisa diterapkan secara global) */
#rsvpEntries::-webkit-scrollbar {
  width: 8px; /* Lebar scrollbar lebih langsing dan rapi */
}

#rsvpEntries::-webkit-scrollbar-track {
  background: rgba(
    168,
    181,
    138,
    0.15
  ); /* Warna jalur track senada dengan background */
  border-radius: 8px;
  margin: 4px;
}

#rsvpEntries::-webkit-scrollbar-thumb {
  background: var(
    --brown,
    #76543a
  ); /* Warna batang scrollbar mengikuti tema cokelat */
  border-radius: 8px; /* Membuat sudutnya melengkung halus */
  border: 2px solid #fffef8; /* Memberikan efek ruang/border tipis di dalam track */
}

#rsvpEntries::-webkit-scrollbar-thumb:hover {
  background: var(
    --honey,
    #e9a88a
  ); /* Berubah warna sedikit saat kursor menyentuhnya */
}

/* Dukungan untuk browser Firefox */
#rsvpEntries {
  scrollbar-width: thin;
  scrollbar-color: var(--brown, #76543a) rgba(168, 181, 138, 0.15);
}

/* ---------- 10. Gift ---------- */
.gift {
  --bg: var(--cream);
  --prev: var(--blush);
}
.gift-grid {
  display: grid;
  gap: 24px;
  max-width: 780px;
  margin: 46px auto 0;
}
.gift-card {
  position: relative;
  padding: 30px 22px 26px;
  text-align: center;
  background: var(--paper);
  border: 2px solid var(--brown);
  border-radius: 16px;
  box-shadow: 4px 6px 0 var(--sage);
}
.gift-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed rgba(168, 181, 138, 0.95);
  border-radius: 11px;
  pointer-events: none;
}
.gift-card > * {
  position: relative;
}
.gift-card .bank {
  margin-top: 4px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--brown);
}
.gift-card .acc {
  display: block;
  margin: 14px 0 4px;
  font-weight: 700;
  font-size: clamp(1.45rem, 6.4vw, 1.9rem);
  letter-spacing: 0.06em;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.gift-card .holder {
  font-family: var(--f-serif);
  font-size: 1.3rem;
  font-weight: 600;
}
.gift-card .qr {
  display: block;
  width: min(62%, 190px);
  margin: 16px auto 0;
  border: 2px solid var(--brown);
  border-radius: 10px;
  background: #fff;
}
.gift-card .btn {
  margin-top: 18px;
  min-height: 48px;
  padding: 0.55em 1.4em;
  font-size: 0.98rem;
}
.gift-note {
  margin-top: 30px;
  text-align: center;
  font-size: 1.5rem;
  color: var(--olive);
}
.gift-note:empty {
  display: none;
}

/* ---------- 11. Closing ---------- */
.closing {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  --bg: var(--butter);
  --prev: var(--vanilla);
  background: radial-gradient(circle at 50% 40%, #fff4c4, var(--butter) 70%);
}
.closing .decor {
  transition: opacity 4s ease;
}
.closing.fading .decor {
  opacity: 0.28;
}
.closing .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.closing .end1 {
  font-family: var(--f-script);
  font-size: clamp(2rem, 8.5vw, 3.6rem);
  color: var(--brown);
  line-height: 1.15;
}
.closing .end-names {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 8vw, 3.4rem);
  line-height: 1.1;
  color: var(--brown);
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.closing .end-date {
  font-family: var(--f-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: clamp(0.85rem, 3vw, 1.1rem);
  color: var(--olive);
  margin-top: 4px;
}
.closing .end2 {
  font-family: var(--f-hand);
  font-size: clamp(1.5rem, 5.5vw, 2.2rem);
  color: var(--brown);
  margin-top: 16px;
  max-width: 30rem;
  line-height: 1.2;
}
.closing .again {
  margin-top: 26px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 2s,
    visibility 2s;
}
.closing.fading .again {
  opacity: 1;
  visibility: visible;
}
.credit {
  margin-top: 34px;
  font-family: var(--f-hand);
  font-size: 1.25rem;
  color: var(--olive);
}

/* ---------- 12. UI widgets ---------- */
.menu-btn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 900;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--brown);
  background: var(--sun);
  display: grid;
  place-items: center;
  box-shadow: 2px 3px 0 var(--brown);
}
.menu-btn .ic {
  font-size: 30px;
}
.menu-panel {
  position: fixed;
  top: calc(max(12px, env(safe-area-inset-top)) + 58px);
  right: 12px;
  z-index: 900;
  min-width: 200px;
  padding: 10px;
  background: var(--paper);
  border: 2px solid var(--brown);
  border-radius: 14px;
  box-shadow: 4px 6px 0 var(--honey);
  opacity: 0;
  visibility: hidden;
  translate: 0 -8px;
  transition:
    opacity 0.25s,
    translate 0.25s,
    visibility 0.25s;
}
.menu-panel.open {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}
.menu-panel a {
  display: block;
  padding: 11px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  color: var(--brown);
  min-height: 44px;
}
.menu-panel a:hover {
  background: var(--butter);
}

/* ---------- Updated Music Widget Styles ---------- */
.music {
  position: fixed;
  left: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 52px;
  height: 52px;
  padding: 0;
  background: var(--paper);
  border: 2px solid var(--brown);
  border-radius: 50%;
  box-shadow: 3px 4px 0 var(--honey);
  cursor: pointer;
  transition:
    transform 0.2s,
    background-color 0.2s;
}
.music:hover {
  transform: scale(1.06);
}
.music-icon-wrap {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--brown);
}
.music-icon-wrap svg {
  width: 100%;
  height: 100%;
}
.music .wave {
  display: none; /* Hidden by default when paused */
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
}
.music .wave i {
  display: block;
  width: 2.5px;
  height: 30%;
  background: var(--brown);
  border-radius: 2px;
}

/* When playing: hide the play/pause icon wrapper and show the animated wave */
.music.playing {
  width: auto;
  padding: 0 14px;
  border-radius: 999px;
}
.music.playing .music-icon-wrap {
  display: none;
}
.music.playing .wave {
  display: flex;
}
.music.playing .wave i {
  animation: wave 0.9s ease-in-out infinite alternate;
}
.music.playing .wave i:nth-child(2) {
  animation-delay: 0.15s;
}
.music.playing .wave i:nth-child(3) {
  animation-delay: 0.3s;
}
.music.playing .wave i:nth-child(4) {
  animation-delay: 0.45s;
}
.music.playing .wave i:nth-child(5) {
  animation-delay: 0.6s;
}
@keyframes wave {
  from {
    height: 20%;
  }
  to {
    height: 100%;
  }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + 76px);
  translate: -50% 12px;
  z-index: 850;
  max-width: min(88vw, 380px);
  padding: 10px 16px;
  background: var(--brown);
  color: var(--cream);
  border-radius: 12px;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    translate 0.3s,
    visibility 0.3s;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  translate: -50% 0;
}

.to-top {
  position: fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 800;
  width: 56px;
  height: 56px;
  border: 0;
  background: none;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s,
    transform 0.3s;
  filter: drop-shadow(0 4px 4px rgba(118, 84, 58, 0.35));
}
.to-top.show {
  opacity: 1;
  visibility: visible;
}
.to-top:hover {
  transform: translateY(-4px);
}
.to-top .ic {
  width: 56px;
  font-size: 56px;
  animation: spin 30s linear infinite;
}
.to-top .arrow {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--sun);
  pointer-events: none;
}

/* ---------- 13. Responsive ---------- */
@media (max-height: 640px) {
  .env-wrap {
    width: min(60vw, 240px, 42vh);
  }
  .intro-inner {
    gap: 8px;
  }
}
@media (min-width: 640px) {
  .g-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 24px;
  }
  .cd-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .details {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail.wide {
    grid-column: 1/-1;
  }
  .pc-in {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .gift-grid.multi {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 860px) {
  .g-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .tl-item {
    flex-direction: row;
    justify-content: center;
    gap: clamp(40px, 8vw, 90px);
  }
  .tl-item > * {
    flex: 1 1 0;
    max-width: 380px;
  }
  .tl-item .polaroid {
    margin-left: auto;
    max-width: 290px;
  }
  .tl-item .note {
    margin-right: auto;
  }
  .tl-item.flip .polaroid {
    order: 2;
    margin-left: 0;
    margin-right: auto;
  }
  .tl-item.flip .note {
    order: 1;
    margin-left: auto;
    margin-right: 0;
  }
  .tl-item .badge {
    top: 50%;
    translate: -50% -50%;
  }
}

/* Hide the custom cursor on touch devices */
@media (hover: none), (pointer: coarse) {
  #cursor {
    display: none;
  }
}

@media (max-width: 640px) {
  .card .stamp {
    display: none !important;
  }
}
/* ---------- 14. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .ambient,
  #cursor {
    display: none !important;
  }
}
/* =========================================================
   INVITATION ACCESS — Restricted / Verification Error
   Uses the existing wedding design tokens from :root
   ========================================================= */

.access-screen {
  --access-ink: var(--ink, #514638);
  --access-muted: #887c6c;
  --access-line: rgba(128, 102, 83, 0.2);

  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(24px, 5vw, 64px) 20px;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 12% 12%,
      rgba(185, 201, 168, 0.2),
      transparent 34%
    ),
    radial-gradient(
      ellipse at 88% 88%,
      rgba(239, 210, 189, 0.28),
      transparent 36%
    ),
    var(--cream, #fffdf6);
  color: var(--access-ink);
  font-family: var(--f-ui, sans-serif);
  text-align: center;
}

/* Soft decorative circles */
.access-screen::before,
.access-screen::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: clamp(180px, 32vw, 380px);
  aspect-ratio: 1;
  border: 1px solid rgba(217, 164, 65, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.access-screen::before {
  top: -160px;
  left: -130px;
  box-shadow:
    0 0 0 16px rgba(217, 164, 65, 0.035),
    0 0 0 32px rgba(217, 164, 65, 0.025);
}

.access-screen::after {
  right: -150px;
  bottom: -180px;
  box-shadow:
    0 0 0 16px rgba(185, 201, 168, 0.06),
    0 0 0 32px rgba(185, 201, 168, 0.035);
}

.access-card {
  position: relative;
  width: min(100%, 520px);
  padding: clamp(38px, 7vw, 64px) clamp(24px, 6vw, 54px);
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(217, 164, 65, 0.55);
  box-shadow:
    0 24px 60px rgba(80, 61, 43, 0.08),
    0 5px 16px rgba(80, 61, 43, 0.04);
  /* animation: access-appear 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; */
}

/* Inner ornamental frame */
.access-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(217, 164, 65, 0.3);
  pointer-events: none;
}

/* Small floral ornament */
.access-ornament {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  border: 1px solid rgba(217, 164, 65, 0.42);
  border-radius: 50%;
  background: var(--vanilla, #f8f5e9);
  color: var(--olive, #68794d);
  font-family: var(--f-script, cursive);
  font-size: 2rem;
  line-height: 1;
}

.access-eyebrow {
  margin-bottom: 12px;
  color: var(--olive, #68794d);
  font-family: var(--f-ui, sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.access-title {
  max-width: 390px;
  margin: 0 auto;
  color: var(--brown, #806653);
  font-family: var(--f-display, Georgia, serif);
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}

.access-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(220px, 70%);
  margin: 24px auto;
  color: var(--honey, #d9a441);
}

.access-divider::before,
.access-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.65));
}

.access-divider::after {
  transform: rotate(180deg);
}

.access-message {
  max-width: 360px;
  margin: 0 auto;
  color: var(--access-ink);
  font-family: var(--f-serif, Georgia, serif);
  font-size: clamp(1.15rem, 3.8vw, 1.35rem);
  line-height: 1.5;
}

.access-note {
  max-width: 340px;
  margin: 14px auto 0;
  color: var(--access-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.access-footer {
  margin-top: 34px;
  color: var(--olive, #68794d);
  font-family: var(--f-hand, cursive);
  font-size: 1.35rem;
}

.access-footer::before {
  content: "✿";
  display: block;
  margin-bottom: 8px;
  color: var(--honey, #d9a441);
  font-family: var(--f-ui, sans-serif);
  font-size: 1rem;
}

@keyframes access-appear {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .access-card {
    padding: 42px 25px;
  }

  .access-card::before {
    inset: 8px;
  }

  .access-ornament {
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-card {
    animation: none;
  }
}
.intro-line:not(.words) {
  opacity: 0;
}
