/* =========================================================
   Undangan Thomas & Tyas — style
   ========================================================= */
:root {
  --col: 480px;
  --cream: #fdf9f6;
  --cream-2: #efe6d8;
  --maroon: #5c1116;
  --maroon-2: #3f0a0e;
  --green: #2f4a2c;
  --green-dark: #17221a;
  --gold: #c9a24a;
  --olive: #717900;
  --ink: #3a2a24;
  --f-script: "Pinyon Script", cursive;
  --f-std: "Mrs Saint Delafield", cursive;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-body: "Quattrocento", Georgia, serif;
  --f-caps: "Cinzel", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--green-dark);
  color: var(--cream);
  font-family: var(--f-body);
  line-height: 1.55;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100vh; height: 100dvh; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.script { font-family: var(--f-script); font-weight: 400; }

/* ---------- Layout column ---------- */
.main, .cover {
  width: 100%;
  max-width: var(--col);
  margin-left: auto;
  margin-right: auto;
}
.main { position: relative; overflow: hidden; box-shadow: 0 0 60px rgba(0,0,0,.6); }
section { position: relative; overflow: hidden; }

/* ---------- Backgrounds ---------- */
.bg-curtain {
  background: #142017 url("../assets/img/curtain.webp") center bottom / cover no-repeat;
}
.bg-curtain-only {
  background: #142017 url("../assets/img/curtain-only.webp") center top / cover no-repeat;
}
.bg-maroon {
  background: var(--maroon) url("../assets/img/velvet-maroon.webp") center / 100% auto repeat-y;
}
.bg-maroon-dark {
  background:
    linear-gradient(180deg, rgba(40,4,8,.55), rgba(40,4,8,.25)),
    var(--maroon) url("../assets/img/velvet-maroon.webp") center / 100% auto repeat-y;
}
.bg-green {
  background: var(--green) url("../assets/img/texture-green.webp") center / 100% auto repeat-y;
}

/* ---------- Desktop side panel ---------- */
.side { display: none; }
@media (min-width: 1000px) {
  .side {
    display: flex;
    position: fixed;
    inset: 0 var(--col) 0 0;
    align-items: center;
    justify-content: center;
    background:
      linear-gradient(90deg, rgba(10,18,12,.35), rgba(10,18,12,.75)),
      url("../assets/img/curtain-only.webp") center / cover;
    text-align: center;
  }
  .main, .cover { margin-right: 0; }
  .side__pre { font-family: var(--f-caps); letter-spacing: .35em; font-size: 14px; margin: 0; opacity: .85; }
  .side__names { font-family: var(--f-script); font-weight: 400; font-size: clamp(64px, 7vw, 110px); margin: 10px 0; line-height: 1.1; }
  .side__amp { font-family: var(--f-serif); font-style: italic; font-size: .5em; vertical-align: .08em; margin: 0 10px; }
  .side__date { font-family: var(--f-caps); letter-spacing: .25em; font-size: 15px; opacity: .85; }
}

/* =========================================================
   COVER
   ========================================================= */
.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
}
.cover__half {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  overflow: hidden;
  transition: transform 1.6s cubic-bezier(.7,0,.25,1);
}
.cover__half--l { left: 0; }
.cover__half--r { right: 0; }
.cover__half-bg {
  position: absolute;
  top: 0; bottom: 0;
  width: 200%;
  background: #142017 url("../assets/img/curtain.webp") center bottom / cover no-repeat;
}
.cover__half--l .cover__half-bg { left: 0; }
.cover__half--r .cover__half-bg { right: 0; }
.cover__half--l { box-shadow: 8px 0 20px rgba(0,0,0,0); }

