/* ==========================================================================
   website04 — 歐式極簡・微風花語 (Floral Breeze Minimalist Wedding Template)
   遇幸福電子喜帖工作室 原創版型樣式
   ========================================================================== */

:root {
  --wine: #996E6D;
  --primary: var(--wine);
  --fb-rose-deep: var(--wine);
  --fb-rose-dark: color-mix(in srgb, var(--wine) 82%, #ffffff);
  --fb-rose-mid: color-mix(in srgb, var(--wine) 62%, #f7e6e6);
  --fb-rose-soft: color-mix(in srgb, var(--wine) 22%, #faf3f3);
  --fb-rose-mist: color-mix(in srgb, var(--wine) 12%, #fdf9f9);
  --fb-white: #ffffff;
  --fb-text: #3d3232;
  --fb-muted: #7a6666;
  --font-sans: 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --font-serif: 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --font-script: Georgia, 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
  font-family: var(--font-sans);
  color: var(--fb-text);
  background: var(--fb-white);
  height: auto !important;
  min-height: 100%;
  overflow-x: clip;
}

body.fb-body {
  margin: 0;
  padding: 0;
  height: auto !important;
  min-height: 100%;
  color: var(--fb-text);
  background: var(--fb-white);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  overflow-x: clip;
}

body.fb-body.is-intro-playing {
  overflow: hidden;
}

/* Complete Flow Layout Reset */
#app {
  position: relative;
  height: auto !important;
  overflow: visible !important;
  scroll-snap-type: none !important;
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 50px rgba(74, 63, 61, 0.12);
  padding: 0 !important;
}

@media (max-width: 760px) {
  #app {
    max-width: 480px;
    margin: 0;
    box-shadow: none;
  }
}

section,
footer {
  height: auto !important;
  min-height: 0;
  scroll-snap-align: none !important;
  display: block;
  position: relative;
  text-align: center;
  padding: 0;
}

section::before,
footer::before {
  display: none !important;
  content: none !important;
}

section > *,
footer > * {
  max-width: none;
  width: auto;
  position: relative;
  animation: none;
}

#venue-name::before {
  display: none !important;
  content: none !important;
}

p {
  color: inherit;
  font-size: inherit;
  line-height: 1.8;
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* Accessibility Skip Link & Screen Reader Helpers */
.skip {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}

.skip:focus {
  position: fixed !important;
  left: 16px !important;
  top: 16px !important;
  width: auto;
  height: auto;
  padding: 10px 18px;
  background: #ffffff;
  color: var(--wine);
  border: 2px solid var(--wine);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.fb-sr-only,
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Custom Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  background-color: var(--fb-rose-mist);
}

::-webkit-scrollbar-thumb {
  background-color: var(--fb-rose-dark);
  border-radius: 4px;
}

/* ==================== 1. 首屏自動花語動畫 ==================== */
.fb-intro-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: linear-gradient(145deg, var(--fb-rose-mid) 0%, var(--fb-rose-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.85s;
}

.fb-intro-screen.is-leaving {
  opacity: 0;
  transform: translateY(-2.5%) scale(1.02);
  pointer-events: none;
}

.fb-intro-screen.is-hidden {
  display: none !important;
  visibility: hidden;
}

.fb-intro-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.fb-ambient-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fb-ring-1 {
  width: min(72vw, 400px);
  height: min(72vw, 400px);
  animation: fbAmbientPulse 4.5s ease-in-out infinite;
}

.fb-ring-2 {
  width: min(88vw, 540px);
  height: min(88vw, 540px);
  border-style: dashed;
  animation: fbAmbientRotate 28s linear infinite;
}

.fb-intro-card {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 360px;
  width: 90%;
}

.fb-intro-flower-wrap {
  width: 108px;
  height: 108px;
  margin: 0 auto 0.85rem;
  color: #ffffff;
}

.fb-intro-svg {
  width: 100%;
  height: 100%;
  margin: 0 auto;
  overflow: visible;
  animation: fbFlowerFloat 3.2s ease-in-out infinite;
}

.fb-draw-circle {
  transform-origin: 70px 70px;
  animation: fbAmbientRotate 18s linear infinite;
  opacity: 0.65;
}

.fb-draw-ring {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: fbDrawLine 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fb-draw-petal,
.fb-draw-stem {
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: fbDrawLine 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.fb-petal-2 {
  animation-delay: 0.28s;
}

.fb-petal-3 {
  animation-delay: 0.4s;
}

.fb-flower-dot {
  opacity: 0;
  transform-origin: 70px 14px;
  animation: fbDotPop 0.6s ease 0.75s forwards;
}

.fb-loader-eyebrow {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.88;
  margin-bottom: 0.4rem;
}

.fb-loader-monogram {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.2rem;
}

.fb-loader-monogram em {
  font-family: var(--font-script);
  font-size: 1.85rem;
  font-style: normal;
  font-weight: 400;
}

.fb-loader-eng {
  font-family: var(--font-script);
  font-size: 2.3rem;
  line-height: 1.15;
  margin: 0.1rem 0 0.25rem;
  color: #ffffff;
}

.fb-loader-chi {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.94);
}

.fb-loader-progress {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, 0.26);
  border-radius: 99px;
  margin: 0 auto 0.65rem;
  overflow: hidden;
}

.fb-loader-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: #ffffff;
  transform-origin: left center;
  animation: fbProgressFill 1.75s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.fb-loader-date {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.9);
}

@keyframes fbDrawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fbDotPop {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fbProgressFill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes fbFlowerFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes fbAmbientPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0.85;
  }
}

@keyframes fbAmbientRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ==================== 2. 首屏主視覺與導覽列 ==================== */
.fb-hero-shell {
  position: relative;
  width: 100%;
  max-width: 800px;
  padding: 0;
  margin: 0 auto;
}

.fb-hero {
  position: relative;
  min-height: 100vh !important;
  min-height: 100svh !important;
  width: 100%;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  color: #ffffff;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 12px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  padding: 0 !important;
}

.fb-hero-bg-wrap {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  z-index: 0 !important;
  overflow: hidden;
  pointer-events: none;
}

.fb-hero .hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  animation: fbHeroKenBurns 18s ease-in-out infinite alternate;
}

