/* ==========================================================================
   website07 — 韓系晨霧・寶寶藍拱門 (Mist & Baby Blue Arch Palette)
   Color Palette:
   - Creamy Ivory: #EFE9D9 (Main card background)
   - Outer Shell:  #E5DEC9 (Desktop backdrop)
   - Baby Blue:    #93B7E0 (Botanical & soft accents)
   - Mist Blue:    #7998B6 (Buttons & primary emphasis / --primary / --wine)
   - Deep Blue:    #3A4B5C (Headings & primary serif text)
   - Warm Gray:    #4A4640 (Body text)
   ========================================================================== */

:root {
  --ivory: #EFE9D9;
  --outer-bg: #E5DEC9;
  --babyblue: #93B7E0;
  --mistblue: #7998B6;
  --deepblue: #3A4B5C;
  --warmgray: #4A4640;
  --wine: #7998B6;
  --primary: #7998B6;

  --font-display: Georgia, 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --font-serif: 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --font-sans: 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   1. Falling Baby-Blue & White Petals (#petal-container)
   ========================================================================== */
#petal-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}

.petal {
  position: fixed;
  top: -10%;
  z-index: 40;
  pointer-events: none;
  user-select: none;
  opacity: 0.75;
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) rotate(360deg) translateX(30px);
    opacity: 0;
  }
}

/* ==========================================================================
   2. Floating Music Player & Scroll-To-Top Buttons
   ========================================================================== */
.mb-floating-controls {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mb-music-btn,
.mb-top-btn {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(147, 183, 224, 0.55);
  box-shadow: 0 6px 18px rgba(58, 75, 92, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  padding: 0;
}

.mb-music-btn:hover,
.mb-top-btn:hover {
  transform: scale(1.06);
  background: var(--primary);
  color: #ffffff;
}

.mb-music-btn svg,
.mb-top-btn svg {
  width: 1.2rem;
  height: 1.2rem;
}

.mb-music-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.mb-music-btn.is-playing .mb-music-icon-wrap {
  animation: spinSlow 8s linear infinite;
}

.mb-music-mute-line {
  position: absolute;
  width: 1.35rem;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
  pointer-events: none;
}

.mb-music-btn.is-playing .mb-music-mute-line {
  display: none;
}

/* ==========================================================================
   3. Page Shell & Main Card Container
   ========================================================================== */
.mb-page-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 0;
}

.mb-main-container {
  width: 100%;
  max-width: 100%;
  background-color: var(--ivory);
  position: relative;
  overflow: hidden;
  box-shadow: none;
  border: 0;
}

@media (min-width: 640px) {
  .mb-page-shell {
    padding: 2rem 1rem;
  }

  .mb-main-container {
    max-width: 800px;
    border-radius: 36px;
    box-shadow: 0 20px 60px rgba(58, 75, 92, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.65);
  }
}

/* Scroll Reveal Transitions */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s ease-out, transform 0.85s ease-out;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   4. Section 1: Hero Section (Arch Frame)
   ========================================================================== */
.mb-hero {
  position: relative;
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mb-hero-floral-svg {
  width: 9rem;
  height: 4rem;
  color: var(--babyblue);
  margin-bottom: 0.75rem;
  opacity: 0.92;
}

.mb-hero-display {
  font-family: var(--font-display);
  font-size: 2.35rem;
  line-height: 1.18;
  color: var(--deepblue);
  letter-spacing: 0.06em;
  font-weight: 400;
  margin: 0 0 1.5rem;
}

@media (min-width: 640px) {
  .mb-hero-display {
    font-size: 2.625rem;
  }
}

.mb-hero-italic {
  font-style: italic;
  color: var(--primary);
}

/* Arch-Shaped Hero Photo Frame */
.mb-arch-wrap {
  position: relative;
  width: 16rem;
  margin: 0 auto 1.75rem;
}

@media (min-width: 640px) {
  .mb-arch-wrap {
    width: 18rem;
  }
}

.mb-arch-outer-ring {
  position: absolute;
  inset: -0.625rem;
  border-radius: 9999px 9999px 1.5rem 1.5rem;
  border: 1px solid rgba(147, 183, 224, 0.72);
  pointer-events: none;
}

.mb-arch-frame {
  position: relative;
  border-radius: 9999px 9999px 1rem 1rem;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 12px 28px rgba(58, 75, 92, 0.14);
  background: rgba(255, 255, 255, 0.7);
  border: 4px solid #ffffff;
}

.mb-hero-slides {
  position: absolute;
  inset: 0;
}

.mb-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.mb-hero-slide.is-active {
  opacity: 1;
}

.mb-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1s ease;
}

.mb-arch-frame:hover .mb-hero-slide.is-active img {
  transform: scale(1.05);
}

.mb-arch-gradient {
  position: absolute;
  inset: auto 0 0 0;
  height: 5rem;
  background: linear-gradient(to top, rgba(58, 75, 92, 0.38), transparent);
  pointer-events: none;
}

/* Couple Names */
.mb-hero-names {
  margin-bottom: 1.25rem;
}

.mb-hero-couple-en {
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  color: var(--primary);
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

.mb-hero-couple-zh {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--deepblue);
  letter-spacing: 0.18em;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.mb-hero-amp {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--babyblue);
  font-weight: 400;
}

/* Date Capsule Pill */
.mb-hero-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(147, 183, 224, 0.52);
  box-shadow: 0 2px 10px rgba(121, 152, 182, 0.08);
}