.cover__content {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4vh 0 24vh;
  text-align: center;
  transition: opacity .8s ease, transform .8s ease;
}
.cover__title { margin-bottom: 2vh; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.cover__were { font-size: clamp(38px, 11vw, 52px); margin: 0; line-height: 1; }
.cover__getting {
  font-family: var(--f-serif);
  font-size: clamp(26px, 7.4vw, 36px);
  letter-spacing: .03em;
  margin: -10px 0 0;
}
.cover__cap { font-size: 1.7em; letter-spacing: 0; margin-right: 2px; }
.cover__names { font-size: clamp(42px, 12.5vw, 62px); margin: -8px 0 0; line-height: 1; }
.cover__amp { font-family: var(--f-serif); font-style: italic; font-size: .55em; vertical-align: .08em; margin: 0 6px; }

.envelope {
  position: relative;
  width: 50%;
  background: none;
  border: 0;
  padding: 0;
  margin: 3vh 0 2vh;
  animation: floaty 4s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.envelope__paper { width: 100%; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.envelope__seal {
  position: absolute;
  width: 20%;
  left: 40%;
  top: 37%;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.4));
  transition: transform .6s ease, opacity .6s ease;
  animation: pulse 2.4s ease-in-out infinite, seal-spin 9s linear infinite;
}
.envelope__flower { position: absolute; pointer-events: none; }
.envelope__flower--tl { width: 47%; left: -24%; top: -36%; z-index: 2; }
.envelope__flower--br { width: 30%; right: -9%; bottom: -33%; z-index: 2; }
.envelope:hover .envelope__seal { animation-play-state: paused; transform: scale(1.08) rotate(-6deg); }
.envelope:focus-visible { outline: 2px dashed var(--cream); outline-offset: 8px; }

.cover__guest { font-family: var(--f-serif); font-size: 15px; margin-top: 4vh; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.cover__guest p { margin: 0; }
.cover__guest-name { font-size: 22px; font-weight: 600; margin-top: 4px !important; }
.cover__hint {
  font-family: var(--f-serif);
  letter-spacing: .18em;
  font-size: 13px;
  margin: 2.2vh 0 0;
  animation: blink 2s ease-in-out infinite;
}
.cover__floor { position: absolute; z-index: 4; bottom: -2%; pointer-events: none; transition: transform 1.4s ease, opacity 1.2s ease; }
.cover__floor--l { width: 34%; left: -12%; transform: scaleX(-1); }
.cover__floor--r { width: 40%; right: -12%; }

/* opened state */
.cover.is-opening .envelope__seal { transform: scale(1.6) rotate(25deg); opacity: 0; animation: none; }
.cover.is-opening .cover__content { opacity: 0; transform: scale(1.08); transition-delay: .25s; }
.cover.is-opening .cover__half--l { transform: translateX(-102%); transition-delay: .6s; }
.cover.is-opening .cover__half--r { transform: translateX(102%); transition-delay: .6s; }
.cover.is-opening .cover__floor--l { transform: scaleX(-1) translateX(80%); opacity: 0; transition-delay: .5s; }
.cover.is-opening .cover__floor--r { transform: translateX(80%); opacity: 0; transition-delay: .5s; }
.cover.is-opening .sparkles { opacity: 0; }
.cover.is-gone { display: none; }

/* sparkles */
.sparkles { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity .6s; }
.sparkles i {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #fff7d6;
  box-shadow: 0 0 6px 2px rgba(255,236,170,.7);
  animation: twinkle var(--d, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0;
}

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%,100% { filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); } 50% { filter: drop-shadow(0 0 14px rgba(255,200,170,.55)); } }
@keyframes seal-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes twinkle { 0%,100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }

/* =========================================================
   OPENING (envelope + lace quote)
   ========================================================= */
.s-open { padding: 6% 0 0; }
.open-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 500 / 760;
  container-type: inline-size;
}
.os { position: absolute; }
.os-back   { left: 15.6%; width: 68.4%; top: 51.4%; }
.os-lining {
  left: 17.5%; width: 65%; top: 65.4%; height: 18%;
  background: var(--maroon) url("../assets/img/velvet-maroon.webp") center / cover;
}
.os-lace {
  left: 16%; width: 68%; top: 2%;
  aspect-ratio: 800 / 1139;
  background: url("../assets/img/lace-oval.webp") center / contain no-repeat;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
  display: flex; align-items: center; justify-content: center;
}
.lace-text {
  width: 64%;
  color: var(--ink);
  text-align: center;
  font-family: var(--f-body);
  font-size: 12.5px;
  font-size: 2.6cqw;
  line-height: 1.42;
}
.lace-text p { margin: 0; }
.lace-src { margin-top: 1.2em !important; font-weight: 700; }
.os-flower { left: 0; width: 36%; top: -3%; }
.os-tassel { left: 43%; width: 14%; top: 67.4%; filter: drop-shadow(0 4px 4px rgba(0,0,0,.4)); transform-origin: 50% 4%; animation: sway 5s ease-in-out infinite; }
.os-front  { left: 15.6%; width: 68.4%; top: 76%; filter: drop-shadow(0 -2px 3px rgba(0,0,0,.15)); }
.os-floor  { left: 60%; width: 38%; top: 72%; }