@keyframes fbHeroKenBurns {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.1);
  }
}

.fb-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    color-mix(in srgb, var(--wine) 72%, rgba(22, 12, 12, 0.72)) 0%,
    color-mix(in srgb, var(--wine) 56%, rgba(25, 14, 14, 0.54)) 22%,
    color-mix(in srgb, var(--wine) 34%, rgba(28, 16, 16, 0.30)) 44%,
    color-mix(in srgb, var(--wine) 12%, rgba(30, 18, 18, 0.10)) 62%,
    transparent 78%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.85) 24%, rgba(0, 0, 0, 0.4) 48%, transparent 74%);
  -webkit-mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.85) 24%, rgba(0, 0, 0, 0.4) 48%, transparent 74%);
}

/* Floating Light Petals in Hero */
.fb-floating-petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.fb-floating-petals span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50% 0 50% 50%;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
  animation: fbFloatUp 11s linear infinite;
}

.fb-floating-petals span:nth-child(1) { left: 14%; bottom: -10%; animation-duration: 10s; animation-delay: 0s; }
.fb-floating-petals span:nth-child(2) { left: 32%; bottom: -10%; width: 5px; height: 5px; animation-duration: 13s; animation-delay: 2s; }
.fb-floating-petals span:nth-child(3) { left: 52%; bottom: -10%; width: 8px; height: 8px; animation-duration: 11.5s; animation-delay: 1s; }
.fb-floating-petals span:nth-child(4) { left: 68%; bottom: -10%; width: 6px; height: 6px; animation-duration: 14s; animation-delay: 3.5s; }
.fb-floating-petals span:nth-child(5) { left: 84%; bottom: -10%; width: 7px; height: 7px; animation-duration: 12s; animation-delay: 1.8s; }
.fb-floating-petals span:nth-child(6) { left: 24%; bottom: -10%; width: 5px; height: 5px; animation-duration: 15s; animation-delay: 4.2s; }

@keyframes fbFloatUp {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 0.65;
  }
  80% {
    opacity: 0.55;
  }
  100% {
    transform: translateY(-105vh) translateX(28px) rotate(220deg);
    opacity: 0;
  }
}

/* Mobile Navbar */
.fb-mobile-navbar {
  position: relative;
  z-index: 25;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  width: 100%;
}