.mb-hero-date-num {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--deepblue);
  font-weight: 600;
}

.mb-hero-date-dot {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background: var(--babyblue);
}

.mb-hero-date-day {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--primary);
}

/* ==========================================================================
   5. Common Section Typography & Headers
   ========================================================================== */
.mb-section {
  padding: 2rem 1.5rem;
}

.mb-section-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.mb-section-kicker {
  font-family: var(--font-display);
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.25rem;
}

.mb-section-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--deepblue);
  letter-spacing: 0.2em;
  font-weight: 600;
  margin: 0;
}

.mb-section-desc {
  font-size: 0.75rem;
  color: rgba(74, 70, 64, 0.78);
  margin: 0.35rem 0 0;
}

/* ==========================================================================
   6. Section 2: Invitation Message Card (#invitation-quote)
   ========================================================================== */
.mb-invitation-card {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 1.85rem 1.65rem;
  text-align: center;
  border: 1px solid #ffffff;
  box-shadow: 0 8px 30px rgba(121, 152, 182, 0.08);
}

.mb-script-kicker {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--babyblue);
  font-size: 1.125rem;
  display: block;
  margin-bottom: 0.2rem;
}

.mb-star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.mb-star-line {
  height: 1px;
  width: 2.5rem;
  background: rgba(147, 183, 224, 0.6);
}

.mb-star-divider svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--babyblue);
}

.mb-invitation-poem {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  line-height: 2;
  color: var(--warmgray);
  letter-spacing: 0.06em;
  margin: 0 0 1.15rem;
}

.mb-invitation-sub {
  font-family: var(--font-serif);
  font-size: 0.84rem;
  line-height: 1.9;
  color: rgba(58, 75, 92, 0.9);
  letter-spacing: 0.06em;
  margin: 0;
}

.mb-couple-sig-grid {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(147, 183, 224, 0.28);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: rgba(74, 70, 64, 0.9);
  letter-spacing: 0.06em;
}

.mb-couple-avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto 0.65rem;
  padding: 4px;
  border-radius: 50%;
  border: 1px solid rgba(147, 183, 224, 0.7);
  background: transparent;
  box-sizing: border-box;
}

.mb-couple-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
}

.mb-sig-role {
  display: block;
  color: var(--primary);
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

.mb-sig-name {
  display: block;
  font-weight: 600;
  color: var(--deepblue);
  font-size: 0.92rem;
}

.mb-sig-en {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--warmgray);
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

/* ==========================================================================
   7. Section 3: Countdown Timer (#countdown-section)
   ========================================================================== */
.mb-countdown-section {
  padding: 1.5rem 1.5rem;
  text-align: center;
}

.mb-countdown-heading {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--deepblue);
  letter-spacing: 0.2em;
  font-weight: 500;
  margin: 0 0 1.25rem;
}

