/* ==========================================================================
   website05 — 奶油大地・日系乾燥花 (Creamy Earth & Dried Floral)
   - #F6F2EB: 網頁背景底色、資訊卡片基底
   - #E7D5BA: 區塊邊框、次要卡片底色、分隔線條
   - #B8957E: 副標題、裝飾插畫線條、標籤背景
   - #8E6346: 主行動按鈕（CTA）、重點標題與日期數字
   - #4A3B32: 深烘焙咖主要內文字色
   ========================================================================== */

:root {
  --ed-ivory: #F6F2EB;
  --ed-ivory-soft: #F9F6F0;
  --ed-paper: #E7D5BA;
  --ed-black: #8E6346;
  --ed-ink: #8E6346;
  --ed-muted: #E3B6AB;
  --ed-border: #E7D5BA;
  --wine: #8E6346;
  --primary: #8E6346;
  --font-zh: 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --font-script: Georgia, 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --font-slab: 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --font-serif-zh: 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --font-sans-zh: 'Noto Sans TC', '台北黑體', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background-color: var(--ed-ivory);
}

body.ed-body {
  margin: 0;
  background-color: var(--ed-ivory);
  color: var(--ed-ink);
  font-family: var(--font-slab);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.ed-body.is-intro-playing {
  overflow: hidden;
  height: 100dvh;
}

/* 當首屏封面開啟中，隱藏頂部導覽與浮動按鈕避免壓在封面上 */
body.ed-body.is-intro-playing .ed-topbar,
body.ed-body.is-intro-playing .ed-music-btn,
body.ed-body.is-intro-playing .back-to-top {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

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

.ed-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.35rem;
}

@media (min-width: 768px) {
  .ed-container {
    width: calc(100% - 6vw);
    padding: 0 2.5rem;
  }
}

@media (min-width: 1280px) {
  .ed-container {
    padding: 0 5.5rem;
  }
}

.ed-section {
  padding: 4.75rem 0;
  position: relative;
}

@media (min-width: 768px) {
  .ed-section {
    padding: 6.75rem 0;
  }
}

.ed-eyebrow {
  display: inline-block;
  font-family: var(--font-slab);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin-bottom: 0.5rem;
}

.ed-eyebrow-light {
  color: rgba(255, 255, 238, 0.68);
}

.ed-script-heading {
  font-family: var(--font-script);
  font-size: clamp(2.15rem, 4.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--ed-ink);
  margin: 0 0 0.75rem;
}

.ed-heading-light {
  color: var(--ed-ivory);
}

.ed-text-center {
  text-align: center;
  display: block;
}

/* ==========================================================================
   1. 首屏雙欄畫報開場封面 (#ed-intro-loader) — 點擊按鈕後進入主頁
   ========================================================================== */
.ed-intro-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--ed-ivory);
  color: var(--ed-ink);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.77, 0, 0.175, 1),
    visibility 0.9s;
}

.ed-intro-screen.is-leaving {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

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

.ed-intro-inner {
  width: 100%;
  height: 100dvh;
  max-width: 2400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--ed-ivory);
}

@media (min-width: 768px) {
  .ed-intro-inner {
    flex-direction: row;
  }
}

.ed-intro-left {
  width: 100%;
  padding: 1.35rem 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  background: var(--ed-ivory);
  z-index: 2;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .ed-intro-left {
    width: 43%;
    height: 100dvh;
    padding: 3rem 3.5rem;
    gap: 1.5rem;
  }
}

@media (min-width: 1280px) {
  .ed-intro-left {
    width: 41.666667%;
    padding: 3.75rem 4.5rem;
  }
}

.ed-intro-top-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .ed-intro-top-group {
    gap: 1.15rem;
  }
}

.ed-intro-date-stack {
  display: flex;
  flex-direction: column;
  line-height: 0.92;
}

