/* UI Kapsul Atas */
.menu-toggle { position: fixed; z-index: 999; display: flex; align-items: center; justify-content: center; width: 46px; height: 42px; border-radius: 100px; cursor: pointer; top: 18px; left: 20px; opacity: 0; visibility: hidden; pointer-events: none; border: 1px solid var(--glass-elem-border); }
.menu-toggle:active { transform: scale(0.85) translateZ(0); transition: transform 0.1s ease; }
.menu-toggle svg { width: 20px; height: 20px; stroke: currentColor; transition: stroke 0.3s ease; }
.top-controls-pill { position: fixed; top: 18px; right: 20px; z-index: 999; display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-radius: 100px; height: 42px; opacity: 0; visibility: hidden; pointer-events: none; border: 1px solid var(--glass-elem-border); }
.show-top-nav { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; }
.top-controls-pill .divider { width: 1px; height: 20px; background-color: var(--glass-elem-text); opacity: 0.3; transition: background-color 0.3s ease; }
.icon-action { display: flex; align-items: center; justify-content: center; background: none; border: none; color: inherit; cursor: pointer; padding: 0; transition: transform 0.4s var(--apple-ease); }
.icon-action:active { transform: scale(0.75) translateZ(0); transition: transform 0.05s ease; }
.icon-action svg { width: 22px; height: 22px; stroke: currentColor; transition: stroke 0.3s ease; }

/* Optimasi Equalizer Musik */
.music-equalizer { display: flex; align-items: flex-end; gap: 3px; height: 18px; padding-bottom: 2px; }
.music-equalizer .bar { 
    width: 3px; height: 16px; 
    background-color: currentColor; 
    border-radius: 2px; 
    transform-origin: bottom;
    transform: scaleY(0.25);
    transition: background-color 0.3s ease; 
}
.music-equalizer.playing .bar { animation: equalizer 0.8s ease-in-out infinite alternate; }
.music-equalizer.playing .bar:nth-child(1) { animation-delay: 0.0s; }
.music-equalizer.playing .bar:nth-child(2) { animation-delay: 0.2s; }
.music-equalizer.playing .bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes equalizer { 
  0% { transform: scaleY(0.25); } 
  100% { transform: scaleY(1); } 
}

/* Sidebar */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.6s var(--apple-ease); }
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.sidebar { position: fixed; top: 0; left: 0; height: 100vh; width: 300px; z-index: 1005; padding: 90px 28px 30px; display: flex; flex-direction: column; gap: 24px; transform: translateX(-100%) translateZ(0); border-radius: 0 30px 30px 0; border-left: none; transition: transform 0.6s var(--apple-ease); }
.sidebar.open { transform: translateX(0) translateZ(0); }
.sidebar-title { margin-bottom: 10px; border-bottom: 1px solid var(--glass-elem-border); padding-bottom: 16px; color: var(--glass-elem-text); transition: color 0.3s ease, border-color 0.3s ease; font-family: 'Cormorant Garamond', serif; font-size: 24px; }
.sidebar a { font-size: 14px; font-weight: 600; color: var(--glass-elem-text); display: flex; align-items: center; gap: 16px; text-transform: uppercase; letter-spacing: 1.5px; transition: transform 0.4s var(--apple-ease), color 0.3s ease; text-decoration: none; }
.sidebar a:active { transform: scale(0.95); opacity: 0.7; transition: transform 0.1s ease; }
.sidebar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; transition: stroke 0.3s ease; }
.sidebar-close { position: absolute; top: 18px; right: 20px; background: transparent; border: none; font-size: 38px; color: var(--glass-elem-text); cursor: pointer; padding: 10px; line-height: 1; transition: color 0.3s ease; }
.btn-close-invitation { background-color: rgba(255, 59, 48, 0.15); color: #FF3B30 !important; margin-top: auto; border-radius: 16px; padding: 16px !important; justify-content: center; transition: background-color 0.3s ease; }

/* Komponen Amplop & Cover Depan */
#cover { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background-color: var(--bg); transition: background-color 0.3s ease, opacity 1.2s ease, visibility 1.2s; overflow: hidden; opacity: 1; visibility: visible; pointer-events: auto; }
#cover.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.cover-gunungan-logo { width: 85px; height: auto; margin-bottom: 26px; transition: all 1.5s var(--apple-ease); position: relative; z-index: 10; animation: float-2 6s ease-in-out infinite alternate; opacity: 0.6; }
html[data-theme="dark"] .cover-gunungan-logo { opacity: 0.85; filter: brightness(1.2); }

#cover .cover-gunungan-logo {
  filter: invert(19%) sepia(45%) saturate(1131%) hue-rotate(344deg) brightness(96%) contrast(92%);
  opacity: 0.85;
}