.mb-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  max-width: 24rem;
  margin: 0 auto;
}

.mb-cd-box {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  padding: 0.88rem 0.5rem;
  border: 1px solid rgba(147, 183, 224, 0.42);
  box-shadow: 0 2px 8px rgba(121, 152, 182, 0.06);
}

.mb-cd-num {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--deepblue);
  display: block;
  line-height: 1.1;
}

.mb-cd-num.is-accent {
  color: var(--primary);
}

.mb-cd-label {
  font-size: 0.68rem;
  color: var(--primary);
  letter-spacing: 0.12em;
  margin-top: 0.28rem;
  display: block;
}

/* ==========================================================================
   8. Section 4: Our Love Story (#story)
   ========================================================================== */
.mb-story-featured-photo {
  margin-bottom: 1.4rem;
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 24px rgba(58, 75, 92, 0.1);
  aspect-ratio: 16 / 10;
}

.mb-story-featured-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mb-story-timeline {
  position: relative;
  border-left: 1.5px solid rgba(147, 183, 224, 0.65);
  margin-left: 0.75rem;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.story-item {
  position: relative;
}

.mb-story-dot {
  position: absolute;
  left: -1.84rem;
  top: 0.9rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 9999px;
  background: var(--babyblue);
  border: 2.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(121, 152, 182, 0.3);
}

.story-item:last-child .mb-story-dot {
  background: var(--primary);
}

.mb-story-card {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 4px 16px rgba(121, 152, 182, 0.08);
}

.mb-story-card small {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--primary);
  background: var(--ivory);
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.mb-story-card h3 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--deepblue);
  margin: 0 0 0.3rem;
}

.mb-story-card p {
  font-size: 0.78rem;
  color: var(--warmgray);
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================================
   9. Section 5: Wedding Timeline & Venue Cards (#details)
   ========================================================================== */
.mb-details-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mb-info-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 1.5rem;
  border: 1px solid #ffffff;
  box-shadow: 0 4px 18px rgba(121, 152, 182, 0.08);
  position: relative;
  overflow: hidden;
}

.mb-card-corner-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 5rem;
  height: 5rem;
  background: rgba(147, 183, 224, 0.16);
  border-bottom-left-radius: 9999px;
  pointer-events: none;
}

.mb-info-card-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.mb-info-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 16px;
  background: rgba(147, 183, 224, 0.22);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.mb-info-icon-box svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mb-info-head-text {
  flex: 1;
  min-width: 0;
}

.mb-time-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--ivory);
  padding: 0.18rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.38rem;
}

.mb-info-card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--deepblue);
  margin: 0 0 0.25rem;
}

.mb-info-card-sub {
  font-size: 0.875rem;
  color: var(--warmgray);
  font-weight: 500;
  margin: 0;
}

.mb-info-card-addr {
  font-size: 0.75rem;
  color: rgba(74, 70, 64, 0.8);
  margin: 0.2rem 0 0;
}

.mb-time-note {
  font-size: 0.75rem;
  color: var(--primary);
  margin: 0.2rem 0 0;
}

/* Schedule Items inside Card A */
.mb-schedule-list {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(147, 183, 224, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.schedule-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(239, 233, 217, 0.52);
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
}

.schedule-item time {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  background: #ffffff;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
}

.schedule-item h3 {
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--deepblue);
  margin: 0 0 0.15rem;
}

.schedule-item p {
  font-size: 0.74rem;
  color: rgba(74, 70, 64, 0.82);
  margin: 0;
  line-height: 1.5;
}

/* Transport & Map inside Card B */
.mb-transport-note {
  margin-top: 0.9rem;
  background: rgba(239, 233, 217, 0.55);
  border-radius: 14px;
  padding: 0.75rem 0.95rem;
  font-size: 0.75rem;
  color: rgba(74, 70, 64, 0.85);
  line-height: 1.65;
}

.mb-transport-note p {
  margin: 0;
}