.ed-intro-num {
  font-family: var(--font-slab);
  font-size: clamp(1.85rem, 3.8vw, 3.1rem);
  font-weight: 600;
  color: var(--ed-ink);
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(18px);
  animation: edIntroSlideUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ed-num-1 { animation-delay: 0.1s; }
.ed-num-2 { animation-delay: 0.24s; }
.ed-num-3 { animation-delay: 0.38s; }

.ed-intro-vline-wrap {
  margin: 0.25rem 0 0.25rem 1.1rem;
  height: 44px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .ed-intro-vline-wrap {
    margin: 0.5rem 0 0.5rem 1.25rem;
    height: 128px;
  }
}

.ed-intro-vline {
  display: block;
  width: 1.5px;
  height: 100%;
  background: var(--ed-ink);
  transform-origin: top center;
  transform: scaleY(0);
  animation: edDrawLineDown 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.ed-intro-couple-block {
  opacity: 0;
  transform: translateY(20px);
  animation: edIntroSlideUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.52s forwards;
}

.ed-intro-eyebrow {
  font-family: var(--font-slab);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--ed-muted);
  margin: 0 0 0.25rem;
}

.ed-intro-script {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 4.8vw, 3.9rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  color: var(--ed-ink);
}

.ed-intro-chi {
  font-family: var(--font-zh);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ed-ink);
  margin: 0.35rem 0 0.15rem;
}

.ed-intro-full-date {
  font-family: var(--font-slab);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--ed-muted);
  margin: 0;
}

.ed-intro-action {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-top: 0.25rem;
  opacity: 0;
  transform: translateY(14px);
  animation: edIntroSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.72s forwards;
}

@media (min-width: 768px) {
  .ed-intro-action {
    justify-content: center;
    padding-top: 0.5rem;
  }
}

.ed-open-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.55rem 1.35rem 0.35rem;
  border: 1.5px solid var(--ed-ink);
  border-radius: 8px;
  background: transparent;
  color: var(--ed-ink);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ed-open-btn:hover {
  background: var(--ed-ink);
  color: var(--ed-ivory);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(18, 17, 15, 0.14);
}

.ed-open-btn:active {
  transform: scale(0.96);
}

.ed-open-btn-label {
  font-family: var(--font-slab);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.ed-open-chevron {
  animation: edChevronBounce 1.4s ease-in-out infinite;
}

.ed-intro-right {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 40dvh;
  overflow: hidden;
}

@media (min-width: 768px) {
  .ed-intro-right {
    width: 57%;
    height: 100dvh;
    min-height: 100dvh;
  }
}

@media (min-width: 1280px) {
  .ed-intro-right {
    width: 58.333333%;
  }
}

.ed-intro-photo-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ed-intro-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.1);
  animation: edIntroPhotoZoom 2.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ed-intro-photo-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(18, 17, 15, 0.1) 0%,
    rgba(18, 17, 15, 0.02) 50%,
    rgba(18, 17, 15, 0.32) 100%
  );
}

.ed-intro-ring-badge {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 238, 0.9);
  backdrop-filter: blur(8px);
  color: var(--ed-ink);
  font-family: var(--font-slab);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  animation: edFloatSlow 3.6s ease-in-out infinite;
}

.ed-intro-ring-badge em {
  font-family: var(--font-script);
  font-style: normal;
}

@keyframes edIntroSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes edDrawLineDown {
  to {
    transform: scaleY(1);
  }
}

@keyframes edIntroPhotoZoom {
  to {
    transform: scale(1);
  }
}

@keyframes edChevronBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

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

/* ==========================================================================
   2. 頂部導覽列 (.ed-topbar) 與黑膠音樂按鈕 (.ed-music-btn)
   ========================================================================== */
.ed-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
  padding: 0.85rem 0;
}

.ed-topbar.is-sticky {
  background: rgba(255, 255, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(18, 17, 15, 0.06);
  padding: 0.55rem 0;
}

.ed-topbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 4.25rem 0 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .ed-topbar-inner {
    padding: 0 4.5rem 0 2.5rem;
  }
}

.ed-brand {
  font-family: var(--font-slab);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ed-ink);
  text-decoration: none;
  padding: 0.28rem 0.75rem;
  border: 1.5px solid var(--ed-ink);
  border-radius: 999px;
  background: rgba(255, 255, 238, 0.85);
}

.ed-brand em {
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 600;
}

.ed-desktop-nav {
  display: none;
}

@media (min-width: 860px) {
  .ed-desktop-nav {
    display: block;
  }
}

.ed-desktop-nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0.38rem 1.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 238, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(18, 17, 15, 0.12);
}

.ed-desktop-nav a {
  font-family: var(--font-slab);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ed-ink);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: opacity 0.2s ease;
}