.fb-mobile-brand {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.fb-mobile-brand em {
  font-family: var(--font-script);
  font-style: normal;
  font-size: 1.35rem;
}

.fb-navbar-burger {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.fb-navbar-burger span {
  display: block;
  width: 18px;
  height: 1.8px;
  background: #ffffff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.fb-navbar-burger.is-active span:nth-child(1) {
  transform: translateY(6.8px) rotate(45deg);
}

.fb-navbar-burger.is-active span:nth-child(2) {
  opacity: 0;
}

.fb-navbar-burger.is-active span:nth-child(3) {
  transform: translateY(-6.8px) rotate(-45deg);
}

.fb-mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(45, 25, 25, 0.2);
  padding: 0.65rem;
  flex-direction: column;
}

.fb-mobile-menu.is-active {
  display: flex;
}

.fb-mobile-menu a {
  color: var(--wine);
  text-decoration: none;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
}

.fb-mobile-menu a:hover {
  background: var(--fb-rose-mist);
}

/* Hero Body Content */
.fb-hero-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1.25rem 10svh;
  width: 100%;
}

.fb-hero-container {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

/* Staggered Entrance Animations after Preloader */
.fb-hero-anim {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

body.fb-body:not(.is-intro-playing) .fb-hero-anim {
  opacity: 1;
  transform: translateY(0);
}

body.fb-body:not(.is-intro-playing) .fb-anim-1 { transition-delay: 0.06s; }
body.fb-body:not(.is-intro-playing) .fb-anim-2 { transition-delay: 0.18s; }
body.fb-body:not(.is-intro-playing) .fb-anim-3 { transition-delay: 0.3s; }
body.fb-body:not(.is-intro-playing) .fb-anim-4 { transition-delay: 0.42s; }
body.fb-body:not(.is-intro-playing) .fb-anim-5 { transition-delay: 0.54s; }
body.fb-body:not(.is-intro-playing) .fb-anim-6 { transition-delay: 0.66s; }

.fb-hero-subtitle {
  margin: 0 0 0.65rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.76rem, 1.6vw, 0.92rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 500;
}

.fb-hero-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3.2rem, 7.8vw, 5.2rem);
  line-height: 1.08;
  color: #ffffff;
  margin: 0.15rem 0 0.4rem;
  transform: rotate(-2deg);
  text-shadow: 0 4px 20px rgba(35, 18, 18, 0.24);
}

body.fb-body:not(.is-intro-playing) .fb-hero-title {
  transform: translateY(0) rotate(-2deg);
}

.fb-hero-chi {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.3vw, 1.42rem);
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.96);
  margin: 0 0 1.45rem;
  font-weight: 600;
}

.fb-hero-meta {
  font-size: clamp(0.92rem, 1.8vw, 1.06rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.fb-hero-meta strong {
  font-size: clamp(1rem, 2vw, 1.15rem);
  letter-spacing: 0.15em;
  font-weight: 700;
  color: #ffffff;
}

.fb-hero-meta small {
  font-size: 0.88rem;
  opacity: 0.88;
}

/* Hero Countdown */
.fb-hero-countdown-wrap {
  margin: 1rem auto 1.45rem;
  max-width: 100%;
}

.fb-hero-timer {
  list-style: none;
  margin: 0 auto;
  padding: 0.75rem 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  max-width: 100%;
}

.fb-hero-timer li {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}

.fb-hero-timer li.separator {
  min-width: auto;
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1;
  padding-bottom: 1rem;
  opacity: 0.75;
  color: #ffffff;
}

.fb-hero-timer span {
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.fb-hero-timer p {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.2;
}

/* Scroll Indicator */
.fb-scroll-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
}

.fb-mouse-icon {
  width: 20px;
  height: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}

.fb-mouse-wheel {
  width: 3px;
  height: 6px;
  border-radius: 99px;
  background: #ffffff;
  animation: fbMouseWheel 1.7s ease-in-out infinite;
}

@keyframes fbMouseWheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* Bottom Hero Navigation Bar */
.fb-nav-slot {
  height: 54px;
  width: 100%;
  flex-shrink: 0;
  position: relative;
  z-index: 15;
}

.fb-nav-bar {
  position: relative;
  z-index: 15;
  height: 54px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 1rem;
  transition: box-shadow 0.25s ease;
}

.fb-nav-bar.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  box-shadow: 0 4px 20px rgba(55, 35, 35, 0.1);
}

.fb-nav-inner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.fb-desktop-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.fb-desktop-nav ul li {
  display: inline-block;
}

.fb-desktop-nav ul li a {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  color: var(--wine);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-bottom: 2px solid transparent;
  transition: all 0.22s ease;
}

.fb-desktop-nav ul li.is-active a,
.fb-desktop-nav ul li a:hover {
  color: var(--wine);
  border-bottom-color: var(--fb-rose-dark);
}

/* ==================== 3. 主內容區塊共用樣式 ==================== */
.fb-main {
  color: var(--fb-text);
  font-family: var(--font-sans);
}

.fb-container {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  text-align: center;
}

.fb-sec-ivory {
  background-color: var(--fb-white);
  padding: 5rem 1.25rem !important;
  position: relative;
}

.fb-sec-blush {
  background-color: var(--fb-rose-mist);
  padding: 5rem 1.25rem !important;
  position: relative;
}

.fb-sec-rose {
  background-color: var(--fb-rose-soft);
  padding: 5rem 1.25rem !important;
  position: relative;
}

.fb-eyebrow {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fb-rose-dark);
  margin-bottom: 0.4rem;
}