.mb-map-embed {
  margin-top: 0.9rem;
  width: 100%;
  height: 195px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(147, 183, 224, 0.35);
}

.mb-map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.mb-venue-actions {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(147, 183, 224, 0.22);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.mb-btn-primary,
.mb-btn-secondary {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.25s ease;
}

.mb-btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(121, 152, 182, 0.25);
}

.mb-btn-primary:hover {
  background: var(--deepblue);
}

.mb-btn-secondary {
  background: #ffffff;
  color: var(--primary);
  border: 1px solid rgba(121, 152, 182, 0.6);
}

.mb-btn-secondary:hover {
  background: rgba(121, 152, 182, 0.1);
}

.mb-btn-primary svg,
.mb-btn-secondary svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ==========================================================================
   10. Section 6: Photo Gallery (#gallery / #gallery-grid)
   ========================================================================== */
.mb-gallery-grid-wrap {
  position: relative;
}

.mb-gallery-grid-wrap.is-carousel-ready {
  display: block;
}

.gallery-carousel-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 20px;
}

.gallery-carousel-track {
  display: flex;
  width: 100%;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.gallery-carousel-page {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.mb-photo-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.45rem;
  border-radius: 18px;
  overflow: hidden;
  border: 0;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(58, 75, 92, 0.08);
  aspect-ratio: 3 / 4;
  max-height: 440px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.mb-photo-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 13px;
  overflow: hidden;
}

.mb-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.6s ease;
}

.mb-photo-card:hover img {
  transform: scale(1.05);
}

.mb-photo-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 0.85rem 0.65rem;
  background: linear-gradient(to top, rgba(58, 75, 92, 0.72), transparent);
  color: #ffffff;
  text-align: left;
}

.mb-photo-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  margin: 0;
}

.mb-photo-caption {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  margin: 0.15rem 0 0;
  opacity: 0.92;
}

/* Gallery Pagination Controls */
.gallery-pager {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.gallery-pager-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.gallery-nav-btn {
  padding: 0.38rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(147, 183, 224, 0.55);
  color: var(--deepblue);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  transition: all 0.25s ease;
}

.gallery-nav-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.gallery-page-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gallery-page-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  border: 0;
  padding: 0;
  background: rgba(147, 183, 224, 0.5);
  transition: all 0.25s ease;
}

.gallery-page-dot.is-active {
  width: 1.35rem;
  background: var(--primary);
}

/* ==========================================================================
   11. Section 7: RSVP Form (#rsvp)
   ========================================================================== */
.mb-rsvp-section {
  padding: 2.5rem 1.5rem 2.5rem;
}

.mb-rsvp-card {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 1.75rem 1.5rem;
  border: 1px solid #ffffff;
  box-shadow: 0 10px 35px rgba(121, 152, 182, 0.12);
}

.mb-rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mb-field,
.ed-field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.mb-field > span,
.mb-field-label,
.ed-field > span {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--deepblue);
}

.mb-required {
  color: var(--primary);
  text-decoration: none;
}

.mb-field input[type="text"],
.mb-field input[type="tel"],
.mb-field select,
.mb-field textarea,
.ed-field input,
.ed-field select {
  width: 100%;
  padding: 0.68rem 0.9rem;
  border-radius: 12px;
  background: rgba(239, 233, 217, 0.6);
  border: 1px solid rgba(147, 183, 224, 0.45);
  color: var(--deepblue);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.mb-field input:focus,
.mb-field select:focus,
.mb-field textarea:focus,
.ed-field input:focus,
.ed-field select:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.mb-radio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.mb-radio-option {
  position: relative;
  cursor: pointer;
}

.mb-radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mb-radio-box {
  padding: 0.68rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(147, 183, 224, 0.5);
  background: rgba(239, 233, 217, 0.42);
  text-align: center;
  font-size: 0.78rem;
  color: var(--warmgray);
  font-weight: 500;
  transition: all 0.25s ease;
}

.mb-radio-option input[type="radio"]:checked + .mb-radio-box {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.mb-guest-fields {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mb-form-grid,
.ed-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 380px) {
  .mb-form-grid,
  .ed-form-grid {
    grid-template-columns: 1fr;
  }
}

.mb-extra-checks,
.ed-extra-checks {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mb-check-item,
.ed-check-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--warmgray);
  cursor: pointer;
}

.mb-check-item input[type="checkbox"],
.ed-check-item input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
}