.ed-desktop-nav a:hover {
  opacity: 0.65;
}

.ed-nav-pill {
  background: var(--ed-ink);
  color: var(--ed-ivory) !important;
  padding: 0.3rem 0.88rem;
  border-radius: 999px;
}

.ed-burger-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--ed-ink);
  background: var(--ed-ivory);
  padding: 0 9px;
  cursor: pointer;
}

@media (min-width: 860px) {
  .ed-burger-btn {
    display: none;
  }
}

.ed-burger-btn span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ed-ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.ed-burger-btn.is-active span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

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

.ed-burger-btn.is-active span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.ed-mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.6rem 1.25rem 0;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 238, 0.98);
  border: 1.5px solid var(--ed-ink);
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
}

.ed-mobile-drawer.is-active {
  display: flex;
}

.ed-mobile-drawer a {
  font-family: var(--font-slab);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ed-ink);
  text-decoration: none;
  padding: 0.45rem 0;
  border-bottom: 1px dashed rgba(18, 17, 15, 0.12);
}

.ed-mobile-drawer a:last-child {
  border-bottom: none;
}

/* 右上角圓形音符開關 (參考網址 fixed right-4 top-4 border border-black bg-ivory) */
.ed-music-btn {
  position: fixed !important;
  top: 0.85rem !important;
  right: 1rem !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 95 !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 1.5px solid var(--ed-ink) !important;
  background: var(--ed-ivory) !important;
  color: var(--ed-ink) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px !important;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, background-color 0.25s ease, opacity 0.35s ease;
}

.ed-music-btn[hidden] {
  display: none !important;
}

.ed-music-btn svg {
  width: 20px;
  height: 20px;
}

.ed-music-btn.is-playing svg {
  animation: edSpinRecord 5s linear infinite;
}

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

/* 右下角浮動回到頂端按鈕 (.back-to-top) */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 88;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--ed-ink);
  background: rgba(255, 255, 238, 0.9);
  backdrop-filter: blur(6px);
  color: var(--ed-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(18, 17, 15, 0.14);
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, opacity 0.35s ease;
}

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

.back-to-top:hover {
  background: var(--ed-ink);
  color: var(--ed-ivory);
  transform: translateY(-3px);
}

.ed-global-status {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ed-muted);
}

.ed-global-status:empty {
  display: none;
}

/* ==========================================================================
   3. 主頁滿版幻燈片首屏 (#home) + 微光粒子小動畫
   ========================================================================== */
.ed-hero {
  position: relative;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--ed-ivory);
}

.ed-hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 1;
}

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

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

.ed-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 6.5s ease-out;
}

.ed-hero-slide.is-active img {
  transform: scale(1.1);
}

/* 參考網址 bg-white/40 柔霧層 */
.ed-hero-mist {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      to bottom,
      rgba(74, 59, 50, 0.16) 0%,
      rgba(246, 242, 235, 0.28) 52%,
      rgba(246, 242, 235, 0.90) 88%,
      #F6F2EB 100%
    );
}