.fb-main .section-title {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--wine);
  text-transform: uppercase;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: 0.14em;
  margin: 0 0 2.2rem;
}

/* Section 1: Greeting & Couple Names */
.fb-crest-wrap {
  margin-bottom: 1.35rem;
  color: var(--wine);
  text-align: center;
}

.fb-crest-svg {
  width: 190px;
  height: 46px;
  margin: 0 auto;
  display: block;
}

.fb-greeting-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  color: var(--wine);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.1em;
  margin: 0 auto 1rem;
}

.fb-lead-copy {
  font-size: 1rem;
  color: var(--fb-muted);
  max-width: 560px;
  margin: 0 auto 2.2rem;
  line-height: 1.85;
}

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

.wg-intro-portraits-wrap {
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin: 2.2rem auto 2.4rem;
  position: relative;
  z-index: 2;
}

.wg-person-card {
  width: min(320px, 38vw);
  position: relative;
  text-align: center;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.wg-intro-portraits-wrap.is-section-visible .wg-person-card,
.wg-person-card.active {
  opacity: 1;
  transform: translateY(0);
}

.wg-person-card:nth-child(2) {
  transition-delay: 0.15s;
}

.intro-pic {
  width: min(320px, 38vw);
  height: min(320px, 38vw);
  padding: 5px;
  margin: 0 auto 30px auto;
  border: 1px solid var(--wine);
  border-radius: 50%;
  position: relative;
  box-sizing: content-box;
  background: transparent;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.wg-person-card:hover .intro-pic {
  transform: scale(1.03);
  box-shadow: 0 0 26px rgba(153, 110, 109, 0.24);
}

.wg-circle-img-wrap {
  width: min(320px, 38vw);
  height: min(320px, 38vw);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.wg-circle-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
  transition: transform 0.65s ease;
}

.wg-person-card:hover .wg-circle-img-wrap img {
  transform: scale(1.07);
}

.wg-person-role {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.25em;
  color: var(--wine);
  text-align: center;
}

.wg-person-name {
  margin: 4px 0 0;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--fb-text, #3d2c2e);
  letter-spacing: 6px;
  text-align: center;
}

@media (max-width: 760px) {
  .wg-intro-portraits-wrap {
    gap: 14px;
    margin: 1.8rem auto 2rem;
  }

  .wg-person-card {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    max-width: 175px;
  }

  .intro-pic,
  .wg-circle-img-wrap {
    width: min(156px, 38vw);
    height: min(156px, 38vw);
  }

  .intro-pic {
    margin: 0 auto 20px auto;
  }

  .wg-person-name {
    font-size: 17px;
    letter-spacing: 4px;
  }
}

.fb-divider-wrap {
  margin-top: 2rem;
  color: var(--wine);
  text-align: center;
}

.fb-divider-svg {
  width: 220px;
  height: 38px;
  margin: 0 auto;
  display: block;
  animation: fbFlowerFloat 4s ease-in-out infinite;
}

/* ==================== 4. 我們的故事 (#story) ==================== */
.fb-story-section {
  border-top: 1px solid var(--fb-rose-mist);
}

.fb-story-lead {
  color: var(--fb-muted);
  font-size: 0.96rem;
  max-width: 540px;
  margin: -1rem auto 2.6rem;
}

.fb-story-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 2.25rem;
  align-items: center;
  text-align: left;
}

.fb-story-photo-frame {
  background: var(--fb-rose-mist);
  padding: 0.9rem;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(153, 110, 109, 0.12);
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
  transition: transform 0.35s ease;
}

.fb-story-photo-frame:hover {
  transform: translateY(-4px);
}

.fb-story-photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 440px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.fb-story-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  position: relative;
  padding-left: 1.35rem;
  border-left: 2px solid var(--fb-rose-soft);
}