.envelope-wrapper { position: relative; width: 100%; max-width: 360px; height: auto; aspect-ratio: 3 / 2; flex-shrink: 0; margin: 25px auto 45px; perspective: 1500px; z-index: 2; transition: transform 1.2s var(--apple-ease), opacity 1.2s ease; }
.envelope-wrapper.zoom-out { transform: scale(4) translateY(120px) translateZ(0); opacity: 0; pointer-events: none; }
.env-layer { position: absolute; inset: 0; border-radius: inherit; clip-path: inherit; }
.env-back { position: absolute; inset: 0; border-radius: 12px; box-shadow: inset 0 0 35px rgba(0,0,0,0.5); z-index: 1; overflow: hidden; }
.env-back .env-layer { background: #351C0D; }
.env-paper { position: absolute; left: 14px; top: 18px; width: calc(100% - 28px); height: calc(100% - 34px); background: #FFF9F2; border: 1px solid rgba(0,0,0,0.05); border-radius: 8px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 16px; z-index: 3; box-shadow: 0 -4px 15px rgba(0,0,0,0.15); transition: transform 1.6s var(--apple-ease); }
.env-paper.up { transform: translateY(-66%) scale(1.02) translateZ(0); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.env-front-left { position: absolute; inset: 0; z-index: 4; clip-path: polygon(0 0, 50% 50%, 0 100%); border-radius: 12px 0 0 12px; }
.env-front-left .env-layer { background: linear-gradient(135deg, #7A4620 0%, #5E3416 100%); }
.env-front-right { position: absolute; inset: 0; z-index: 4; clip-path: polygon(100% 0, 50% 50%, 100% 100%); border-radius: 0 12px 12px 0; }
.env-front-right .env-layer { background: linear-gradient(-135deg, #7A4620 0%, #5E3416 100%); }
.env-front-bottom { position: absolute; inset: 0; z-index: 5; clip-path: polygon(0 100%, 50% 50%, 100% 100%); border-radius: 0 0 12px 12px; }
.env-front-bottom .env-layer { background: linear-gradient(to top, #7A4620 0%, #5E3416 100%); }
.env-flap { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform-origin: top; z-index: 6; transform-style: preserve-3d; transition: transform 1.4s var(--apple-ease), z-index 0s 0s; }
.env-flap.open { transform: rotateX(178deg); z-index: 2; transition: transform 1.4s var(--apple-ease), z-index 0s 0.6s; } 
.env-flap-inner { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 55%); border-radius: 12px 12px 0 0; }
.env-flap-inner .env-layer { background: linear-gradient(to bottom, #8C5228 0%, #613613 100%); }
.wax-seal { position: absolute; top: 57%; margin-top: -30px; left: calc(50% - 30px); width: 60px; height: 60px; background: linear-gradient(135deg, #8B201A 0%, #4A0E0B 100%); border-radius: 50%; box-shadow: inset 0 0 10px rgba(0,0,0,0.6), 0 6px 15px rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; color: #F9F8F7; font-family: 'Great Vibes', cursive; font-size: 26px; z-index: 6; border: 2px solid #5C1210; text-shadow: 0 2px 4px rgba(0,0,0,0.4); transition: opacity 0.5s ease; }
.env-flap.open .wax-seal { opacity: 0; } 
.cover-eyebrow { font-size: 15px; color: var(--text-muted); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 24px; transition: color 0.3s ease; position: relative; z-index: 10; font-weight: 600; }
.cover-names { font-size: clamp(48px, 12vw, 68px); font-style: italic; margin: 0; color: var(--text-title); line-height: 1.1; transition: color 0.3s ease; position: relative; z-index: 10; }
.guest-label { font-size: 13px; color: #75441A; margin-bottom: 6px; letter-spacing: 0.5px; }
.guest-name { font-family: 'Cormorant Garamond', serif; font-size: 28px; color: #231512; font-weight: 600; }
.main-gunungan-wrapper { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 1.5s ease, visibility 1.5s; overflow: hidden; }
.main-gunungan-wrapper.show { opacity: 1; visibility: visible; }

/* Gunungan Background */
.gunungan-bg { position: absolute; left: 0; top: 50%; height: 150vh; width: auto; max-width: none; opacity: 0.06; animation: breathe-left 15s ease-in-out infinite alternate; transition: opacity 0.3s ease; }
.gunungan-bg.img-light { opacity: 0.03; }
.gunungan-bg.img-dark { opacity: 0; }
html[data-theme="dark"] .gunungan-bg.img-light { opacity: 0; }
html[data-theme="dark"] .gunungan-bg.img-dark { opacity: 0.03; }

/* Layout Isi (Main) & Sections */
main { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.8s ease, visibility 0.8s; padding-bottom: 120px; z-index: 1; }
main.show { opacity: 1; visibility: visible; pointer-events: auto; z-index: 100; }
section { padding: 120px 24px; max-width: 720px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.ornament-divider { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 auto 40px; color: var(--accent); transition: color 0.3s ease; }
.ornament-divider .sunda-house-icon { width: 80px; height: 80px; stroke-width: 1.5px; animation: float-2 6s ease-in-out infinite alternate; }
.ornament-divider .floral-left, .ornament-divider .floral-right { width: 60px; height: 80px; opacity: 0.8; }
.ornament-divider .floral-left { transform: scaleX(-1) rotate(-15deg); animation: float-3 5s ease-in-out infinite alternate; }
.ornament-divider .floral-right { transform: rotate(-15deg); animation: float-4 5.5s ease-in-out infinite alternate; }

/* Bagian Hero & Ayat */
#hero { padding-top: 150px; padding-bottom: 80px; }
#hero .cover-names { font-size: clamp(58px, 14vw, 82px); margin-bottom: 14px; transition: color 0.3s ease; }
#hero .amp { display: inline-block; font-size: .65em; color: var(--accent); margin: 0 14px; transform: translateY(-6px); transition: color 0.3s ease; }
#hero .hero-date { font-size: 19px; letter-spacing: 0.08em; color: var(--text-muted); margin-top: 18px; transition: color 0.3s ease; font-weight: 400; }
.scroll-down { margin-top: 70px; display: inline-flex; flex-direction: column; align-items: center; color: var(--text-muted); gap: 12px; opacity: 0.8; transition: color 0.3s ease; cursor: pointer; }
.scroll-down p { font-size: 13px; text-transform: uppercase; letter-spacing: 0.25em; margin: 0; font-weight: 600; }
.scroll-down svg { width: 24px; height: 24px; stroke: var(--accent); animation: bounce 2.5s var(--apple-ease) infinite; transition: stroke 0.3s ease; }
.glass-box .arabic-text { font-family: 'Amiri', serif; font-size: 32px; line-height: 2.2; color: var(--glass-elem-text); margin-bottom: 24px; transition: color 0.3s ease; opacity: 0.95; }
.glass-box .arabic-text.bismillah { font-size: 40px; margin-bottom: 50px; opacity: 1; }
#quote p { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 23px; color: var(--glass-elem-text); max-width: 580px; margin: 0 auto; line-height: 1.7; opacity: 0.9; transition: color 0.3s ease; }
#quote .attrib { font-family: 'Karla', sans-serif; font-size: 14px; color: var(--glass-elem-text); opacity: 0.7; margin-top: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; transition: color 0.3s ease; }
.glass-line { margin: 40px auto; border-top: 1px dashed var(--glass-elem-text); width: 50%; opacity: 0.3; transition: border-color 0.3s ease; }

/* Mempelai */
.couple-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 40px; align-items: center; margin-top: 60px; }
.couple-card h3 { font-size: 40px; color: var(--text-main); transition: color 0.3s ease; }
.couple-card .role { font-size: 14px; color: var(--accent); letter-spacing: 0.15em; margin-bottom: 16px; text-transform: uppercase; transition: color 0.3s ease; font-weight: 700; }
.couple-card .parents { font-size: 17px; color: var(--text-muted); margin-top: 18px; line-height: 1.7; transition: color 0.3s ease; }
.couple-amp { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 42px; color: var(--accent); transition: color 0.3s ease; }
@media (max-width: 560px) { .couple-grid { grid-template-columns: 1fr; gap: 50px;} .couple-amp { transform: rotate(90deg); margin: 15px 0; } }

/* Acara */
.event-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 24px; padding: 50px 30px; max-width: 480px; margin: 50px auto 0; transition: background-color 0.3s ease, border-color 0.3s ease; }
.event-card.ultra-glass { background-color: var(--glass-elem-bg); }
.event-card.ultra-glass h3 { font-size: 40px; margin-bottom: 28px; color: var(--glass-elem-text); transition: color 0.3s ease; }
.event-card.ultra-glass .detail-row { font-size: 18px; color: var(--glass-elem-text); opacity: 0.85; margin-bottom: 14px; transition: color 0.3s ease; }
.event-card.ultra-glass .detail-row strong { color: var(--glass-elem-text); opacity: 1; font-weight: 600; font-size: 19px; transition: color 0.3s ease; }

/* ========================================================
   BOX MAP & DENAH DISATUKAN (PROPORSI & LEBAR KEMBAR 100%)
   ======================================================== */
.map-container, .denah-container {
  width: 100% !important;
  max-width: 480px !important;
  margin: 45px auto 0 !important;
  padding: 10px !important; 
  border-radius: 24px !important;
  background-color: var(--glass-elem-bg);
  border: 1px solid var(--line);
  box-sizing: border-box !important; 
  display: flex !important;
  flex-direction: column !important;
  position: relative;
}
.map-container { height: 340px !important; background-color: var(--bg-card); transition: border-color 0.3s ease, background-color 0.3s ease; }
.denah-container { height: auto !important; aspect-ratio: 1 / 1; }

/* Memaksa isi kotak mengikuti frame secara absolut */
.map-placeholder, .denah-bounds {
  position: relative;
  width: 100% !important;
  height: 100% !important; 
  flex: 1 !important;
  border-radius: 14px;
  overflow: hidden;
}

.map-container iframe,
.map-placeholder img,
.denah-wrapper,
.denah-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
  object-fit: cover;
}
html[data-theme="dark"] .map-container iframe { filter: grayscale(30%) contrast(1.2) invert(90%) hue-rotate(180deg); }

/* Tombol Melayang GMaps */
.map-play-btn { 
  position: absolute; 
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center; gap: 8px; 
  padding: 12px 24px; border-radius: 30px; font-size: 14px; font-weight: 600; 
  cursor: pointer; border: 1px solid var(--glass-elem-border); 
  background: rgba(var(--env-rgb), 0.85); color: var(--glass-elem-text); 
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  z-index: 10; transition: all 0.3s ease; text-decoration: none; white-space: nowrap;
}
.map-placeholder:active .map-play-btn { transform: translate(-50%, -50%) scale(0.95); }

.map-hint { font-size: 14px; color: var(--text-muted); margin-top: 16px; font-style: italic; opacity: 0.8; transition: color 0.3s ease; }

/* Tema terang gelap gambar denah */
.img-dark { opacity: 0; transition: opacity 0.3s ease; } .img-light { opacity: 1; transition: opacity 0.3s ease; }
html[data-theme="dark"] .img-light { opacity: 0; } html[data-theme="dark"] .img-dark { opacity: 1; }

/* Hitung Mundur */
.countdown-pill { display: inline-flex; justify-content: center; align-items: center; gap: 30px; margin: 50px auto 0; padding: 22px 46px; border-radius: 100px; flex-wrap: wrap; }
.cd-item { display: flex; align-items: baseline; gap: 8px; }
.cd-num { font-family: 'Karla', sans-serif; font-size: 30px; font-weight: 700; color: var(--glass-elem-text); transition: color 0.3s ease; }
.cd-label { font-family: 'Karla', sans-serif; font-size: 15px; color: var(--nav-text-muted); font-weight: 500; transition: color 0.3s ease; text-transform: uppercase; letter-spacing: 1.5px; }
@media (max-width: 480px) { .countdown-pill { gap: 18px; padding: 18px 30px; border-radius: 30px; } }

/* Galeri Foto */
.gallery-title-script { font-family: 'Great Vibes', cursive; font-size: clamp(60px, 15vw, 84px); color: var(--text-title); margin-bottom: 50px; font-weight: 400; transition: color 0.3s ease; }
.carousel-container { position: relative; width: 100%; max-width: 640px; margin: 0 auto 40px; border-radius: 28px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.15); transform: translateZ(0); }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; scroll-snap-align: start; scroll-snap-stop: always; background-color: var(--line); transition: background-color 0.3s ease; display: block; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%) translateZ(0); font-size: 24px; cursor: pointer; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; z-index: 10; border-radius: 50%; margin: 0 14px; padding: 0; color: var(--glass-elem-text); border: none; }
.carousel-btn:active { transform: translateY(-50%) scale(0.85) translateZ(0); transition: transform 0.1s ease; }
.prev-btn { left: 0; } .next-btn { right: 0; }
.carousel-dots { position: absolute; bottom: 24px; left: 0; width: 100%; display: flex; justify-content: center; gap: 12px; z-index: 10; }
.dot { width: 32px; height: 5px; background: rgba(255,255,255,0.4); border-radius: 3px; transition: all 0.5s var(--apple-ease); cursor: pointer; }
.dot.active { background: rgba(255,255,255,1); transform: scaleY(1.5) scaleX(1.1); }

/* Closing & Floral Layout */
#closing .serif { font-size: clamp(42px, 9vw, 58px); font-style: italic; color: var(--text-title); transition: color 0.3s ease; }
#closing p { max-width: 540px; margin: 28px auto 0; font-size: 18px; }
footer { text-align: center; padding: 60px 24px 80px; font-size: 15px; color: var(--text-muted); position: relative; transition: color 0.3s ease; }
.fine { font-size: 15px; color: var(--accent); margin-top: 30px; letter-spacing: 2px; text-transform: uppercase; transition: color 0.3s ease; font-weight: 700; }
.floral { position: absolute; pointer-events: none; z-index: 1; }
.floral.corner-cover-tl { top: -10px; left: -14px; width: 130px; opacity: .85; animation: float-1 8s ease-in-out infinite; transform-origin: center; }
.floral.corner-cover-br { bottom: -16px; right: -14px; width: 150px; opacity: .9; animation: float-2 7s ease-in-out infinite; transform-origin: center; }
.floral.closing-left { top: 6px; left: calc(50% - 210px); width: 80px; opacity: .8; animation: float-3 6s ease-in-out infinite alternate; }
.floral.closing-right { top: 6px; right: calc(50% - 210px); width: 80px; opacity: .8; animation: float-4 6.5s ease-in-out infinite alternate; }
.photo-frame { position: relative; width: min(320px, 80vw); aspect-ratio: 4 / 5; margin: 45px auto 15px; z-index: 2; }
.photo-frame .floral { z-index: 2; }
.photo-frame .corner-photo-tl { top: -24px; left: -26px; width: 70px; transform: rotate(-4deg); animation: float-2 7s ease-in-out infinite reverse; }
.photo-frame .corner-photo-br { bottom: -24px; right: -26px; width: 70px; transform: scale(-1) rotate(-4deg); animation: float-2 7.5s ease-in-out infinite; }
.scroll-indicator { position: fixed; top: 0; left: 0; width: 100%; height: 5px; background: transparent; z-index: 999; }
.scroll-indicator-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.1s linear, background 0.3s ease; border-radius: 0 5px 5px 0; }

/* Bottom Nav Menu */
.bottom-nav { position: fixed; bottom: 30px; left: 50%; width: calc(100% - 48px); max-width: 420px; z-index: 999; border-radius: 100px; display: flex; justify-content: space-around; align-items: center; padding: 14px 12px; transform: translateX(-50%) translateY(150px) translateZ(0); opacity: 0; visibility: hidden; transition: transform 1.5s var(--apple-ease), opacity 1.5s ease, visibility 1.5s; }
.bottom-nav.show { transform: translateX(-50%) translateY(0) translateZ(0); opacity: 1; visibility: visible; pointer-events: auto; }
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--nav-text-muted); font-size: 11px; text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.4s var(--apple-ease), color 0.3s ease; flex: 1; cursor: pointer; }
.nav-item:active { transform: scale(0.9); transition: transform 0.1s ease; }
.nav-item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; transition: transform 0.4s var(--apple-ease), stroke-width 0.4s; }
.nav-item.active { color: var(--glass-elem-text); transform: translateY(-4px) scale(1.05); }
.nav-item.active svg { stroke-width: 2.5; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15)); }
.nav-item::after { content: ''; position: absolute; bottom: -10px; width: 5px; height: 5px; background: var(--glass-elem-text); border-radius: 50%; opacity: 0; transform: scale(0); transition: all 0.4s var(--apple-ease), background-color 0.3s ease; }
.nav-item.active::after { opacity: 1; transform: scale(1); bottom: -8px; }

@media (hover: hover) {
  .ultra-glass:not(.bottom-nav):hover { transform: translateY(-3px) translateZ(0); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.5); }
  .bottom-nav.show:hover { transform: translateX(-50%) translateY(-3px) translateZ(0); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.5); }
  .nav-item:hover { color: var(--glass-elem-text); }
  .nav-item:hover svg { transform: translateY(-3px); }
  .carousel-btn:hover { background-color: rgba(255, 255, 255, 0.15); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .envelope-wrapper { max-width: 460px; margin-top: 60px; }
    .envelope-wrapper.zoom-out { transform: scale(4.5) translateY(120px) translateZ(0); }
  section { max-width: 700px; }
  .cover-names { font-size: clamp(68px, 12vw, 90px); }
  .guest-name { font-size: 34px; }
  .couple-grid { gap: 60px; }
  .event-card, .map-container, .denah-container { max-width: 600px; }

  #galeri { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 50px; align-items: start; }
  #galeri .gallery-title-script { grid-column: 1 / -1; text-align: center; }
  .carousel-container { margin: 0; width: 100%; max-width: 100%; }
}

@media (min-width: 1024px) {
  section { max-width: 1100px; padding: 160px 40px; }
  .cover-names { font-size: clamp(90px, 10vw, 140px); }
  .section-title { font-size: clamp(54px, 7vw, 76px); }
  .gallery-title-script { font-size: clamp(90px, 12vw, 130px); }
  p { font-size: 22px; line-height: 1.8; }
  .glass-box .arabic-text { font-size: 52px; }
  .glass-box .arabic-text.bismillah { font-size: 64px; }
  .photo-frame { width: 100%; max-width: 500px; aspect-ratio: 4 / 5; margin: 60px auto 40px; }
  .glass-box { max-width: 800px; margin: 0 auto; padding: 80px 60px; }
  .couple-grid { gap: 100px; margin-top: 80px; }
  .couple-card h3 { font-size: 58px; }
  .couple-card .parents { font-size: 20px; }
  .couple-amp { font-size: 70px; }
  
  #acara { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 60px; align-items: stretch; }
  #acara .kicker { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  #acara .section-title { grid-column: 1 / -1; grid-row: 2; text-align: center; margin-bottom: 40px; }
  .event-card { grid-column: 1; grid-row: 3 / span 2; height: 100%; max-width: 100%; margin: 0; padding: 60px 50px; display: flex; flex-direction: column; justify-content: center; }
  .event-card.ultra-glass h3 { font-size: 46px; }
  .event-card.ultra-glass .detail-row { font-size: 20px; }
  
  /* GRID DESKTOP DIKUNCI 100% IDENTIK (Memaksa browser patuh kolom) */
  .map-container, .denah-container { 
    grid-column: 2; 
    max-width: 100% !important; 
    width: 100% !important;
    margin: 0 !important; 
    aspect-ratio: 16 / 10 !important; 
    height: auto !important; 
    min-width: 0;
    align-self: start !important;
  }
  .map-container { grid-row: 3; }
  .denah-container { grid-row: 4; }
  
  .countdown-pill { grid-column: 1 / -1; grid-row: 5; justify-self: center; padding: 26px 50px; margin-top: 60px; }
  #acara .map-hint { display: none; }
  .cd-num { font-size: 42px; }
  .cd-label { font-size: 16px; }
  
  #galeri { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 50px; align-items: start; }
  #galeri .gallery-title-script { grid-column: 1 / -1; text-align: center; }
  .carousel-container { max-width: 100%; width: 100%; margin: 0; }
  .envelope-wrapper { max-width: 580px; margin: 40px auto 60px; }
  .envelope-wrapper.zoom-out { transform: scale(5.5) translateY(120px) translateZ(0); }
  .guest-label { font-size: 16px; }
  .guest-name { font-size: 38px; }
  .wax-seal { width: 90px; height: 90px; font-size: 38px; margin-top: -45px; left: calc(50% - 45px); border-width: 3px; }
  
  /* Desktop Gunungan Background */
  .gunungan-bg { width: 100vw; height: auto; top: 50%; transform: translateY(-50%) scale(1.1); }
}

#cover { background-color: var(--bg) !important; transition: background-color 0.3s ease, opacity 1.2s ease, visibility 1.2s !important; }
#cover .cover-names, #cover .cover-eyebrow { color: var(--text-title); }
#cover .cover-eyebrow { color: var(--text-muted); }

.event-card.ultra-glass, .map-container, .denah-container, .countdown-pill {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: rgba(var(--env-rgb), 0.92);
}

/* Optimasi Content-Visibility (Opt B) */
#mempelai {
    content-visibility: auto;
    contain-intrinsic-size: auto 650px;
}
#acara {
    content-visibility: auto;
    contain-intrinsic-size: auto 1000px;
}
#galeri, #closing {
    content-visibility: auto;
    contain-intrinsic-size: auto 700px; 
}
@media (min-width: 1024px) {
    #mempelai { contain-intrinsic-size: auto 750px; }
    #acara { contain-intrinsic-size: auto 900px; }
    #galeri, #closing { contain-intrinsic-size: auto 950px; }
}

/* Layar pendek (laptop landscape): hemat tinggi agar cover muat tanpa memipihkan amplop */
@media (min-width: 768px) and (max-height: 820px) {
  .cover-gunungan-logo { width: 60px; margin-bottom: 12px; }
  .cover-eyebrow { margin-bottom: 8px; }
  #cover .cover-names { font-size: clamp(48px, 8vh, 84px); }
  .envelope-wrapper { max-width: min(460px, 42vh * 1.5); margin: 22px auto 28px; }
  .wax-seal { width: 64px; height: 64px; font-size: 28px; margin-top: -32px; left: calc(50% - 32px); border-width: 2px; }
}
@media (min-width: 768px) and (max-height: 640px) {
  .envelope-wrapper { max-width: min(380px, 38vh * 1.5); margin: 14px auto 20px; }
}

/* Denah: cegah teks/gambar terseleksi saat klik 2x atau drag di desktop */
.denah-wrapper { user-select: none; -webkit-user-select: none; cursor: grab; }
.denah-img { -webkit-user-drag: none; }