/* 漂浮光點小動畫 */
.ed-floating-sparks {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

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

.ed-floating-sparks span:nth-child(1) { left: 12%; animation-duration: 9s; animation-delay: 0s; }
.ed-floating-sparks span:nth-child(2) { left: 26%; width: 5px; height: 5px; animation-duration: 12s; animation-delay: 1.5s; }
.ed-floating-sparks span:nth-child(3) { left: 42%; width: 8px; height: 8px; animation-duration: 10s; animation-delay: 0.8s; }
.ed-floating-sparks span:nth-child(4) { left: 58%; width: 6px; height: 6px; animation-duration: 13s; animation-delay: 2.2s; }
.ed-floating-sparks span:nth-child(5) { left: 73%; width: 9px; height: 9px; animation-duration: 11s; animation-delay: 0.4s; }
.ed-floating-sparks span:nth-child(6) { left: 86%; width: 5px; height: 5px; animation-duration: 9.5s; animation-delay: 3.1s; }
.ed-floating-sparks span:nth-child(7) { left: 33%; width: 6px; height: 6px; animation-duration: 14s; animation-delay: 4s; }
.ed-floating-sparks span:nth-child(8) { left: 66%; width: 7px; height: 7px; animation-duration: 10.5s; animation-delay: 2.7s; }

@keyframes edSparkRise {
  0% {
    transform: translateY(0) translateX(0) scale(0.6);
    opacity: 0;
  }
  20% {
    opacity: 0.85;
  }
  80% {
    opacity: 0.75;
  }
  100% {
    transform: translateY(-105dvh) translateX(28px) scale(1.15);
    opacity: 0;
  }
}

.ed-hero-center {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 4.5rem 1.5rem 0;
  margin-bottom: 10dvh;
  max-width: 920px;
}

.ed-hero-sub {
  font-family: var(--font-slab);
  font-size: clamp(0.9rem, 1.5vw, 1.12rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ed-ink);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.ed-hero-title {
  font-family: var(--font-script);
  font-size: clamp(3.3rem, 8.8vw, 6.6rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--ed-ink);
  margin: 0 0 0.65rem;
  text-shadow: 0 4px 24px rgba(255, 255, 238, 0.85);
}

.ed-hero-chi {
  font-family: var(--font-zh);
  font-size: clamp(1.12rem, 2.1vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--ed-ink);
  margin: 0 0 1.5rem;
}

.ed-hero-meta-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.52rem 1.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 238, 0.88);
  border: 1px solid rgba(18, 17, 15, 0.22);
  backdrop-filter: blur(6px);
  font-family: var(--font-slab);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ed-ink);
}

.ed-scroll-cue {
  margin-top: 2.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: var(--ed-ink);
  text-decoration: none;
  font-family: var(--font-slab);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ed-scroll-mouse {
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--ed-ink);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.ed-scroll-wheel {
  width: 3px;
  height: 7px;
  border-radius: 999px;
  background: var(--ed-ink);
  animation: edMouseWheel 1.6s ease-in-out infinite;
}

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

/* 首屏進場動畫 */
.ed-anim-item {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

body:not(.is-intro-playing) .ed-anim-item {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

body:not(.is-intro-playing) .ed-anim-1 { transition-delay: 0.1s; }
body:not(.is-intro-playing) .ed-anim-2 { transition-delay: 0.24s; }
body:not(.is-intro-playing) .ed-anim-3 { transition-delay: 0.38s; }
body:not(.is-intro-playing) .ed-anim-4 { transition-delay: 0.52s; }
body:not(.is-intro-playing) .ed-anim-5 { transition-delay: 0.68s; }

/* ==========================================================================
   4. SECTION A: 雙欄交錯畫報肖像與新人簡介 (#greeting-section)
   ========================================================================== */
.ed-couple-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .ed-couple-grid {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 4rem;
  }
}

.ed-couple-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.ed-person-card {
  max-width: 380px;
}

.ed-person-avatar {
  width: 136px;
  height: 136px;
  margin: 0 auto 0.9rem;
  padding: 4px;
  border-radius: 50%;
  border: 1px solid rgba(139, 118, 92, 0.35);
  box-sizing: border-box;
  background: transparent;
}

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

.ed-person-role {
  display: inline-block;
  font-family: var(--font-slab);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--ed-muted);
  margin-bottom: 0.25rem;
}

.ed-person-script {
  font-family: var(--font-script);
  font-size: clamp(2.1rem, 3.8vw, 2.85rem);
  font-weight: 700;
  color: var(--ed-ink);
  margin: 0;
  line-height: 1.15;
}

.ed-person-zh {
  font-family: var(--font-zh);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0.2rem 0 0.4rem;
  color: var(--ed-ink);
}

.ed-person-desc {
  font-family: var(--font-zh);
  font-size: 0.88rem;
  color: var(--ed-muted);
  margin: 0;
}

.ed-amp-ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 160px;
}

.ed-amp-line {
  flex: 1;
  height: 1px;
  background: rgba(18, 17, 15, 0.22);
}

.ed-amp-char {
  font-family: var(--font-script);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ed-ink);
}

.ed-greeting-quote {
  margin-top: 0.5rem;
  padding-top: 1.35rem;
  border-top: 1px dashed rgba(18, 17, 15, 0.18);
  max-width: 440px;
}

.ed-quote-headline {
  font-family: var(--font-zh);
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  font-weight: 700;
  line-height: 1.6;
  color: var(--ed-ink);
  margin: 0 0 0.5rem;
}