@keyframes sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* player */
.player { position: relative; text-align: center; padding: 6% 0 12%; }
.player__meta { font-family: var(--f-serif); font-size: 14px; letter-spacing: .04em; margin: 0 0 10px; opacity: .9; }
.player__bar {
  position: relative;
  width: 62%;
  height: 3px;
  margin: 0 auto 14px;
  background: rgba(253,249,246,.45);
  border-radius: 3px;
  cursor: pointer;
  touch-action: none;
}
.player__bar::before { content: ""; position: absolute; inset: -10px 0; } /* bigger hit area */
.player__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--cream); border-radius: 3px; }
.player__knob {
  position: absolute; top: 50%; left: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--cream);
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.player__controls { display: flex; align-items: center; justify-content: center; gap: 24px; }
.pbtn { background: none; border: 0; padding: 4px; width: 34px; height: 34px; opacity: .92; transition: transform .2s, opacity .2s; }
.pbtn svg { width: 100%; height: 100%; fill: none; stroke: var(--cream); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pbtn svg .fill { fill: var(--cream); }
.pbtn:hover { transform: scale(1.1); }
.pbtn.is-on { opacity: 1; }
.pbtn.is-on svg { stroke: #ffd9a8; }
.pbtn#pShuffle:not(.is-on), .pbtn#pRepeat:not(.is-on) { opacity: .6; }
.pbtn--play { width: 52px; height: 52px; border-radius: 50%; background: var(--cream-2); padding: 13px; }
.pbtn--play svg .fill { fill: var(--green-dark); }
.pbtn--play svg { stroke: none; }
.pbtn--play .i-pause { display: none; }
.is-playing .pbtn--play .i-play { display: none; }
.is-playing .pbtn--play .i-pause { display: block; }
.player__hint { font-family: var(--f-serif); font-size: 15px; margin: 14px 0 0; opacity: .9; }

/* =========================================================
   GENERIC
   ========================================================= */
.section-title {
  font-size: clamp(52px, 14vw, 68px);
  line-height: 1.1;
  margin: 0 0 18px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.deco { position: absolute; pointer-events: none; z-index: 1; }

.btn {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 8px;
  background: #6d0f12;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--f-body);
  font-size: 16px;
  border: 1px solid rgba(253,249,246,.2);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); background: #821519; }
.btn--ghost { background: transparent; border-color: rgba(253,249,246,.6); }
.btn--ghost:hover { background: rgba(253,249,246,.12); }
.btn--block { display: block; width: 100%; border: 0; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 10px 0 0; }

/* reveal animations */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s ease; }
[data-reveal="fade"] { transform: none; }
[data-reveal="rise"] { transform: translateY(32%); transition-duration: 1.6s; }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .envelope, .os-tassel, .envelope__seal, .cover__hint, .date-row__day { animation: none; }
}

/* =========================================================
   MEMPELAI
   ========================================================= */
.s-couple { padding: 70px 0 120px; text-align: center; }
.bismillah { font-family: "Amiri", serif; font-size: clamp(30px, 8.5vw, 40px); margin: 0 0 22px; direction: rtl; }
.couple-intro { font-family: var(--f-body); font-size: 15.5px; margin: 0 24px 50px; line-height: 1.4; }
.person {
  position: relative; z-index: 2;
  display: flex;
  align-items: center;
  gap: 4%;
  padding: 0 6%;
}
.person--right { flex-direction: row; }
.arch { position: relative; flex: 0 0 44%; aspect-ratio: 600 / 716; }
.arch__frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.arch__photo {
  position: absolute;
  left: 14.5%; right: 14.5%; top: 4.5%; bottom: 4.5%;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(#cfe9fb, #eaf6fe 60%, #b9d77a 61%, #8aa31a);
}
.arch__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__info { flex: 1; text-align: left; }
.person--right .person__info { text-align: right; }
.person__name { font-size: clamp(30px, 8.4vw, 40px); margin: 0 0 6px; line-height: 1.1; }
.person__parents { font-family: var(--f-serif); font-size: 15px; margin: 0; line-height: 1.3; }
.person__ig { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; text-decoration: none; border: 1px solid rgba(253,249,246,.5); padding: 4px 12px; border-radius: 999px; }
.amp { font-family: var(--f-serif); font-style: italic; font-size: 34px; margin: 18px 0; position: relative; z-index: 2; }
.deco--floor-l { width: 30%; left: -3%; bottom: -2%; transform: scaleX(-1); }
.deco--hang-r { width: 22%; right: -6%; bottom: -12%; transform: rotate(-4deg); }

/* placeholder for missing photos */
.ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--f-serif); font-size: 13px; letter-spacing: .05em;
  color: rgba(58,42,36,.7);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.9) 0 12%, transparent 13%),
    linear-gradient(#cfe9fb, #eaf6fe 62%, #b9d77a 63%, #8aa31a);
  padding: 8px;
}