.fb-story-list .story-item {
  position: relative;
  background: var(--fb-rose-mist);
  border: 1px solid var(--fb-rose-soft);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.fb-story-list .story-item::before {
  content: '';
  position: absolute;
  left: -1.78rem;
  top: 1.35rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--wine);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px var(--fb-rose-soft);
}

.fb-story-list .story-item:hover {
  transform: translateX(4px);
  box-shadow: 0 10px 24px rgba(153, 110, 109, 0.11);
}

.fb-story-list .story-item small {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--wine);
  background: #ffffff;
  padding: 0.14rem 0.65rem;
  border-radius: 99px;
  margin-bottom: 0.3rem;
}

.fb-story-list .story-item h3 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.14rem;
  font-weight: 600;
  color: var(--fb-text);
}

.fb-story-list .story-item p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--fb-muted);
}

/* ==================== 5. 婚宴時間與流程 (#details) ==================== */
.fb-time-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
  margin-bottom: 2.5rem;
  align-items: stretch;
}

.fb-time-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 1.75rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 26px rgba(153, 110, 109, 0.08);
  transition: transform 0.3s ease;
}

.fb-time-card:hover {
  transform: translateY(-4px);
}

.fb-date-week {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--fb-muted);
}

.fb-date-num {
  font-size: 4.4rem;
  font-family: var(--font-sans);
  font-weight: 900;
  line-height: 1.05;
  color: var(--wine);
  margin: 0.25rem 0;
}

.fb-date-ym {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--fb-text);
}

.fb-time-label {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  color: var(--fb-muted);
  text-transform: uppercase;
}

.fb-time-val {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  color: var(--wine);
  margin-bottom: 0.35rem;
}

.fb-time-sub {
  font-size: 0.85rem;
  color: var(--fb-muted);
}

/* 4-Stage Schedule Grid */
.fb-schedule-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.4rem;
  text-align: center;
}

.fb-schedule-grid .schedule-item {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.3rem 1rem;
  border: 1px solid var(--fb-rose-soft);
  box-shadow: 0 6px 18px rgba(153, 110, 109, 0.06);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.fb-schedule-grid .schedule-item:hover {
  transform: translateY(-4px);
  border-color: var(--fb-rose-mid);
}

.fb-schedule-grid .schedule-item time {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--wine);
  background: var(--fb-rose-mist);
  padding: 0.2rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 0.55rem;
}

.fb-schedule-grid .schedule-item h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--fb-text);
}

.fb-schedule-grid .schedule-item p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--fb-muted);
  line-height: 1.55;
}

/* Countdown Banner (#countdown) */
.fb-countdown-banner {
  margin: 0 auto 2rem;
}

.fb-countdown-boxes {
  display: inline-flex !important;
  flex-direction: row !important;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding: 0;
  background: transparent;
  border: none;
}

.fb-countdown-boxes > div {
  background: #ffffff;
  border: 1px solid var(--fb-rose-soft);
  border-radius: 12px;
  min-width: 72px;
  padding: 0.65rem 0.9rem;
  box-shadow: 0 4px 14px rgba(153, 110, 109, 0.08);
}

.fb-countdown-boxes strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--wine);
  line-height: 1.1;
}

.fb-countdown-boxes span {
  display: block;
  font-size: 0.74rem;
  color: var(--fb-muted);
  margin-top: 0.2rem;
}

/* CTA Button */
.fb-cta-row {
  margin-top: 1.4rem;
  text-align: center;
}

.fb-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background-color: var(--wine);
  color: #ffffff !important;
  min-width: 220px;
  height: 52px;
  padding: 0 1.6rem;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 2px solid var(--wine);
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(153, 110, 109, 0.24);
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}

.fb-cta-btn svg {
  flex-shrink: 0;
}

.fb-cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 26px rgba(153, 110, 109, 0.32);
}

/* ==================== 6. 宴客地點 (#venue) ==================== */
.fb-venue-box {
  max-width: 640px;
  margin: 0 auto 1.8rem;
}