.ed-quote-sub {
  font-family: var(--font-zh);
  font-size: 0.9rem;
  color: var(--ed-muted);
  margin: 0;
}

.ed-dual-portraits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 768px) {
  .ed-dual-portraits {
    gap: 1.75rem;
  }
}

.ed-portrait-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.ed-portrait-high {
  margin-top: 3.5rem;
}

@media (min-width: 768px) {
  .ed-portrait-high {
    margin-top: 6.5rem;
  }
}

.ed-portrait-img-box {
  width: 100%;
  height: 270px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 20px 44px rgba(18, 17, 15, 0.12);
  background: #EAE5D3;
}

@media (min-width: 640px) {
  .ed-portrait-img-box {
    height: 360px;
  }
}

@media (min-width: 1200px) {
  .ed-portrait-img-box {
    height: 440px;
  }
}

.ed-portrait-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.ed-portrait-card:hover .ed-portrait-img-box img {
  transform: scale(1.06);
}

.ed-portrait-tag {
  font-family: var(--font-slab);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--ed-muted);
}

/* ==========================================================================
   5. SECTION B: 我們的故事 (#story)
   ========================================================================== */
.ed-section-head-left {
  margin-bottom: 2.5rem;
}

.ed-story-lead {
  font-family: var(--font-zh);
  font-size: 0.95rem;
  color: var(--ed-muted);
  max-width: 560px;
  margin: 0;
}

.ed-story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.75rem;
  align-items: center;
}

@media (min-width: 860px) {
  .ed-story-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
  }
}

.ed-story-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ed-story-list .story-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.05rem;
  padding: 1.15rem 1.35rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(18, 17, 15, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ed-story-list .story-item:hover {
  transform: translateX(6px);
  box-shadow: 0 12px 28px rgba(18, 17, 15, 0.07);
}

.ed-story-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ed-ink);
  color: var(--ed-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.ed-story-item-body {
  flex: 1;
  min-width: 0;
}

.ed-story-list .story-item small {
  display: inline-block;
  font-family: var(--font-slab);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ed-muted);
  margin-bottom: 0.18rem;
}

.ed-story-list .story-item h3 {
  font-family: var(--font-script);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ed-ink);
  margin: 0 0 0.3rem;
}

.ed-story-list .story-item p {
  font-family: var(--font-zh);
  font-size: 0.92rem;
  color: #3D3A36;
  margin: 0;
}

.ed-story-photo-wrap {
  width: 100%;
  padding: 0 14px 14px 12px;
}

.ed-story-frame {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 340px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .ed-story-frame {
    height: 450px;
  }
}

.ed-story-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  position: relative;
  z-index: 2;
  box-shadow: 0 22px 48px rgba(18, 17, 15, 0.16);
}

.ed-story-frame-border {
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1.5px solid var(--ed-ink);
  border-radius: 6px;
  z-index: 1;
  transition: transform 0.4s ease;
}

.ed-story-frame:hover .ed-story-frame-border {
  transform: translate(5px, 5px);
}

.ed-story-badge {
  position: absolute;
  left: -10px;
  bottom: 20px;
  z-index: 3;
  background: var(--ed-ink);
  color: var(--ed-ivory);
  font-family: var(--font-script);
  font-size: 1.12rem;
  padding: 0.38rem 1.05rem;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

/* ==========================================================================
   6. SECTION C: 曜黑對比雙欄錯落畫廊 (#gallery)
   ========================================================================== */
.ed-gallery-dark {
  background-color: var(--ed-black);
  color: var(--ed-ivory);
  padding: 5rem 0;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .ed-gallery-dark {
    padding: 7rem 0;
  }
}

.ed-gallery-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .ed-gallery-layout {
    grid-template-columns: 2fr 1fr;
    gap: 3.75rem;
  }
}

.ed-gallery-masonry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
  order: 2;
  width: 100%;
}

@media (min-width: 768px) {
  .ed-gallery-masonry {
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .ed-gallery-masonry {
    order: 1;
  }
}

.ed-masonry-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .ed-masonry-col {
    gap: 1.5rem;
  }
}

.ed-masonry-col-offset {
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .ed-masonry-col-offset {
    margin-top: 6rem;
  }
}

