:root{--wine:#26090d;--wine2:#4a1118;--gold:#d9b56a;--gold2:#f3d99d;--cream:#f5ead4;--serif:'Cormorant Garamond',Georgia,serif;--sans:'DM Sans',Arial,sans-serif}
*{box-sizing:border-box}html{scroll-behavior:auto;scroll-padding-top:18px;background:#140608}body{margin:0;min-height:100vh;color:var(--cream);font-family:var(--sans);background:radial-gradient(ellipse at 50% 12%,#552127 0,#210b0f 43%,#100608 100%)}button,a{font:inherit}.ambient{position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 13% 32%,#b88b4930,transparent 28%),radial-gradient(circle at 88% 72%,#8d4d3820,transparent 30%)}.page-progress{position:fixed;z-index:20;top:0;left:0;right:0;height:3px;background:#fff1}.page-progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,#a87535,#f7dfa0);box-shadow:0 0 12px #e8c77b;transition:width .1s}.invitation{position:relative;width:min(100%,590px);margin:0 auto;background:#1b090c;box-shadow:0 0 90px #0009;overflow:hidden;border-inline:1px solid #b48a4a38}.section{position:relative;isolation:isolate}.cover{height:min(100svh,1050px);min-height:690px;display:flex;align-items:end;justify-content:center;overflow:hidden;background:#16080a}.cover-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center}.cover-vignette{position:absolute;inset:0;background:linear-gradient(180deg,#12060855 0%,transparent 28%,transparent 48%,#120608bb 100%);z-index:1}.cover-topline{position:absolute;z-index:2;top:max(24px,env(safe-area-inset-top));left:0;right:0;display:flex;align-items:center;justify-content:center;gap:12px;color:#f2d69b;font:11px var(--sans);letter-spacing:.28em;text-shadow:0 2px 8px #000}.cover-topline i{width:25px;height:1px;background:var(--gold)}.cover-actions{position:relative;z-index:2;width:100%;padding:20px 20px max(56px,env(safe-area-inset-bottom));text-align:center;color:#fff2d7;text-shadow:0 2px 12px #000;transition:opacity .65s ease,transform .65s ease}.cover-to{margin:0 0 3px;font:17px var(--serif);letter-spacing:.08em}.guest-name{font:600 23px var(--serif);margin:0}.cover-actions small{display:block;margin-top:12px;font-size:10px;letter-spacing:.06em;color:#f7e8c9}.gold-button{border:1px solid #f4d58f;border-radius:999px;padding:13px 25px;background:linear-gradient(135deg,#f1d28d,#b77e36);color:#35100d;font-weight:600;letter-spacing:.08em;box-shadow:0 5px 24px #0006;cursor:pointer;transition:transform .25s,filter .25s}.gold-button:hover{filter:brightness(1.08);transform:translateY(-2px)}.cover-actions .gold-button{margin-top:17px}.cover-actions.is-opened{opacity:0;transform:translateY(18px);pointer-events:none}.cover-bottom-mark{position:absolute;z-index:2;bottom:17px;left:0;right:0;text-align:center;color:#f2d69b;font:9px var(--sans);letter-spacing:.12em;opacity:.8}.section-nav{position:sticky;z-index:8;top:0;display:flex;justify-content:center;gap:clamp(18px,5vw,34px);padding:13px 10px;background:#21090deF;border-block:1px solid #c49b5d55;backdrop-filter:blur(12px)}.section-nav[hidden]{display:none}.section-nav a{color:#e7c986;text-decoration:none;font:11px var(--sans);letter-spacing:.12em;opacity:.8}.section-nav a:hover,.section-nav a.active{color:#fff0c9;opacity:1}.art-section,.event-section,.wishes-section{padding:34px 0 30px;background:linear-gradient(180deg,#2a0b10,#21090d)}.art-section>img,.wishes-section>img{display:block;width:100%;height:auto}.section-heading{text-align:center;padding:8px 18px 20px}.eyebrow{font-size:10px;letter-spacing:.3em;color:var(--gold);margin:0 0 8px}.section-heading h2,.countdown-panel h2,.rsvp-form h2{font:500 clamp(34px,8vw,46px)/1 var(--serif);margin:0;color:#f2d99e}.ornament{margin-top:12px;color:#cda65d;font-size:18px}.section-kicker{text-align:center;color:#dfc58f;font:21px var(--serif);padding:0 0 18px}.section-caption{display:flex;align-items:center;gap:14px;padding:14px 22px 0;color:#dfc58f}.section-caption span{font:12px var(--sans);letter-spacing:.15em;border-right:1px solid #b99050;padding-right:14px}.section-caption p{font:italic 16px var(--serif);margin:0}.event-section{padding-bottom:42px}.event-art-wrap{position:relative}.event-art-wrap>img{display:block;width:100%;height:auto}.map-hotspot{position:absolute;left:27%;right:27%;top:59%;height:7%;border-radius:40px}.event-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;padding:18px 14px 0}.outline-button{display:inline-flex;align-items:center;gap:8px;padding:11px 15px;border:1px solid #c69c5d;border-radius:999px;background:#2c0c11;color:#f0d69d;text-decoration:none;font-size:11px;letter-spacing:.04em;cursor:pointer}.outline-button span{font-size:16px}.gallery-section{padding-top:35px}.countdown-panel{padding:44px 18px 40px;text-align:center;background:radial-gradient(ellipse at top,#6b2925,#2a090c 68%);border-block:1px solid #b88a4c}.countdown-panel h2{margin:0 0 24px}.countdown-panel h2 span{color:var(--gold)}.countdown{display:flex;justify-content:center;align-items:center;gap:clamp(8px,3vw,20px)}.countdown div{display:grid;gap:4px;min-width:43px}.countdown strong{font:600 clamp(25px,6vw,34px) var(--serif);color:#fff0c9;font-variant-numeric:tabular-nums}.countdown span{font-size:9px;letter-spacing:.1em;color:#d9bd8b}.countdown>b{font:22px var(--serif);color:#9b7441;align-self:start;margin-top:2px}.date-line{font:16px var(--serif);color:#e8d5b2;margin:22px 0 0}.wishes-section{text-align:center;padding-bottom:42px}.rsvp-main{margin:22px auto 0;min-width:220px}.wishes-note{font:italic 16px var(--serif);color:#e4c995;margin:15px 20px 0}.closing-section{background:#f2e4c9}.closing-section>img{display:block;width:100%;height:auto}.back-top{display:block;text-align:center;padding:0 0 24px;margin-top:-4px;background:#f2e4c9;color:#5a2419;text-decoration:none;font:13px var(--sans);letter-spacing:.08em}footer{text-align:center;padding:20px 12px 30px;font:italic 15px var(--serif);color:#d7b878;background:#21090c}footer span{color:#c69a51;padding:0 8px}.floating-controls{position:fixed;z-index:12;right:max(14px,calc((100vw - 590px)/2 + 14px));bottom:max(16px,env(safe-area-inset-bottom));display:flex;gap:9px}.floating-controls[hidden]{display:none}.round-button{width:44px;height:44px;display:grid;place-items:center;border:1px solid #e3c27c;border-radius:50%;background:#351014ef;color:#f8dfaa;text-decoration:none;font-size:19px;box-shadow:0 4px 18px #0008;cursor:pointer}.round-button.is-playing{background:#c69a51;color:#2c0b0d}.rsvp-dialog{width:min(92vw,430px);max-height:90svh;padding:0;border:1px solid #c9a35e;border-radius:18px;background:#2b0c10;color:var(--cream);box-shadow:0 20px 80px #000b}.rsvp-dialog::backdrop{background:#090304c9;backdrop-filter:blur(5px)}.rsvp-form{position:relative;padding:32px 25px 25px;display:grid;gap:13px}.rsvp-form h2{font-size:34px}.dialog-intro{font:16px/1.45 var(--serif);color:#e2cba6;margin:0 0 4px}.dialog-close{position:absolute;right:14px;top:10px;border:0;background:none;color:#e9ce93;font-size:30px;cursor:pointer}.rsvp-form label{display:grid;gap:6px;font-size:12px;color:#e9d4b0}.rsvp-form input,.rsvp-form select,.rsvp-form textarea{width:100%;border:1px solid #9e7544;border-radius:8px;padding:11px;background:#42171b;color:#fff3dc;font:14px var(--sans)}.rsvp-form input::placeholder,.rsvp-form textarea::placeholder{color:#c6a98b}.submit-button{margin-top:4px}.form-note{font-size:10px;line-height:1.5;color:#cdb48f;margin:0}.toast{position:fixed;z-index:30;left:50%;bottom:78px;transform:translateX(-50%);padding:12px 18px;border:1px solid var(--gold);border-radius:999px;background:#321014;color:#f9e7bf;font-size:12px;box-shadow:0 5px 24px #0008;max-width:90vw;text-align:center}.reveal{opacity:0;transform:translateY(24px);transition:opacity .8s ease,transform .8s cubic-bezier(.2,.7,.2,1)}.reveal.is-visible{opacity:1;transform:none}
@media(min-width:700px){.cover{height:1050px;min-height:0}.invitation{margin:24px auto;border:1px solid #9d7543}.section-nav{top:0}.floating-controls{right:calc((100vw - 590px)/2 + 18px)}}
@media(max-width:380px){.cover{min-height:620px}.section-nav{gap:15px}.section-nav a{font-size:10px}.countdown{gap:7px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}.reveal{opacity:1;transform:none}}


/* Opening sequence: envelope -> cinematic video -> couple cover */
body.pre-opening{overflow:hidden}
.entry-screen,.video-screen{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:#090607;overflow:hidden}
.entry-screen[hidden],.video-screen[hidden]{display:none}
.entry-screen>img{position:absolute;width:100%;height:100%;object-fit:contain;object-position:center;background:#090607}
.entry-shade{position:absolute;inset:0;background:linear-gradient(180deg,#09060712 35%,#09060788 100%)}
.entry-content{position:absolute;left:0;right:0;bottom:max(82px,calc(env(safe-area-inset-bottom) + 48px));padding:22px 18px 18px;text-align:center;color:#f8e6bd;text-shadow:0 2px 14px #000;animation:entryRise 1.2s both}
.entry-label{font-size:10px;letter-spacing:.35em;margin:0 0 4px;color:#f3d49a}
.entry-names{font:500 clamp(42px,10vw,64px)/.95 var(--serif);margin:0 0 18px;color:#f4d79d}
.entry-names span{font-style:italic;color:#d7a85d}
.entry-button{min-width:190px;padding:14px 28px}
/* Tombol ditempatkan tepat di bawah segel/logo DW pada amplop. */
.entry-button-anchor{position:absolute;z-index:4;left:50%;top:63%;transform:translate(-50%,-50%);margin:0;white-space:nowrap}
.entry-button-anchor:hover{transform:translate(-50%,calc(-50% - 2px))}
.entry-note{font:13px var(--serif);letter-spacing:.08em;margin:14px 0 0;color:#f1dfbd}
.video-screen{background:#000;opacity:1;transition:opacity .9s ease}
.video-screen.is-leaving{opacity:0;pointer-events:none}
.video-screen video{display:block;width:100%;height:100%;object-fit:contain;background:#000}
.video-loading{position:absolute;bottom:28px;color:#f5e4c1;font:12px var(--sans);letter-spacing:.08em}
.video-retry{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:13px 24px;border:1px solid #e8c77d;border-radius:999px;background:#351014;color:#f7dfad}
.invitation[hidden]{display:none}
.invitation{opacity:0;transition:opacity 1.1s ease}
.invitation.is-entered{opacity:1}
.home-cover-content{position:absolute;z-index:2;inset:auto 0 0;text-align:center;padding:14px 14px max(22px,env(safe-area-inset-bottom));color:#f4dfb0;text-shadow:0 2px 14px #000;background:linear-gradient(transparent,#12060855)}
.home-eyebrow{font:10px var(--sans);letter-spacing:.25em;margin:0 0 8px}
.home-cover-content h1{font:500 clamp(48px,12vw,76px)/.9 var(--serif);margin:0 0 12px;color:#f3d38d}
.home-cover-content h1 span{font-style:italic}
.home-date{font:10px var(--sans);letter-spacing:.22em;margin:0 0 25px}
.scroll-cue{display:inline-flex;flex-direction:column;align-items:center;gap:8px;color:#f6e6c6;text-decoration:none;font:9px var(--sans);letter-spacing:.17em}
.scroll-cue span{font-size:21px;animation:cueBounce 1.8s infinite}
@keyframes entryRise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes cueBounce{0%,100%{transform:translateY(0)}50%{transform:translateY(6px)}}
@media(min-width:700px){
 .entry-screen>img{height:min(100%,1050px);width:auto;max-width:100%;object-fit:contain}
 .video-screen video{height:min(100%,1050px);width:auto;max-width:100%;margin:auto}
}
@media(prefers-reduced-motion:reduce){.entry-content,.scroll-cue span{animation:none}}


/* V9: opening typography raised; clean page flow; live image buttons */
.entry-content{bottom:max(170px,calc(env(safe-area-inset-bottom) + 128px));}
.art-section,.event-section,.wishes-section{padding:0;background:transparent;}
.art-section>img,.wishes-section>img,.closing-section>img{display:block;width:100%;height:auto;}
.event-art-wrap,.wishes-art-wrap{position:relative;width:100%;line-height:0;}
.event-art-wrap>img,.wishes-art-wrap>img{display:block;width:100%;height:auto;}
.image-action{position:absolute;z-index:3;display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;line-height:1.1;border:1.5px solid #f8dfa0;border-radius:999px;background:linear-gradient(135deg,#f5d78f 0%,#c38b43 100%);color:#3b170d;font-family:var(--serif);font-weight:700;letter-spacing:.08em;text-transform:uppercase;box-shadow:0 3px 12px #1a0608a8,inset 0 1px 1px #fff8;cursor:pointer;transition:filter .2s,transform .2s;}
.image-action:hover{filter:brightness(1.08);transform:translateY(-1px);}
.map-action{left:29.5%;top:66.0%;width:41%;height:4.4%;font-size:clamp(10px,2.7vw,17px);}
.rsvp-image-action{left:21.2%;top:62.5%;width:57.6%;height:5.1%;font-size:clamp(10px,2.9vw,18px);}
.event-actions,.section-heading,.section-caption,.section-kicker,.wishes-note,.back-top,footer,.section-nav,.cover-topline,.home-cover-content{display:none!important;}
.countdown-panel{margin:0;}
@media(min-width:700px){.entry-content{bottom:190px;}.map-action{font-size:16px}.rsvp-image-action{font-size:17px}}

/* V10: restrained chapter dividers and immediate page flow */
.chapter-divider{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:156px;
  padding:26px 22px 24px;
  text-align:center;
  overflow:hidden;
  color:#f2dcae;
  background:
    radial-gradient(ellipse at 50% 0%,rgba(157,91,50,.28),transparent 65%),
    linear-gradient(135deg,#21080c,#3b1015 48%,#21080c);
  border-block:1px solid rgba(211,170,97,.55);
}
.chapter-divider::before,.chapter-divider::after{
  content:"";
  position:absolute;
  left:7%;
  right:7%;
  height:1px;
  background:linear-gradient(90deg,transparent,#b88b4b,transparent);
  opacity:.7;
}
.chapter-divider::before{top:10px}
.chapter-divider::after{bottom:10px}
.chapter-number{
  color:#d6ad65;
  font:500 12px var(--sans);
  letter-spacing:.38em;
}
.chapter-rule{
  color:#c89b53;
  font:12px var(--serif);
  letter-spacing:.12em;
}
.chapter-divider h2{
  margin:0;
  color:#f2d69a;
  font:500 clamp(20px,5vw,27px)/1.05 var(--serif);
  letter-spacing:.08em;
}
.chapter-divider p{
  margin:0;
  max-width:340px;
  color:#e5cfaa;
  font:italic 14px/1.35 var(--serif);
}
.reveal,.reveal.is-visible{opacity:1!important;transform:none!important;transition:none!important}


/* V11: gentle scroll reveal and interactive ten-photo gallery */
.reveal-on-scroll{
  opacity:0;
  transform:translateY(26px);
  transition:opacity .75s ease, transform .75s cubic-bezier(.2,.7,.2,1);
  will-change:opacity,transform;
}
.reveal-on-scroll.is-visible{
  opacity:1;
  transform:translateY(0);
}
.gallery-section{padding:0;background:#f4e8cf;overflow:hidden}
.gallery-art{position:relative;width:100%;line-height:0}
.gallery-template{display:block;width:100%;height:auto}
.gallery-grid{
  position:absolute;
  left:10%;
  right:10%;
  top:22.5%;
  bottom:21.5%;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(5,minmax(0,1fr));
  gap:clamp(5px,1.3vw,12px);
}
.gallery-thumb{
  min-width:0;min-height:0;padding:4px;
  display:grid;place-items:center;
  overflow:hidden;cursor:pointer;
  border:1px solid #b98a42;
  border-radius:5px;
  background:rgba(255,250,235,.78);
  box-shadow:0 2px 7px rgba(83,43,16,.16);
  transition:transform .2s ease,box-shadow .2s ease;
}
.gallery-thumb:hover{transform:scale(1.025);box-shadow:0 5px 14px rgba(83,43,16,.25)}
.gallery-thumb img{display:block;width:100%;height:100%;object-fit:contain}
.gallery-lightbox{
  width:100vw;height:100dvh;max-width:none;max-height:none;
  margin:0;padding:58px 56px 38px;border:0;
  background:rgba(12,5,7,.96);color:#f5dfad;
  overflow:hidden;
}
.gallery-lightbox[open]{display:flex;align-items:center;justify-content:center}
.gallery-lightbox::backdrop{background:rgba(0,0,0,.92)}
.gallery-view{margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;gap:12px}
.gallery-view img{display:block;max-width:100%;max-height:calc(100% - 36px);width:auto;height:auto;object-fit:contain;box-shadow:0 8px 35px #0009}
.gallery-view figcaption{font:13px var(--sans);letter-spacing:.16em;color:#e9cf94}
.gallery-close,.gallery-arrow{
  position:absolute;z-index:2;display:grid;place-items:center;
  border:1px solid #d6b36c;border-radius:50%;
  background:#351014;color:#f5dfa9;cursor:pointer;
  box-shadow:0 3px 15px #0008;
}
.gallery-close{top:18px;right:18px;width:42px;height:42px;font-size:28px}
.gallery-arrow{top:50%;transform:translateY(-50%);width:42px;height:54px;border-radius:12px;font-size:34px;line-height:1}
.gallery-prev{left:10px}.gallery-next{right:10px}
@media(max-width:430px){
  .gallery-grid{left:8%;right:8%;top:22.8%;bottom:21.8%;gap:5px}
  .gallery-thumb{padding:2px;border-radius:3px}
  .gallery-lightbox{padding:58px 42px 34px}
  .gallery-arrow{width:34px;height:46px}
  .gallery-prev{left:5px}.gallery-next{right:5px}
}
@media(prefers-reduced-motion:reduce){
  .reveal-on-scroll{opacity:1;transform:none;transition:none;will-change:auto}
  .gallery-thumb{transition:none}
}


/* V12: balanced photo gallery, lower opening names, clearer closing artwork */
.entry-content{
  bottom:max(118px,calc(env(safe-area-inset-bottom) + 72px));
}
@media(min-width:700px){
  .entry-content{bottom:132px;}
}
.gallery-grid{
  left:8.5%;
  right:8.5%;
  top:23%;
  bottom:20%;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:repeat(4,minmax(0,1fr));
  gap:clamp(7px,1.4vw,14px);
}
.gallery-thumb{
  padding:4px;
  border:1.5px solid #b98a42;
  border-radius:7px;
  background:rgba(255,250,235,.92);
  box-shadow:0 3px 10px rgba(83,43,16,.20);
}
.gallery-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#f7edd9;
}
@media(max-width:430px){
  .gallery-grid{
    left:7.5%;
    right:7.5%;
    top:23%;
    bottom:20%;
    gap:5px;
  }
  .gallery-thumb{padding:2px;border-radius:4px}
}


/* V13: page 4 RSVP artwork uses an invisible hit area over its printed gold button. */
.rsvp-page4-action{
  left:19.5%;
  top:54.1%;
  width:61%;
  height:4.5%;
  border:0;
  border-radius:999px;
  padding:0;
  background:transparent;
  color:transparent;
  font-size:0;
  box-shadow:none;
}
.rsvp-page4-action:hover{
  background:rgba(255,226,157,.08);
  filter:none;
  transform:none;
}
.gallery-thumb{position:relative}
.gallery-thumb.gallery-extra{display:none!important}
.gallery-thumb.has-more{overflow:hidden}
.gallery-more-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(35,7,10,.62);
  color:#ffe6ad;
  font:600 clamp(12px,3vw,18px) var(--sans);
  letter-spacing:.16em;
  text-shadow:0 2px 8px #000;
  pointer-events:none;
}

/* V14: wordmark Dede & Wil mengikuti lettering khas pada referensi pengguna. */
.entry-wordmark{
  display:block;
  width:min(86vw,390px);
  height:auto;
  max-height:130px;
  object-fit:contain;
  margin:0 auto 18px;
  filter:drop-shadow(0 2px 8px rgba(0,0,0,.35));
}
@media(min-width:700px){
  .entry-wordmark{width:min(72vw,430px);max-height:145px}
}

/* V15: restored soft scroll-in transitions for invitation pages. */
.scroll-page-enter{
  opacity:0;
  transform:translate3d(0,30px,0);
  transition:opacity .85s ease, transform .85s cubic-bezier(.2,.7,.2,1);
  transition-delay:var(--enter-delay,0ms);
  will-change:opacity,transform;
}
.scroll-page-enter.scroll-page-visible{
  opacity:1;
  transform:translate3d(0,0,0);
}
@media(prefers-reduced-motion:reduce){
  .scroll-page-enter,.scroll-page-enter.scroll-page-visible{
    opacity:1;transform:none;transition:none;will-change:auto;
  }
}


/* V21: mobile layout corrections */
@media (max-width: 699px) {
  /* Keep the opening button clear of the baked-in Dede & Wil lettering. */
  .entry-button-anchor {
    top: 51%;
    max-width: calc(100vw - 48px);
    white-space: nowrap;
  }

  /* Lift floating controls above the Netlify badge/browser bottom area. */
  #floatingControls {
    bottom: calc(env(safe-area-inset-bottom) + 88px);
    right: 14px;
  }

  /* Fill gallery tiles with the photos instead of showing pale contain-bars. */
  .gallery-thumb {
    padding: 0 !important;
    background: transparent !important;
    overflow: hidden;
  }
  .gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center;
    background: transparent !important;
  }

  /* The final thank-you artwork must remain visible at the end of the page. */
  #top .closing-section,
  #top .closing-section.reveal-on-scroll,
  #top .closing-section.scroll-page-enter {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    min-height: 1px;
  }
  #top .closing-section > img {
    display: block !important;
    width: 100%;
    height: auto;
    opacity: 1 !important;
    visibility: visible !important;
  }
}


/* V22: final mobile gallery tile and floating-control placement */
@media (max-width: 699px) {
  /* Put the three round controls at the bottom-left, away from Netlify's badge. */
  #floatingControls {
    left: 14px !important;
    right: auto !important;
    bottom: calc(env(safe-area-inset-bottom) + 88px) !important;
    justify-content: flex-start;
    gap: 9px;
  }

  /* Make each photo occupy the complete gallery tile.
     Absolute positioning avoids the intrinsic-height gap seen on mobile. */
  #gallery .gallery-thumb {
    display: block !important;
    position: relative !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: hidden !important;
    min-width: 0;
    min-height: 0;
  }
  #gallery .gallery-thumb > img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    background: transparent !important;
  }
  #gallery .gallery-thumb.has-more > img {
    z-index: 0;
  }
  #gallery .gallery-thumb.has-more .gallery-more-overlay {
    z-index: 1;
  }
}


/* V23: refine mobile spacing and pin controls to the actual lower-left corner */
@media (max-width: 699px) {
  /* Keep the floating buttons at the lower-left edge, not over the gallery. */
  #floatingControls {
    position: fixed !important;
    left: 14px !important;
    right: auto !important;
    bottom: 16px !important;
    top: auto !important;
    z-index: 40 !important;
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  /* Give the gallery cards a little more room below and remove the stray
     template-rule overlap immediately beneath the last row. */
  #gallery .gallery-grid {
    bottom: 24% !important;
  }

  /* Lower the small "THE WEDDING OF" line so the opening button no longer
     sits across it. Keep the name artwork and date in the same content group. */
  #entryScreen .entry-content {
    transform: translateY(28px);
  }
}


/* V24: final mobile refinements from the latest phone screenshots */
@media (max-width: 699px) {
  /* Move the name artwork lower so it clears the Buka Undangan button. */
  #entryScreen .entry-content {
    transform: translateY(58px) !important;
  }

  /* The three gold rules below each gallery tile are decorative separators
     from the gallery layout; hide them on mobile for a clean photo grid. */
  #gallery .gallery-thumb::after,
  #gallery .gallery-thumb::before {
    content: none !important;
    display: none !important;
  }

  #gallery .gallery-grid::before,
  #gallery .gallery-grid::after,
  #gallery .gallery-item::before,
  #gallery .gallery-item::after {
    content: none !important;
    display: none !important;
  }

  /* Remove any bottom border/shadow that can look like repeated lines. */
  #gallery .gallery-thumb {
    box-shadow: none !important;
    border-bottom: 2px solid #b58a43 !important;
    margin-bottom: 0 !important;
  }
}


/* V25: opening music control, slightly raised opening button, clean gallery footer */
@media (max-width: 699px) {
  /* Raise the opening CTA a little without shifting the name artwork. */
  .entry-button-anchor {
    top: 48.5% !important;
  }

  /* Music control is available immediately on the cover.
     RSVP and back-to-top only appear after the invitation opens. */
  body.pre-opening #floatingControls {
    display: flex !important;
    position: fixed !important;
    left: 14px !important;
    right: auto !important;
    bottom: 16px !important;
    top: auto !important;
    z-index: 120 !important;
  }
  body.pre-opening #rsvpFloat,
  body.pre-opening #floatingControls a {
    display: none !important;
  }
}
body:not(.pre-opening) #floatingControls[hidden] {
  display: none !important;
}

/* Remove all gallery footer/progress-like decoration; keep the frame and photos. */
#gallery .gallery-art::before,
#gallery .gallery-art::after,
#gallery .gallery-grid::before,
#gallery .gallery-grid::after,
#gallery .gallery-thumb::before,
#gallery .gallery-thumb::after {
  content: none !important;
  display: none !important;
}
#gallery .gallery-grid {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#gallery .gallery-thumb {
  box-shadow: none !important;
  outline: none !important;
}


/* V26: seamless music through the opening video and a graceful final message. */
.closing-note {
  position: relative;
  padding: clamp(34px, 7vw, 72px) 9% clamp(48px, 9vw, 88px);
  text-align: center;
  color: #f4dfb3;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(133, 76, 43, .26), transparent 68%),
    linear-gradient(180deg, #2b0c11 0%, #160609 100%);
  border-top: 1px solid rgba(211, 170, 96, .58);
}
.closing-note-ornament {
  display: block;
  margin-bottom: 22px;
  color: #d6ad69;
  font: 14px var(--serif);
  letter-spacing: .18em;
}
.closing-note p {
  max-width: 620px;
  margin: 0 auto 14px;
  font: italic clamp(16px, 3.5vw, 21px)/1.65 var(--serif);
  color: #f0dfc2;
}
.closing-note .closing-note-blessing {
  font-size: clamp(14px, 3vw, 17px);
  color: #cdbb9d;
}
.closing-note strong {
  display: inline-block;
  margin-top: 16px;
  color: #e8c47f;
  font: 500 clamp(28px, 6vw, 40px)/1.2 var(--serif);
  letter-spacing: .06em;
}
.closing-note strong span {
  font-style: italic;
  color: #c99a55;
}
@media(max-width:699px) {
  .closing-note { padding: 34px 8% 58px; }
  .closing-note-ornament { font-size: 11px; margin-bottom: 16px; }
}


/* V27: lift the cover location line slightly without moving the wordmark/button. */
@media (max-width: 699px) {
  #entryScreen .entry-note {
    transform: translateY(-10px) !important;
  }
}

/* V31: larger gallery lightbox photos on mobile */
@media(max-width:700px){
  .gallery-lightbox{
    padding:48px 8px 22px;
  }
  .gallery-view{
    width:100%;
    height:100%;
    gap:8px;
  }
  .gallery-view img{
    width:auto;
    max-width:calc(100vw - 16px);
    max-height:calc(100dvh - 118px);
    object-fit:contain;
  }
  .gallery-view figcaption{
    margin-top:0;
    font-size:13px;
  }
  .gallery-close{top:10px;right:10px}
  .gallery-arrow{width:38px;height:50px}
  .gallery-prev{left:7px}
  .gallery-next{right:7px}
}

/* V32: swipe-only gallery navigation with clean cinematic transitions */
.gallery-view{touch-action:pan-y}
.gallery-view img{will-change:transform,opacity}
.gallery-arrow{display:none!important}