.fb-venue-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wine);
  margin: 0 0 0.45rem;
}

.fb-venue-addr {
  font-style: normal;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fb-text);
  margin-bottom: 0.5rem;
}

.fb-venue-transport {
  font-size: 0.92rem;
  color: var(--fb-muted);
  margin: 0.35rem 0;
}

.fb-time-note {
  font-size: 0.85rem;
  color: var(--wine);
  margin-top: 0.4rem;
}

.fb-map-frame {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(85, 50, 50, 0.14);
  border: 4px solid #ffffff;
  background: #ffffff;
  max-width: 840px;
  margin: 0 auto 1.65rem;
}

.fb-map-frame iframe {
  display: block;
  width: 100%;
  height: 340px;
}

/* ==================== 7. 幸福影像相簿 (#gallery) ==================== */
.fb-section-sub {
  margin: 1rem auto 0;
  font-size: 10px;
  color: var(--fb-muted);
}

.fb-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.fb-photo-card {
  position: relative;
  border: none;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  height: 340px;
  background: var(--fb-rose-mist);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(60, 35, 35, 0.12);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fb-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.fb-photo-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 36px rgba(60, 35, 35, 0.18);
}

.fb-photo-card:hover img {
  transform: scale(1.07);
}

.fb-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(60, 20, 20, 0.06) 0%,
    rgba(60, 20, 20, 0.2) 52%,
    rgba(42, 22, 22, 0.84) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  text-align: left;
  color: #ffffff;
}

.fb-photo-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.fb-photo-caption {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
}

/* Gallery Pagination & Autoplay Carousel Controls (when > 3 photos) */
.gallery-pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.gallery-pager[hidden] {
  display: none !important;
}

.gallery-pager-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.gallery-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--fb-rose-mid);
  background: #ffffff;
  color: var(--fb-text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(153, 110, 109, 0.08);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.gallery-nav-btn:hover {
  background: var(--wine);
  color: #ffffff;
  border-color: var(--wine);
  transform: translateY(-1px);
}

.gallery-page-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gallery-page-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: var(--fb-rose-soft);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.gallery-page-dot.is-active {
  width: 24px;
  background: var(--wine);
}

.fb-tile-grid.is-carousel-ready {
  display: block !important;
  width: 100%;
  overflow: hidden;
}

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

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

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

.gallery-carousel-page.is-multi-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.gallery-carousel-page.is-single-card {
  display: block !important;
  overflow: hidden;
  box-shadow: none !important;
}

.gallery-carousel-page.is-single-card .fb-photo-card,
.gallery-carousel-page.is-single-card .fb-photo-card:hover {
  box-sizing: border-box !important;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: none !important;
}

.gallery-carousel-page .fb-photo-card {
  width: 100% !important;
  margin: 0 auto !important;
  opacity: 1 !important;
  transform: none !important;
}

.fb-tile-grid .fb-photo-card.is-page-hidden {
  display: none !important;
}

.fb-tile-grid .fb-photo-card.is-page-entering,
.fb-tile-grid .fb-photo-card.is-page-entering-next {
  animation: fbSlideFromRight 0.56s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fb-tile-grid .fb-photo-card.is-page-entering-prev {
  animation: fbSlideFromLeft 0.56s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fbSlideFromRight {
  from {
    opacity: 0;
    transform: translate3d(54px, 0, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes fbSlideFromLeft {
  from {
    opacity: 0;
    transform: translate3d(-54px, 0, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes fbPhotoPageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==================== 8. 出席回覆 (#rsvp) ==================== */
.fb-rsvp-lead {
  max-width: 580px;
  margin: -0.8rem auto 2rem;
  color: var(--fb-text);
  font-size: 0.96rem;
  line-height: 1.8;
}

.fb-rsvp-card {
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 2.1rem 1.85rem;
  box-shadow: 0 14px 38px rgba(153, 110, 109, 0.12);
  border: 1px solid var(--fb-rose-soft);
  text-align: left;
}

#rsvp-form {
  margin: 0;
  padding: 0;
}

#rsvp-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#rsvp-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fb-text);
  margin-bottom: 0.25rem;
}

#rsvp-form label span,
#rsvp-form legend span {
  color: var(--wine);
}

#rsvp-form input:not([type="radio"]):not([type="checkbox"]),
#rsvp-form select,
#rsvp-form textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin: 0.35rem 0 1rem;
  min-height: 42px;
  font-size: 0.92rem;
  background: var(--fb-rose-mist);
  border: 1px solid var(--fb-rose-soft);
  color: var(--fb-text);
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#rsvp-form textarea {
  resize: vertical;
  min-height: 84px;
}

#rsvp-form input:focus,
#rsvp-form select:focus,
#rsvp-form textarea:focus {
  outline: none;
  border-color: var(--wine);
  background: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wine) 18%, transparent);
}

#rsvp-form fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}

#rsvp-form legend {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fb-text);
  margin-bottom: 0.5rem;
}

#rsvp-form .radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  padding: 0.3rem 0;
  cursor: pointer;
}

#rsvp-form input[type="radio"],
#rsvp-form input[type="checkbox"] {
  accent-color: var(--wine);
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

#rsvp-form .rsvp-extra-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0.25rem 0 0.85rem;
}