/* 參考網址明確高度設定 w-full h-[200px] md:h-[320px] xl:h-[427px]，避免 button 元素跑版 */
.ed-photo-card {
  position: relative;
  display: block;
  width: 100%;
  height: 220px;
  border: none;
  padding: 0;
  margin: 0;
  background: #1C1B1A;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

@media (min-width: 768px) {
  .ed-photo-card {
    height: 330px;
  }
}

@media (min-width: 1200px) {
  .ed-photo-card {
    height: 410px;
  }
}

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

.ed-photo-card:hover img {
  transform: scale(1.06);
}

.ed-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.74) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1rem;
  color: var(--ed-ivory);
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: left;
}

.ed-photo-card:hover .ed-tile-overlay {
  opacity: 1;
}

.ed-photo-title {
  font-family: var(--font-script);
  font-size: 1.2rem;
  margin: 0;
}

.ed-photo-caption {
  font-family: var(--font-zh);
  font-size: 0.78rem;
  color: rgba(255, 255, 238, 0.85);
  margin: 0.15rem 0 0;
}

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

.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 rgba(255, 255, 238, 0.38);
  background: rgba(255, 255, 238, 0.08);
  color: var(--ed-ivory);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.gallery-nav-btn:hover {
  background: var(--ed-ivory);
  color: var(--ed-black);
  border-color: var(--ed-ivory);
  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: rgba(255, 255, 238, 0.28);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

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

.ed-gallery-masonry.is-carousel-ready {
  display: block;
}

.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;
}

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

.ed-masonry-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
  width: 100%;
}

@media (min-width: 768px) {
  .ed-masonry-cols {
    gap: 1.5rem;
  }
}

.gallery-carousel-page.is-single-card .ed-photo-card {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  max-height: 440px;
  border-radius: 16px;
  overflow: hidden;
}

.ed-gallery-masonry .ed-photo-card.is-page-hidden {
  display: none !important;
}

.ed-gallery-sticky {
  text-align: center;
  order: 1;
}

@media (min-width: 1024px) {
  .ed-gallery-sticky {
    position: sticky;
    top: 7.375rem;
    order: 2;
    padding-top: 1.5rem;
  }
}

.ed-gallery-zh {
  font-family: var(--font-zh);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 238, 0.9);
  margin: -0.2rem 0 0.9rem;
}

.ed-gallery-desc {
  font-family: var(--font-slab);
  font-size: 0.88rem;
  color: rgba(255, 255, 238, 0.74);
  line-height: 1.75;
  margin: 0 0 1.25rem;
}

.ed-gallery-sparkle {
  color: rgba(255, 255, 238, 0.45);
  letter-spacing: 0.3em;
  font-size: 0.8rem;
}

/* ==========================================================================
   7. SECTION D: 婚宴資訊、內嵌地圖與全寬當日流程 (#details & #venue)
   ========================================================================== */
.ed-event-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

@media (min-width: 920px) {
  .ed-event-split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.ed-event-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ed-reception-block {
  margin-top: 0.75rem;
  padding: 1.5rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(18, 17, 15, 0.12);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ed-reception-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.ed-reception-title {
  font-family: var(--font-script);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--ed-ink);
}

.ed-event-meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.ed-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.ed-meta-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--ed-ink);
  color: var(--ed-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ed-meta-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ed-meta-text strong {
  font-family: var(--font-slab);
  font-size: 1rem;
  color: var(--ed-ink);
}

.ed-meta-sub {
  font-family: var(--font-slab);
  font-size: 0.85rem;
  color: var(--ed-muted);
}

.ed-meta-addr {
  font-family: var(--font-zh);
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ed-ink);
}

.ed-meta-transport,
.ed-meta-note {
  font-family: var(--font-zh);
  font-size: 0.82rem;
  color: var(--ed-muted);
  margin: 0.15rem 0 0;
}

.ed-meta-note:empty {
  display: none;
}

.ed-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.ed-btn-dark,
.ed-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: var(--font-slab);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ed-btn-dark {
  background: var(--primary, #8E6346);
  color: var(--ed-ivory);
  border: 1.5px solid var(--primary, #8E6346);
}

.ed-btn-outline {
  background: transparent;
  color: var(--ed-ink);
  border: 1.5px solid var(--ed-ink);
}

.ed-btn-dark:hover,
.ed-btn-outline:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(18, 17, 15, 0.14);
}

.ed-event-right {
  display: flex;
  flex-direction: column;
}

.ed-map-card {
  width: 100%;
  flex: 1;
  min-height: 360px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--ed-ink);
  box-shadow: 0 20px 44px rgba(18, 17, 15, 0.12);
  background: #EAE5D3;
}