.rsvp-custom-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mb-submit-btn {
  width: 100%;
  padding: 0.88rem 1rem;
  border-radius: 12px;
  border: 0;
  background: var(--primary);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  box-shadow: 0 4px 14px rgba(121, 152, 182, 0.3);
  transition: background-color 0.25s ease, transform 0.2s ease;
  margin-top: 0.25rem;
}

.mb-submit-btn:hover {
  background: var(--deepblue);
}

.mb-submit-btn:active {
  transform: scale(0.99);
}

.mb-form-status {
  text-align: center;
  font-size: 0.8rem;
  color: var(--deepblue);
  margin: 0.25rem 0 0;
}

/* ==========================================================================
   12. Section 8: Footer
   ========================================================================== */
.mb-footer {
  padding: 1rem 1.5rem 3rem;
  text-align: center;
}

.mb-footer-floral {
  width: 6rem;
  height: 2.5rem;
  color: var(--babyblue);
  margin: 0 auto 0.75rem;
  opacity: 0.85;
}

.mb-footer-closing-text {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--warmgray);
  line-height: 1.75;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 0.85rem;
}

.mb-footer-couple {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--deepblue);
  letter-spacing: 0.08em;
  margin: 0;
}

.mb-footer-date {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--primary);
  letter-spacing: 0.16em;
  margin: 0.2rem 0 0;
}

.mb-footer-credit {
  font-size: 0.68rem;
  color: var(--primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0.35rem 0 0;
}

/* ==========================================================================
   13. Lightbox Modal & Toast
   ========================================================================== */
.mb-lightbox {
  border: 1px solid rgba(147, 183, 224, 0.45);
  border-radius: 20px;
  padding: 0.85rem;
  background: var(--ivory);
  color: var(--deepblue);
  max-width: min(92vw, 480px);
  width: 100%;
  box-shadow: 0 25px 60px rgba(58, 75, 92, 0.35);
}

.mb-lightbox::backdrop {
  background: rgba(58, 75, 92, 0.82);
  backdrop-filter: blur(4px);
}

.mb-lb-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 5;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 9999px;
  border: 0;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mb-lb-stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  aspect-ratio: 3 / 4;
}

.mb-lb-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mb-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 9999px;
  border: 0;
  background: rgba(255, 255, 255, 0.82);
  color: var(--deepblue);
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mb-lb-prev {
  left: 0.6rem;
}

.mb-lb-next {
  right: 0.6rem;
}

.mb-lb-caption {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--deepblue);
  margin: 0.75rem 0 0.25rem;
  letter-spacing: 0.08em;
}