#rsvp-form .child-seat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}

.fb-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--wine) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  height: 50px;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  transition: filter 0.22s ease, transform 0.22s ease;
}

.fb-submit-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.fb-submit-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

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

.fb-radio-option {
  position: relative;
  cursor: pointer;
  margin: 0;
}

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

.fb-radio-box {
  padding: 0.72rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--fb-rose-mid, rgba(153, 110, 109, 0.45));
  background: rgba(255, 255, 255, 0.75);
  color: var(--fb-ink, #3b2f2f);
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.4;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fb-radio-option input[type="radio"]:checked + .fb-radio-box {
  background: var(--wine, #996E6D);
  color: #ffffff;
  border-color: var(--wine, #996E6D);
}

#form-status {
  font-size: 0.88rem;
  color: var(--wine);
  font-weight: 600;
  line-height: 1.6;
  margin: 0.75rem 0 0;
}

.fb-rsvp-signoff {
  margin-top: 2.2rem;
  text-align: center;
}

.fb-with-love {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--fb-muted);
  text-transform: uppercase;
}

.fb-sign-couple {
  margin: 0.15rem 0 0;
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--wine);
}

/* ==================== 9. 頁尾、懸浮按鈕與燈箱 ==================== */
.fb-footer {
  background: var(--wine);
  color: #ffffff;
  padding: 3rem 1.25rem 2.5rem !important;
  text-align: center;
}

.fb-footer-closing {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: #ffffff;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.fb-footer .closing-names {
  margin: 0 0 1.2rem;
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.9);
}

.fb-footer .credits {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.fb-footer .credits p,
.fb-footer .credits a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  margin: 0;
  text-decoration: none;
}

.fb-footer .credits a:hover {
  text-decoration: underline;
}

/* Floating Back-to-Top & Music Toggle Buttons */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 66px;
  z-index: 800;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--wine);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(80, 40, 40, 0.28);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

.back-to-top:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.music {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 800;
  width: 38px;
  height: 38px;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--wine);
  border: 1px solid var(--fb-rose-soft);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(80, 40, 40, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.music:hover {
  transform: translateY(-2px);
}

.music svg {
  width: 17px;
  height: 17px;
  display: block;
}

.music:not(.is-playing):not([aria-pressed="true"])::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 1.6px;
  background: currentColor;
  transform: rotate(-45deg);
  border-radius: 2px;
  opacity: 0.72;
  pointer-events: none;
}

.music.is-playing,
.music[aria-pressed="true"] {
  background: var(--wine);
  color: #ffffff;
  border-color: var(--wine);
  box-shadow: 0 0 0 4px rgba(153, 110, 109, 0.22), 0 6px 20px rgba(80, 40, 40, 0.22);
}

.music.is-playing svg,
.music[aria-pressed="true"] svg {
  animation: fbMusicIconSpin 3.6s linear infinite;
}

@keyframes fbMusicIconSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.08);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

#global-status {
  position: fixed;
  right: 20px;
  bottom: 114px;
  z-index: 800;
  background: #ffffff;
  color: var(--wine);
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  max-width: 240px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

#global-status:empty {
  display: none;
}

/* Lightbox Dialog */
dialog#lightbox {
  padding: 12px;
  border: 0;
  border-radius: 12px;
  max-width: 92vw;
  max-height: 90vh;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

dialog#lightbox::backdrop {
  background: rgba(32, 18, 18, 0.85);
  backdrop-filter: blur(4px);
}

