:root {
  --bg-cream: #FDFBF7;
  --earth-brown: #5C4033;
  --earth-dark: #3D2B22;
  --pastel-pink: #E8D3CE;
  --sage-green: #8F9E8B;
  --soft-gold: #C5A059;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #1a1715;
  font-family: 'Montserrat', sans-serif;
  color: var(--earth-brown);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Container Mobile */
.app-container {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  max-height: 932px;
  background-color: var(--bg-cream);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

@media (min-width: 500px) {
  .app-container {
    height: 92vh;
    border-radius: 28px;
    border: 3px solid var(--soft-gold);
  }
}

/* Overlay "Buka Undangan" */
.open-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(253,251,247,0.94) 0%, rgba(244,235,225,0.98) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.open-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.open-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  letter-spacing: 3px;
  color: var(--sage-green);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.open-title {
  font-family: 'Pinyon Script', cursive;
  font-size: 3.3rem;
  color: var(--earth-dark);
  margin-bottom: 10px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.open-title .ampersand {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--soft-gold);
  text-shadow: 0 1px 2px rgba(61, 43, 34, 0.15);
  margin: 0 4px;
}

.open-date-text {
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--earth-brown);
  margin-bottom: 25px;
  font-weight: 500;
}

.btn-open-invitation {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--earth-brown);
  color: var(--bg-cream);
  border: 1px solid var(--soft-gold);
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(92, 64, 51, 0.25);
  transition: all 0.3s ease;
}

.btn-open-invitation:active {
  transform: scale(0.95);
  background: var(--earth-dark);
}

/* Audio Toggle */
.audio-toggle-btn {
  position: absolute;
  top: 55px;
  top: calc(55px + env(safe-area-inset-top));
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(253, 251, 247, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 160, 89, 0.5);
  color: var(--earth-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 130;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, background 0.3s ease;

  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.audio-toggle-btn:active {
  transform: scale(0.9);
}

.hidden-icon {
  display: none !important;
}

/* Video Stack */
.video-stack {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

.video-stack video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

video::-webkit-media-controls-timeline,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
}

#intro-video { z-index: 2; }
#main-video { z-index: 1; }

/* Video Controls Overlay */
.video-controls-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 105;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 24px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-controls-overlay.hidden-controls {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -45%);
}

.v-ctrl-btn {
  background: none;
  border: none;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.2s ease;
}

.v-ctrl-btn:active {
  transform: scale(0.88);
  color: var(--soft-gold);
}

.v-btn-main {
  width: 50px;
  height: 50px;
  background: var(--soft-gold);
  color: var(--earth-dark);
  border-radius: 50%;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Navigasi Bawah (Rendah Sedikit) */
.nav-bar-earth {
  position: absolute;
  bottom: 42px;
  bottom: calc(42px + env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  height: 68px;
  background: rgba(253, 251, 247, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: 35px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 120;
  padding: 0 8px;
  box-shadow: 0 12px 32px rgba(61, 43, 34, 0.2);
}

.hidden-nav {
  display: none;
  opacity: 0;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--earth-brown);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  flex: 1;
  transition: color 0.3s ease, transform 0.2s ease;
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item.active {
  color: var(--soft-gold);
}

.center-call-btn {
  position: relative;
  top: -16px;
}

.circle-btn-inner {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #FFFDF9, #F4EBE1);
  border: 2px solid var(--soft-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(92, 64, 51, 0.25);
  color: var(--earth-brown);
  transition: all 0.3s ease;
}

.center-call-btn.active .circle-btn-inner {
  background: var(--earth-brown);
  border-color: var(--soft-gold);
  color: var(--bg-cream);
  box-shadow: 0 8px 22px rgba(61, 43, 34, 0.35);
}

/* Slide-Up Bottom Sheet (Tinggi 82%) */
.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 82%;
  background: var(--bg-cream);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
  z-index: 110;
  transform: translateY(100%);
  display: flex;
  flex-direction: column;
}

.sheet-handle-bar {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.handle {
  width: 40px;
  height: 4px;
  background: var(--pastel-pink);
  border-radius: 2px;
  margin: 0 auto;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--earth-brown);
  cursor: pointer;
}

.sheet-content-wrapper {
  padding: 10px 24px 30px 24px;
  overflow-y: auto;
  flex: 1;
}

.sheet-tab-content { display: none; }
.sheet-tab-content.active-tab { display: block; }

.tab-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--earth-dark);
}

.tab-subtitle {
  font-size: 0.8rem;
  color: var(--sage-green);
  margin-bottom: 20px;
}

.info-card {
  background: #ffffff;
  border: 1px solid var(--pastel-pink);
  border-radius: 14px;
  padding: 20px;
}

.center-text { text-align: center; }

.venue-name { font-weight: 700; font-size: 1rem; color: var(--earth-dark); margin-bottom: 6px; }
.venue-address { font-size: 0.8rem; color: #555; margin-bottom: 15px; line-height: 1.4; }
.venue-address .landmark { font-size: 0.72rem; color: #777; font-style: italic; }

.btn-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  margin-bottom: 10px;
}

.map-box { border-radius: 10px; overflow: hidden; border: 1px solid var(--pastel-pink); }

.date-badge {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px dashed var(--pastel-pink);
}

.day { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; color: var(--sage-green); }
.date-num { font-size: 2.8rem; font-weight: 700; color: var(--soft-gold); line-height: 1; margin: 4px 0; }
.month { font-size: 0.9rem; font-weight: 600; color: var(--earth-brown); }
.hijri-date { font-size: 0.75rem; color: #888; margin-top: 4px; font-style: italic; }

.schedule-box {
  margin-bottom: 20px;
  text-align: left;
  background: var(--bg-cream);
  padding: 14px;
  border-radius: 10px;
}

.schedule-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--earth-dark);
  margin-bottom: 10px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.schedule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--earth-brown);
}

.btn-earth {
  width: 100%;
  background: var(--earth-brown);
  color: var(--bg-cream);
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-earth:active {
  background: var(--earth-dark);
}

.contact-list { display: flex; flex-direction: column; gap: 12px; }

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--pastel-pink);
}

.contact-item strong { font-size: 0.85rem; color: var(--earth-dark); }
.contact-item p { font-size: 0.8rem; color: #666; margin-top: 2px; }

.call-action-btn {
  background: var(--sage-green);
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.call-action-btn:active { opacity: 0.8; }

/* RSVP Notice */
.rsvp-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FFF8E7;
  border: 1px solid #FFE0B2;
  color: #8C6D1F;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.4;
  margin-bottom: 15px;
}

.rsvp-notice svg { flex-shrink: 0; margin-top: 2px; }

.sheet-form { display: flex; flex-direction: column; gap: 12px; }
.form-group label { display: block; font-size: 0.75rem; font-weight: 600; margin-bottom: 4px; color: var(--earth-dark); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--pastel-pink);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  background: #fff;
}