/* Toast Notification */
.mb-toast {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translate(-50%, -1rem);
  z-index: 95;
  background: rgba(58, 75, 92, 0.95);
  color: var(--ivory);
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(147, 183, 224, 0.45);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  box-shadow: 0 10px 25px rgba(58, 75, 92, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mb-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* Section Entrance Animation */
.section-reveal > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.section-reveal.is-section-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.section-reveal.is-section-visible > *:nth-child(1) { transition-delay: 0.05s; }
.section-reveal.is-section-visible > *:nth-child(2) { transition-delay: 0.12s; }
.section-reveal.is-section-visible > *:nth-child(3) { transition-delay: 0.20s; }
.section-reveal.is-section-visible > *:nth-child(4) { transition-delay: 0.28s; }
.section-reveal.is-section-visible > *:nth-child(5) { transition-delay: 0.34s; }
.section-reveal.is-section-visible > *:nth-child(6) { transition-delay: 0.40s; }

#story-list.section-reveal.is-section-visible > .story-item:nth-child(1),
.story-list.section-reveal.is-section-visible > .story-item:nth-child(1),
#mc-story-entries.section-reveal.is-section-visible > *:nth-child(1),
#schedule.section-reveal.is-section-visible > .schedule-item:nth-child(1),
.schedule.section-reveal.is-section-visible > .schedule-item:nth-child(1),
#mc-timeline-box.section-reveal.is-section-visible > *:nth-child(1) { transition-delay: 0.15s; }
#story-list.section-reveal.is-section-visible > .story-item:nth-child(2),
.story-list.section-reveal.is-section-visible > .story-item:nth-child(2),
#mc-story-entries.section-reveal.is-section-visible > *:nth-child(2),
#schedule.section-reveal.is-section-visible > .schedule-item:nth-child(2),
.schedule.section-reveal.is-section-visible > .schedule-item:nth-child(2),
#mc-timeline-box.section-reveal.is-section-visible > *:nth-child(2) { transition-delay: 0.60s; }
#story-list.section-reveal.is-section-visible > .story-item:nth-child(3),
.story-list.section-reveal.is-section-visible > .story-item:nth-child(3),
#mc-story-entries.section-reveal.is-section-visible > *:nth-child(3),
#schedule.section-reveal.is-section-visible > .schedule-item:nth-child(3),
.schedule.section-reveal.is-section-visible > .schedule-item:nth-child(3),
#mc-timeline-box.section-reveal.is-section-visible > *:nth-child(3) { transition-delay: 1.05s; }
#story-list.section-reveal.is-section-visible > .story-item:nth-child(4),
.story-list.section-reveal.is-section-visible > .story-item:nth-child(4),
#mc-story-entries.section-reveal.is-section-visible > *:nth-child(4),
#schedule.section-reveal.is-section-visible > .schedule-item:nth-child(4),
.schedule.section-reveal.is-section-visible > .schedule-item:nth-child(4),
#mc-timeline-box.section-reveal.is-section-visible > *:nth-child(4) { transition-delay: 1.50s; }
#story-list.section-reveal.is-section-visible > .story-item:nth-child(5),
.story-list.section-reveal.is-section-visible > .story-item:nth-child(5),
#mc-story-entries.section-reveal.is-section-visible > *:nth-child(5),
#schedule.section-reveal.is-section-visible > .schedule-item:nth-child(5),
.schedule.section-reveal.is-section-visible > .schedule-item:nth-child(5),
#mc-timeline-box.section-reveal.is-section-visible > *:nth-child(5) { transition-delay: 1.95s; }
#story-list.section-reveal.is-section-visible > .story-item:nth-child(6),
.story-list.section-reveal.is-section-visible > .story-item:nth-child(6),
#mc-story-entries.section-reveal.is-section-visible > *:nth-child(6),
#schedule.section-reveal.is-section-visible > .schedule-item:nth-child(6),
.schedule.section-reveal.is-section-visible > .schedule-item:nth-child(6),
#mc-timeline-box.section-reveal.is-section-visible > *:nth-child(6) { transition-delay: 2.40s; }
#story-list.section-reveal.is-section-visible > .story-item:nth-child(7),
.story-list.section-reveal.is-section-visible > .story-item:nth-child(7),
#mc-story-entries.section-reveal.is-section-visible > *:nth-child(7),
#schedule.section-reveal.is-section-visible > .schedule-item:nth-child(7),
.schedule.section-reveal.is-section-visible > .schedule-item:nth-child(7),
#mc-timeline-box.section-reveal.is-section-visible > *:nth-child(7) { transition-delay: 2.85s; }
#story-list.section-reveal.is-section-visible > .story-item:nth-child(8),
.story-list.section-reveal.is-section-visible > .story-item:nth-child(8),
#mc-story-entries.section-reveal.is-section-visible > *:nth-child(8),
#schedule.section-reveal.is-section-visible > .schedule-item:nth-child(8),
.schedule.section-reveal.is-section-visible > .schedule-item:nth-child(8),
#mc-timeline-box.section-reveal.is-section-visible > *:nth-child(8) { transition-delay: 3.30s; }

@media (prefers-reduced-motion: reduce) {
  .section-reveal > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.gallery-carousel-page.is-single-card span {
  display: block;
  width: 100%;
  text-align: center;
}

#rsvp-form,
#rsvp-form * {
  font-family: 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
}

.mobile-home-fab {
  display: none;
}

@media (max-width: 760px) {
  .mobile-home-fab {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    padding: 0 12px 0 8px;
    border-radius: 999px;
    background: rgba(42, 34, 30, 0.36);
    color: rgba(255, 252, 247, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.36);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-decoration: none;
    line-height: 1;
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
  }

  .mobile-home-fab svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .mobile-home-fab:active {
    transform: scale(0.96);
    background: rgba(42, 34, 30, 0.52);
  }
}


/* ==========================================================================
   親友的祝福 (Words of Love — 寶寶藍歐式莊園配色)
   ========================================================================== */
.blessings {
  background: #2f4156;
  color: #f4f1ea;
  text-align: center;
  padding: 84px 8%;
}

.blessings-heading {
  margin-bottom: 28px;
}

.blessings-heading .eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: #b7d0ec;
  margin-bottom: 10px;
}

.blessings-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.16em;
  color: #f4f1ea;
}