dialog#lightbox img {
  display: block;
  max-width: 84vw;
  max-height: 82vh;
  border-radius: 8px;
  object-fit: contain;
}

dialog#lightbox #close-lightbox {
  position: absolute;
  right: 18px;
  top: 18px;
  border: 0;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--wine);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  z-index: 5;
}

dialog#lightbox button.lb-nav-btn {
  position: absolute;
  top: 50%;
  right: auto;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--wine);
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 5;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

dialog#lightbox button.lb-nav-btn:hover {
  background: var(--wine);
  color: #ffffff;
  transform: translateY(-50%) scale(1.06);
}

dialog#lightbox button.lb-prev-btn {
  left: 16px;
}

dialog#lightbox button.lb-next-btn {
  right: 16px;
}

/* ==================== 10. 捲動微互動動畫 ==================== */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

[data-reveal="fade-up"] {
  transform: translateY(24px);
}

[data-reveal="zoom-in"] {
  transform: scale(0.95);
}

[data-reveal="fade-right"] {
  transform: translateX(-24px);
}

[data-reveal="fade-left"] {
  transform: translateX(24px);
}

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

/* ==================== 11. 響應式斷點 ==================== */
@media (max-width: 820px) {
  .fb-story-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .fb-time-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .fb-schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fb-tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar,
  .fb-nav-slot,
  .fb-nav-bar,
  .fb-mobile-navbar {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .fb-mobile-navbar,
  .fb-nav-slot,
  .fb-nav-bar {
    display: none !important;
  }

  .fb-hero-body {
    padding: 2rem 1rem 10svh;
  }

  .fb-hero-timer {
    padding: 0.65rem 1rem;
    gap: 0.35rem;
  }

  .fb-hero-timer li {
    min-width: 42px;
  }

  .fb-schedule-grid {
    grid-template-columns: 1fr;
  }

  .fb-tile-grid {
    grid-template-columns: 1fr;
  }

  .fb-photo-card {
    height: 290px;
  }

  #rsvp-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .fb-rsvp-card {
    padding: 1.5rem 1.15rem;
  }

  .fb-sec-ivory,
  .fb-sec-blush,
  .fb-sec-rose {
    padding: 3.6rem 1rem !important;
  }

  .back-to-top {
    right: 14px;
    bottom: 62px;
  }

  .music {
    right: 14px;
    bottom: 14px;
  }
}

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

@media (max-width: 760px) {
  .mobile-home-fab {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 95;
    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);
  }

  body.is-intro-playing .mobile-home-fab,
  body.is-prelude-locked .mobile-home-fab {
    opacity: 0;
    pointer-events: none;
  }
}


/* 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; }

.fb-story-list.section-reveal > .story-item {
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

#story-list.section-reveal.is-section-visible > .story-item:nth-child(1),
.story-list.section-reveal.is-section-visible > .story-item:nth-child(1),
.fb-time-cards.section-reveal.is-section-visible > .fb-time-card: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),
.fb-time-cards.section-reveal.is-section-visible > .fb-time-card: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),
.fb-time-cards.section-reveal.is-section-visible > .fb-time-card: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;
}

.hero-photo-tools {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 15;
  transition: opacity 0.25s ease;
}

.hero-photo-change-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(42, 34, 30, 0.42);
  color: #fffaf0;
  font-size: 12px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.hero-photo-change-btn:hover {
  background: rgba(42, 34, 30, 0.65);
}

.hero-photo-change-btn:active {
  transform: scale(0.97);
}

body.is-intro-playing .hero-photo-tools,
body.is-prelude-locked .hero-photo-tools {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .hero-photo-change-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
}


/* ==========================================================================
   親友的祝福 (Words of Love — 乾燥玫瑰莫蘭迪粉配色)
   ========================================================================== */
.blessings {
  background: #4a3738;
  color: #fbf4f3;
  text-align: center;
  padding: 90px 8%;
}

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

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

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

.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(251, 244, 243, 0.26);
  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: var(--wine, #996E6D);
  color: #ffffff;
}

.blessings-btn-secondary:hover {
  background: #835c5b;
}

.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(248, 238, 237, 0.92);
  color: #3d2b2c;
  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.16);
  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.26);
}

@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: #e6d3d4;
  font-size: 13px;
  margin: 16px auto 0;
}

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

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

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