@media (min-width: 920px) {
  .ed-map-card {
    min-height: 430px;
  }
}

.ed-map-card iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  border: 0;
}

@media (min-width: 920px) {
  .ed-map-card iframe {
    min-height: 430px;
  }
}

/* 全寬當日流程時間軸 (#schedule) */
.ed-schedule-wrap {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px dashed rgba(18, 17, 15, 0.16);
}

.ed-schedule-head {
  margin-bottom: 1.25rem;
}

.ed-schedule-heading {
  font-family: var(--font-script);
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0;
  color: var(--ed-ink);
}

.ed-schedule-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .ed-schedule-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .ed-schedule-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ed-schedule-list .schedule-item {
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(18, 17, 15, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ed-schedule-list .schedule-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(18, 17, 15, 0.08);
}

.ed-schedule-list .schedule-item time {
  font-family: var(--font-slab);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ed-ink);
}

.ed-schedule-list .schedule-item h3 {
  font-family: var(--font-zh);
  font-size: 0.96rem;
  font-weight: 700;
  margin: 0;
  color: var(--ed-ink);
}

.ed-schedule-list .schedule-item p {
  font-family: var(--font-zh);
  font-size: 0.84rem;
  color: var(--ed-muted);
  margin: 0.15rem 0 0;
}

/* ==========================================================================
   8. SECTION E: 極簡巨字倒數計時器 (#countdown-section)
   ========================================================================== */
.ed-countdown-section {
  padding: 4.5rem 0;
  border-top: 1px solid rgba(18, 17, 15, 0.1);
  border-bottom: 1px solid rgba(18, 17, 15, 0.1);
}

.ed-big-countdown {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.25rem 1.5rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .ed-big-countdown {
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
  }
}

.ed-cd-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ed-cd-num {
  font-family: var(--font-slab);
  font-size: clamp(2.6rem, 5.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary, #8E6346);
  margin: 0;
}

.ed-cd-pulse {
  animation: edPulseTick 1s ease-in-out infinite;
}

@keyframes edPulseTick {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.ed-cd-label {
  font-family: var(--font-slab);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ed-muted);
  margin: 0.35rem 0 0;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   9. SECTION F: 出席意願回覆 Reservation (#rsvp)
   ========================================================================== */
.ed-rsvp-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2.5rem;
}

.ed-rsvp-sub {
  font-family: var(--font-slab);
  font-size: 0.92rem;
  color: var(--ed-muted);
  margin: 0;
}

.ed-rsvp-box {
  max-width: 620px;
  margin: 0 auto;
}

.ed-rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.ed-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .ed-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.ed-field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  font-family: var(--font-slab);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ed-ink);
}

.ed-field em,
.ed-confirm-fieldset em {
  color: #B9382C;
  font-style: normal;
}

.ed-field input,
.ed-field select,
.ed-field textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 6px;
  background: #EFECE0;
  border: 1.5px solid transparent;
  font-family: var(--font-slab);
  font-size: 0.94rem;
  color: var(--ed-ink);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

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

.ed-confirm-fieldset {
  border: 1px solid rgba(18, 17, 15, 0.16);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 0;
}

.ed-confirm-fieldset legend {
  font-family: var(--font-slab);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0 0.4rem;
}

.ed-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.ed-radio-item,
.ed-check-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-slab);
  font-size: 0.9rem;
  cursor: pointer;
}

.ed-radio-item input,
.ed-check-item input {
  width: 17px;
  height: 17px;
  accent-color: var(--ed-ink);
}

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

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

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