.blessings-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 auto 38px;
}

.blessings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 128px;
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.08em;
  border: 1px solid rgba(183, 208, 236, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.blessings-btn:hover {
  transform: translateY(-1px);
}

.blessings-btn-secondary {
  background: #5d7fa3;
  color: #ffffff;
}

.blessings-btn-secondary:hover {
  background: #4d6d8f;
}

.blessings-btn-secondary.is-loading {
  opacity: 0.78;
  cursor: wait;
  pointer-events: none;
}

.blessings-btn-secondary.is-loading svg {
  animation: blessingSpin 0.75s linear infinite;
}

@keyframes blessingSpin {
  to {
    transform: rotate(360deg);
  }
}

.blessings-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 12px;
  max-width: 820px;
  margin: 0 auto;
  transition: opacity 0.25s ease;
}

.blessings-cloud.is-loading {
  opacity: 0.25;
}

.blessings-card {
  background: rgba(239, 233, 217, 0.94);
  color: #243447;
  border-radius: 26px;
  padding: 13px 22px;
  max-width: min(360px, 100%);
  text-align: left;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0.03em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  word-break: break-word;
  white-space: pre-line;
  will-change: transform, opacity;
  animation:
    blessingPopIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--enter-delay, 0ms) both,
    blessingSway 4.8s ease-in-out calc(var(--enter-delay, 0ms) + 0.5s) infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@keyframes blessingPopIn {
  0% {
    opacity: 0;
    scale: 0.78;
  }
  70% {
    opacity: 1;
    scale: 1.04;
  }
  100% {
    opacity: 1;
    scale: 1;
  }
}

.blessings-card:nth-child(2n) {
  animation-duration: 0.5s, 5.6s;
  animation-delay: var(--enter-delay, 0ms), -1.4s;
}

.blessings-card:nth-child(3n) {
  animation-duration: 0.5s, 6.2s;
  animation-delay: var(--enter-delay, 0ms), -2.8s;
}

.blessings-card:nth-child(4n) {
  animation-duration: 0.5s, 5.1s;
  animation-delay: var(--enter-delay, 0ms), -0.9s;
}

.blessings-card:hover {
  animation-play-state: paused;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

@keyframes blessingSway {
  0%, 100% {
    transform: translate(0, 0) rotate(-1.6deg);
  }
  25% {
    transform: translate(4px, -9px) rotate(1.1deg);
  }
  50% {
    transform: translate(-3px, -13px) rotate(1.8deg);
  }
  75% {
    transform: translate(-5px, -6px) rotate(-1.2deg);
  }
}

.blessings-card.is-short {
  text-align: center;
  border-radius: 999px;
  padding: 11px 24px;
}

.blessings-empty {
  color: #cfdce8;
  font-size: 13px;
  margin: 16px auto 0;
}

@media (max-width: 760px) {
  .blessings {
    padding: 64px 6%;
  }

  .blessings-heading h2 {
    font-size: 24px;
  }

  .blessings-card {
    font-size: 13.5px;
    padding: 12px 18px;
  }
}