/* =========================================================
   SAVE THE DATE
   ========================================================= */
.s-date { padding: 60px 0 80px; text-align: center; }
.std { position: relative; font-family: var(--f-std); line-height: .8; margin: 0 auto 26px; width: 90%; height: 290px; height: 72cqw; container-type: inline-size; }
.s-date { container-type: inline-size; }
.std span { position: absolute; display: block; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.std__save { font-size: 150px; font-size: 36cqw; left: 6%; top: 0; }
.std__the  { font-size: 64px; font-size: 15cqw; left: 31%; top: 100px; top: 25cqw; }
.std__date { font-size: 150px; font-size: 36cqw; left: 16%; top: 160px; top: 38cqw; }
.std__butterfly { position: absolute; width: 13%; right: 4%; top: 52%; transform: rotate(-15deg); animation: flutter 3s ease-in-out infinite; }
@keyframes flutter { 0%,100% { transform: rotate(-15deg) translateY(0); } 50% { transform: rotate(-8deg) translateY(-6px); } }

.date-row { margin: 0 auto 26px; width: 92%; }
.date-row__month, .date-row__year { font-family: var(--f-body); font-size: 19px; letter-spacing: .06em; margin: 0; }
.date-row__mid { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0; }
.date-row__side {
  flex: 1;
  padding: 10px 0;
  border-top: 2px solid var(--cream);
  border-bottom: 2px solid var(--cream);
  display: flex; flex-direction: column; align-items: center;
}
.date-row__side .script { font-size: 34px; line-height: 1.1; }
.date-row__side small { font-size: 14px; }
.date-row__day { font-family: var(--f-body); font-weight: 700; font-size: 42px; margin: 0; min-width: 64px; display: inline-block; animation: day-pulse 2.6s ease-in-out infinite; }
@keyframes day-pulse { 0%,100% { transform: scale(1); text-shadow: 0 0 0 rgba(234,216,192,0); } 50% { transform: scale(1.1); text-shadow: 0 0 18px rgba(234,216,192,.65); } }

.countdown { display: flex; justify-content: center; gap: 10px; margin: 6px 0 30px; }
.countdown div {
  width: 68px; padding: 10px 0 8px;
  border: 1px solid rgba(253,249,246,.45);
  border-radius: 999px 999px 12px 12px;
  background: rgba(0,0,0,.12);
  display: flex; flex-direction: column;
}
.countdown b { font-family: var(--f-body); font-size: 24px; line-height: 1.1; }
.countdown span { font-size: 12px; letter-spacing: .08em; opacity: .85; }
.countdown-done { font-family: var(--f-serif); font-size: 18px; margin: 0 0 30px; }

.venue-img { width: 92%; margin: 0 auto 40px; opacity: .92; }

.event { margin: 0 auto 36px; padding: 0 22px; }
.event__title { font-family: var(--f-script); font-size: 56px; margin: 0 0 14px; line-height: 1.1; }
.event__date { font-weight: 700; letter-spacing: .08em; margin: 0; font-size: 16px; }
.event__time { letter-spacing: .12em; margin: 2px 0 20px; font-size: 15px; }
.event__venue { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 4px; font-size: 15px; }
.event__addr { margin: 0; letter-spacing: .06em; line-height: 1.75; font-size: 15px; }
.lily { width: 34%; margin: -4px auto 26px; }

.dress { margin-top: 56px; }
.dress p { letter-spacing: .1em; margin: 0 0 18px; }
.dress__colors { display: flex; gap: 10px; justify-content: center; }
.dress__colors span { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* =========================================================
   GIFT
   ========================================================= */
.s-gift { padding: 70px 0 110px; text-align: center; }
.s-gift > *:not(.deco) { position: relative; z-index: 2; }
.deco--hang-tl { width: 20%; left: -3%; top: -2%; }
.deco--hang-tr { width: 20%; right: -3%; top: -2%; transform: scaleX(-1); }
.deco--floor-l2 { width: 28%; left: -4%; top: 52%; transform: scaleX(-1); }
.deco--floor-r2 { width: 24%; right: -4%; bottom: 0; }
.gift-icon { width: 76px; height: 66px; margin: 0 auto 26px; display: block; fill: none; stroke: var(--cream); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.gift-text { font-family: var(--f-serif); font-size: 18px; margin: 0 32px 34px; line-height: 1.6; }
.gift-card { margin: 0 auto 34px; font-family: var(--f-serif); }
.gift-card__num { font-size: 26px; font-weight: 600; letter-spacing: .04em; margin: 0; }
.gift-card__bank, .gift-card__holder { font-size: 18px; margin: 0; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  padding: 5px 14px;
  border: 0; border-radius: 6px;
  background: var(--olive);
  font-family: var(--f-body); font-size: 13px;
  transition: transform .15s, background .2s;
}
.copy-btn:hover { transform: translateY(-1px); background: #858f05; }
.copy-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.gift-address { font-family: var(--f-serif); font-size: 17px; margin: -16px 32px 26px; }
.contacts { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 0 12px; }
.contact {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 160px; height: 84px;
  text-decoration: none;
  font-family: "Courier New", monospace;
  letter-spacing: .08em;
  font-size: 14px;
}
.contact::before, .contact::after {
  content: ""; position: absolute; inset: 0;
  border: 1.5px solid var(--cream);
  border-radius: 50%;
  transform: rotate(-4deg);
}
.contact::after { inset: 3px -4px; transform: rotate(3deg); opacity: .55; }
.contact b { font-weight: 400; }

/* =========================================================
   RSVP
   ========================================================= */
.s-rsvp { padding: 70px 22px 80px; }
.rsvp-sub { text-align: center; font-family: var(--f-serif); font-size: 17px; margin: -6px 0 26px; }
.rsvp-form {
  background: rgba(253,249,246,.08);
  border: 1px solid rgba(253,249,246,.18);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; opacity: .85; }
.field input:not([type=radio]), .field select, .field textarea {
  width: 100%;
  background: rgba(253,249,246,.95);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 13px;
  font-family: var(--f-body);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,74,.3); }
.attend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.attend label { position: relative; }
.attend input { position: absolute; opacity: 0; pointer-events: none; }
.attend span {
  display: block; text-align: center;
  padding: 12px 6px;
  border-radius: 10px;
  border: 1px solid rgba(253,249,246,.35);
  background: rgba(253,249,246,.06);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.attend input:checked + span { background: rgba(253,249,246,.92); color: var(--maroon); border-color: var(--cream); font-weight: 700; }
.attend input:focus-visible + span { outline: 2px solid var(--gold); }
.rsvp-note { margin: 12px 0 0; font-size: 14px; text-align: center; }
.rsvp-note.err { color: #ffc2b8; }

.wishes { margin-top: 30px; }
.wishes__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.wishes__head h3 { margin: 0; font-family: var(--f-body); font-size: 18px; }
.wishes__stats { font-size: 13px; opacity: .85; }
.wishes__list { list-style: none; margin: 0; padding: 0 4px 0 0; max-height: 440px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(253,249,246,.4) transparent; }
.wish {
  display: flex; gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(253,249,246,.09);
  border: 1px solid rgba(253,249,246,.12);
}
.wish__avatar { flex: 0 0 36px; height: 36px; border-radius: 50%; background: rgba(253,249,246,.2); display: flex; align-items: center; justify-content: center; font-weight: 700; text-transform: uppercase; }
.wish__body { min-width: 0; flex: 1; }
.wish__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wish__name { font-weight: 700; }
.wish__badge { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: rgba(113,121,0,.85); }
.wish__badge.no { background: rgba(253,249,246,.22); }
.wish__msg { margin: 4px 0 2px; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wish__time { font-size: 12px; opacity: .65; }
.wishes__empty { text-align: center; opacity: .7; font-size: 14px; padding: 16px; }

/* =========================================================
   LOVE STORY
   ========================================================= */
.s-story { padding: 30px 0 80px; }
.polaroids { position: relative; height: 290px; margin-bottom: 10px; }
.polaroid { position: absolute; width: 38%; aspect-ratio: 420 / 486; }
.polaroid__paper { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.polaroid__photo { position: absolute; overflow: hidden; left: 10%; right: 10%; top: 9%; bottom: 25%; }
.polaroid--1 { left: 21%; top: 30px; transform: rotate(-12deg); }
.polaroid--1 .polaroid__photo { transform: none; }
.polaroid--2 { left: 45%; top: 12px; transform: rotate(10deg); }
.polaroid__photo img { width: 100%; height: 100%; object-fit: cover; }
.polaroids__seal { position: absolute; width: 14%; left: 25%; top: 200px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.4)); }
.polaroids__flower { position: absolute; width: 22%; left: 64%; top: -20px; }
.timeline { list-style: none; padding: 0 34px 0 50px; margin: 10px 0 0; }
.timeline li { position: relative; margin-bottom: 26px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -32px; top: 10px;
  width: 16px; height: 15px;
  background: var(--cream);
  clip-path: path("M8 15 C8 15 0 9 0 4.5 C0 2 2 0 4.3 0 C6 0 7.3 1 8 2.3 C8.7 1 10 0 11.7 0 C14 0 16 2 16 4.5 C16 9 8 15 8 15Z");
}
.timeline h3 { font-family: var(--f-script); font-weight: 400; font-size: 34px; margin: 0 0 4px; line-height: 1.2; }
.timeline p { margin: 0; text-align: justify; font-size: 14.5px; line-height: 1.55; }

/* =========================================================
   GALLERY
   ========================================================= */
.s-gallery { padding: 70px 22px 50px; }
.gallery {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-auto-rows: 150px;
  gap: 6px;
}
.gallery button { padding: 0; border: 0; background: none; overflow: hidden; position: relative; }
.gallery img, .gallery .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery button:hover img { transform: scale(1.05); }
.gallery button:nth-child(6n+1) { grid-column: 1; }
.gallery button:nth-child(6n+2) { grid-column: 2; grid-row: span 2; }
.gallery button:nth-child(6n+3) { grid-column: 1; }
.gallery button:nth-child(6n+4) { grid-column: 1 / span 2; grid-row: span 2; }
.gallery button:nth-child(6n+5) { grid-column: 1; }
.gallery button:nth-child(6n+6) { grid-column: 2; }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,6,6,.92);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .25s ease;
}
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-btn { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 28px; line-height: 1; }
.lb-close { top: 16px; right: 16px; font-size: 20px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@keyframes fadeIn { from { opacity: 0; } }

/* =========================================================
   CLOSING
   ========================================================= */
.s-close { padding: 40px 0 0; }
.deco--close-l { width: 34%; left: -4%; top: -3%; }
.deco--close-r { width: 34%; right: -4%; top: -3%; transform: scaleX(-1); }
.close-stage { position: relative; width: 100%; aspect-ratio: 500 / 860; z-index: 2; container-type: inline-size; }
.cs { position: absolute; }
.cs-back { left: 15%; width: 70%; top: 54%; }
.cs-lining {
  left: 17%; width: 66%; top: 69%; height: 14%;
  background: var(--maroon) url("../assets/img/velvet-maroon.webp") center / cover;
}
.cs-frame {
  left: 12%; width: 76%; top: 6%;
  aspect-ratio: 800 / 1236;
  background: url("../assets/img/ornate-frame.webp") center / contain no-repeat;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.4));
  display: flex; align-items: center; justify-content: center;
}
.frame-text { width: 58%; text-align: center; font-family: var(--f-body); font-size: 12px; font-size: 2.45cqw; line-height: 1.5; margin-top: 4%; }
.frame-text p { margin: 0 0 1em; }
.frame-names { font-size: 46px; font-size: 9.5cqw; line-height: 1 !important; margin-top: 1em !important; }
.frame-names small { font-family: var(--f-serif); font-style: italic; font-size: .4em; }
.frame-butterfly { position: absolute; width: 14%; right: 1%; top: 3%; transform: rotate(18deg); animation: flutter 3.4s ease-in-out infinite; }
.cs-tassel { left: 43.5%; width: 13%; top: 66%; transform-origin: 50% 4%; animation: sway 5s ease-in-out infinite; }
.cs-front { left: 15%; width: 70%; top: 76%; }
.cs-floor { left: 60%; width: 40%; top: 76%; }
.footer { position: relative; z-index: 2; text-align: center; padding: 20px 0 34px; font-family: var(--f-serif); background: linear-gradient(transparent, rgba(0,0,0,.45)); }
.footer p { margin: 0; letter-spacing: .1em; }
.footer__small { font-size: 12px; opacity: .7; margin-top: 4px !important; }

/* =========================================================
   FLOATING MUSIC BUTTON + TOAST
   ========================================================= */
.music-fab {
  position: fixed;
  z-index: 60;
  right: max(16px, calc((100vw - var(--col)) / 2 + 16px));
  bottom: 18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(253,249,246,.5);
  background: rgba(92,17,22,.85);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
@media (min-width: 1000px) { .music-fab { right: 18px; } }
.music-fab svg { width: 22px; height: 22px; fill: none; stroke: var(--cream); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.music-fab.is-playing { animation: spin 6s linear infinite; }
.music-fab:not(.is-playing)::after { content: ""; position: absolute; width: 60%; height: 2px; background: var(--cream); transform: rotate(-45deg); border-radius: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 80px; z-index: 120;
  transform: translate(-50%, 20px);
  background: rgba(20,14,12,.92);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1000px) { .toast { left: calc(100% - var(--col) / 2); } }

/* Layar pendek (HP kecil / laptop landscape) */
@media (max-height: 720px) {
  .cover__content { padding: 2vh 0 16vh; }
  .envelope { width: 46%; margin: 2vh 0 1vh; }
  .cover__were { font-size: 36px; }
  .cover__getting { font-size: 21px; }
  .cover__names { font-size: 42px; }
  .cover__guest { margin-top: 2.5vh; }
}