.ed-radio-box {
  padding: 0.72rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(24, 23, 21, 0.25);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ed-ink, #181715);
  text-align: center;
  font-family: var(--font-slab);
  font-size: 0.85rem;
  line-height: 1.4;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ed-radio-option input[type="radio"]:checked + .ed-radio-box {
  background: var(--ed-ink, #181715);
  color: var(--ed-ivory, #faf8f1);
  border-color: var(--ed-ink, #181715);
}

.ed-guest-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ed-extra-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.25rem;
}

.ed-submit-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.5rem;
}

.ed-submit-btn {
  background: var(--ed-black);
  color: var(--ed-ivory);
  border: 1.5px solid var(--ed-black);
  border-radius: 6px;
  padding: 0.72rem 2.4rem;
  font-family: var(--font-slab);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ed-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.ed-form-status {
  margin: 0.25rem 0 0;
  font-family: var(--font-zh);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ed-ink);
  text-align: center;
}

.ed-form-status:empty {
  display: none;
}

/* ==========================================================================
   10. 大圓角曜黑畫報頁尾 (.ed-footer)
   ========================================================================== */
.ed-footer {
  max-width: 1440px;
  margin: 3rem auto 0;
  background: var(--ed-black);
  color: var(--ed-ivory);
  border-top-left-radius: 50px;
  border-top-right-radius: 50px;
  padding: 4.5rem 1.5rem 2.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .ed-footer {
    width: calc(100% - 6vw);
    border-top-left-radius: 100px;
    border-top-right-radius: 100px;
    padding: 6rem 3rem 3rem;
  }
}

.ed-footer-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.ed-footer-script {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  margin: 0 0 0.5rem;
  color: var(--ed-ivory);
}

.ed-footer-closing {
  font-family: var(--font-zh);
  font-size: 0.92rem;
  color: rgba(255, 255, 238, 0.78);
  margin: 0;
}

.ed-footer-label {
  display: block;
  font-family: var(--font-slab);
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 238, 0.55);
  margin-bottom: 0.35rem;
}

.ed-footer-names {
  font-family: var(--font-script);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0;
  color: var(--ed-ivory);
}

.ed-footer-date {
  font-family: var(--font-slab);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 238, 0.7);
  margin: 0.35rem 0 0;
}

.ed-footer-top-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: none;
  color: var(--ed-ivory);
  font-family: var(--font-slab);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.ed-footer-top-btn:hover {
  transform: translateY(-4px);
}

.ed-footer-credits p {
  font-family: var(--font-slab);
  font-size: 0.75rem;
  color: rgba(255, 255, 238, 0.45);
  margin: 0;
}

.ed-footer-credits a {
  color: inherit;
  text-decoration: none;
}

.ed-footer-credits a:hover {
  color: var(--ed-ivory);
}

/* ==========================================================================
   11. 燈箱 (.ed-lightbox) 與捲動微動畫 ([data-reveal])
   ========================================================================== */
.ed-lightbox {
  border: none;
  padding: 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  max-width: 100vw;
  max-height: 100dvh;
  width: 100vw;
  height: 100dvh;
  color: #FFFFFF;
}

.ed-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ed-lb-stage {
  max-width: 86vw;
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.ed-lb-stage img {
  max-width: 86vw;
  max-height: 76dvh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ed-lb-caption {
  font-family: var(--font-zh);
  font-size: 0.88rem;
  color: rgba(255, 255, 238, 0.85);
  margin: 0;
}

.ed-lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  font-size: 1.1rem;
  cursor: pointer;
}

.ed-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.55);
  color: #FFFFFF;
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ed-lb-prev { left: 1.25rem; }
.ed-lb-next { right: 1.25rem; }

/* 主頁捲動小動畫 (Scroll Reveal Micro-Animations) */
[data-reveal] {
  opacity: 0;
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

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

[data-reveal="blur-up"] {
  transform: translateY(32px) scale(0.96);
  filter: blur(8px);
}

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

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

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

.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; }

#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;
}

#app.ed-main {
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 50px rgba(74, 63, 61, 0.12);
}

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

.hero-photo-tools {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 95;
  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);
  cursor: pointer;
  transition: background 0.2s 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: var(--ed-ink, #181715);
  color: var(--ed-ivory, #F6F2EB);
  text-align: center;
  padding: 90px 8%;
}

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

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

.blessings-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.16em;
  color: var(--ed-ivory, #F6F2EB);
}

.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(231, 213, 186, 0.3);
  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: #6b5340;
  color: #f6f2eb;
}

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

.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(231, 213, 186, 0.92);
  color: #181715;
  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.24);
  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.34);
}

@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: #cfc4b3;
  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;
  }
}
