/* ==========================================================================
   天空紀念碑 (Skymonu) - 新版首頁 CSS 樣式系統
   配色比例：淡紫 65% + 純白 35%
   風格定位：天主教 35% 靈性莊嚴與希望 + 現代化簡約美學
   ========================================================================== */

/* 0. 引入本地 Oswald-Regular 字型 (專供紀念碑西文碑銘使用) */
@font-face {
  font-family: 'Oswald';
  src: url('../fnt/Oswald-Regular.ttf') format('truetype'),
    url('/fnt/Oswald-Regular.ttf') format('truetype'),
    url('fnt/Oswald-Regular.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* 1. 變數設定與 design tokens */
:root {
  /* 配色系統 (淡紫 65% + 白 35%) */
  --primary-purple: #7C5CBA;
  /* 主淡紫 */
  --primary-purple-hover: #694AA4;
  /* 深紫互動 */
  --light-purple: #9B7EBD;
  /* 柔紫 */
  --soft-purple-bg: #F4EFFB;
  /* 區塊背景柔紫 */
  --lavender-tint: #EFE8F8;
  /* 漸層過渡紫 */
  --dark-purple-text: #4f2c8d;
  /* 深紫文字 */

  --pure-white: #FFFFFF;
  /* 卡片與主元件白 */
  --off-white: #FBF9FE;
  /* 雲光背景白 */

  /* 聖光金點綴 */
  --saint-gold: #D4AF37;
  --saint-gold-light: #F7E9B8;
  --saint-gold-glow: rgba(212, 175, 55, 0.35);

  /* 灰階與陰影 */
  --text-main: #332C3F;
  --text-muted: #6B6277;
  --border-light: rgba(124, 92, 186, 0.15);

  /* 陰影與玻璃效果 */
  --shadow-soft: 0 10px 30px rgba(124, 92, 186, 0.08);
  --shadow-card: 0 15px 35px rgba(50, 31, 82, 0.06);
  --shadow-hover: 0 20px 40px rgba(124, 92, 186, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-purple: rgba(244, 239, 251, 0.85);

  /* 字體與字階 */
  /* [原始設定：使用外部 Google Fonts]
  --font-serif: "Noto Serif TC", Georgia, serif;
  --font-sans: "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, sans-serif;
  */
  /* [方案 A：改採跨平台系統預設字型堆疊 (System Font Stack)，零外部依賴、效能最佳] */
  --font-serif: "Songti TC", "Noto Serif CJK TC", "MingLiU", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Hiragino Sans GB", "Microsoft JhengHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-monument-en: "Oswald", "Cinzel", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", sans-serif;

  /* 圓角 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-arch: 120px 120px 16px 16px;
  /* 教堂圓拱造型 */

  /* 動畫時間 */
  --transition-fast: 0.25s ease;
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. 基本重置與全域樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: #E6DCF5;
  /* 與首頁頂部 Hero 背景基調一致，杜絕閃白 */
}

body {
  font-family: var(--font-sans);
  background-color: var(--off-white);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
}

/* 標題預設字型：現代靈性黑體 */
h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--dark-purple-text);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 通用容器 */
.container {
  width: 94%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 15px;
}

.section-padding {
  padding: 90px 0;
}

.section-bg-purple {
  background: linear-gradient(180deg, var(--soft-purple-bg) 0%, var(--lavender-tint) 100%);
}

.section-bg-white {
  background-color: var(--pure-white);
}

/* 區塊標題模組 */
.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 60px auto;
  position: relative;
}

.catholic-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(124, 92, 186, 0.1);
  color: var(--primary-purple);
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 16px;
  border: 1px solid rgba(124, 92, 186, 0.2);
}

.catholic-badge svg {
  fill: var(--primary-purple);
  width: 14px;
  height: 14px;
}

.section-title {
  font-size: 2.3rem;
  margin-bottom: 16px;
  position: relative;
  letter-spacing: 1px;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-purple), var(--saint-gold));
  margin: 14px auto 0 auto;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* 3. 按鈕與 UI 元件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-purple) 0%, #63439F 100%);
  color: var(--pure-white);
  box-shadow: 0 8px 25px rgba(124, 92, 186, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(124, 92, 186, 0.45);
  background: linear-gradient(135deg, #8767C7 0%, var(--primary-purple) 100%);
}

.btn-outline {
  background: var(--pure-white);
  color: var(--primary-purple);
  border: 2px solid var(--primary-purple);
}

.btn-outline:hover {
  background: var(--soft-purple-bg);
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #B89220 100%);
  color: var(--dark-purple-text);
  font-weight: 700;
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

/* 4. 頂部導覽列 (Header) */
.site-header {
  font-family: var(--font-sans);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition-normal);
  padding: 18px 0;
}

.site-header.scrolled {
  background: rgba(245, 240, 251, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(124, 92, 186, 0.18);
  box-shadow: 0 4px 20px rgba(79, 44, 141, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-purple-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-logo span {
  font-weight: 700;
}

.brand-logo img:not(.brand-text-img) {
  height: 50.4px;
  width: auto;
  filter: drop-shadow(0 2px 5px rgba(124, 92, 186, 0.2));
  transition: height 0.3s ease, width 0.3s ease;
}

.brand-logo .brand-text-img,
.brand-text-img {
  height: 40px !important;
  width: auto !important;
  object-fit: contain;
  vertical-align: middle;
  transition: height 0.3s ease;
}

.brand-status-tag {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-purple);
  letter-spacing: 0.5px;
  vertical-align: middle;
  align-self: center;
  margin-left: 2px;
  white-space: nowrap;
}

.brand-logo-cross {
  width: 24px;
  height: 24px;
  color: var(--primary-purple);
}

.main-nav {
  flex-shrink: 1;
  font-weight: 700;
}

.main-nav ul {
  display: flex;
  gap: 20px;
  align-items: center;
  white-space: nowrap;
}

.main-nav a {
  font-size: 1.10rem;
  /* 原 0.94rem */
  /* font-weight: 500; (原始設定，註解保留) */
  font-weight: 700;
  color: var(--text-main);
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  transition: var(--transition-fast);
}

/* 螢幕寬度充足時 (>= 1400px)，頂部導覽列選單文字放大 20% (1.10rem -> 1.32rem)；1366px 及以下保持精緻典雅 1.10rem */
@media (min-width: 1400px) {
  .main-nav a {
    font-size: 1.32rem;
  }

  .main-nav ul {
    gap: 24px;
  }
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-purple);
  transition: var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-purple);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark-purple-text);
  cursor: pointer;
}

.header-actions .btn {
  height: 50px;
  box-sizing: border-box;
}

/* 客製化多國語言下拉選單 (Custom Glass Dropdown) */
.lang-dropdown {
  position: relative;
  display: inline-flex;
}

.lang-dropdown-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 152px;
  height: 50px;
  padding: 0 14px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.88);
  border: 1.5px solid rgba(124, 92, 186, 0.25);
  border-radius: 30px;
  transition: all var(--transition-fast);
  color: var(--dark-purple-text);
  box-shadow: 0 4px 15px rgba(124, 92, 186, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  outline: none;
}

.lang-dropdown-btn:hover {
  background: #ffffff;
  border-color: var(--primary-purple);
  box-shadow: 0 6px 18px rgba(124, 92, 186, 0.2);
  transform: translateY(-2px);
}

.lang-dropdown.open .lang-dropdown-btn {
  background: #ffffff;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(124, 92, 186, 0.2);
}

.lang-globe-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--primary-purple);
  pointer-events: none;
  margin-right: 6px;
}

.lang-current-text {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-purple-text);
  text-align: center;
  line-height: normal;
  white-space: nowrap;
}

.lang-arrow-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--text-muted);
  pointer-events: none;
  margin-left: 6px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-dropdown.open .lang-arrow-icon {
  transform: rotate(180deg);
  color: var(--primary-purple);
}

/* 下拉選單磨砂玻璃卡片 (Glassmorphism Pop-up Menu) */
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 152px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(124, 92, 186, 0.22);
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(60, 35, 100, 0.16), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 6px;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top center;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.lang-dropdown.open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* 下拉選單項目 */
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.lang-option:hover {
  background: var(--soft-purple-bg);
  color: var(--primary-purple);
  padding-left: 16px;
}

.lang-option.active {
  background: rgba(124, 92, 186, 0.12);
  color: var(--primary-purple);
  font-weight: 700;
}

.lang-check-icon {
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--primary-purple);
}

.lang-option.active .lang-check-icon {
  opacity: 1;
  transform: scale(1);
}

/* 5. Hero 區塊 (天空與聖光 Banner) */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 130px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #E6DCF5 0%, #F5F0FB 50%, var(--off-white) 100%);
  overflow: hidden;
}

/* 雲海背景影片 (透明度 30%) - 效能優化版 */
.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  opacity: 0.3;
  /* 30% 透明度 */
  pointer-events: none;
  transform: translateZ(0);
}

.hero-video-bg video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 移除 filter: contrast(105%) brightness(105%)，恢復瀏覽器原生 DirectComposition / Hardware Overlay 硬體解碼直通，大幅消除 GPU 3D 著色器負載 */
  transform: translateZ(0);
  opacity: 0;
  z-index: 1;
}

/* 當前正在前景播放展示的影片 */
.hero-video-bg video.is-playing {
  opacity: 1;
  z-index: 3;
}

/* 底層備妥待命的影片 (維持 100% 不透明，杜絕交替時背景透出閃爍) */
.hero-video-bg video.is-ready {
  opacity: 1;
  z-index: 2;
}

/* 退場淡出影片 (置於頂層平滑淡出，顯露底層已在播放的備妥影片) */
.hero-video-bg video.is-fading {
  opacity: 0;
  z-index: 4;
  transition: opacity 0.35s ease;
}

.hero-glow-bg {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: 1200px;
  height: 600px;
  /* 採用自然柔和漸層衰減，完全免用 filter: blur(40px) 避免高負載高斯模糊運算 */
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.16) 0%, rgba(155, 126, 189, 0.18) 35%, rgba(245, 240, 251, 0.08) 60%, transparent 75%);
  pointer-events: none;
}

/* 天空飄浮光斑動畫 - 純 GPU Compositor 硬體位移，零 Paint 重繪消耗 */
.hero-clouds {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% + 800px);
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='400' viewBox='0 0 800 400'%3E%3Cpath fill='%23ffffff' fill-opacity='0.25' d='M150 200 Q200 150 260 180 Q320 130 400 170 Q480 120 560 180 Q620 160 670 210 Z'/%3E%3C/svg%3E") repeat-x;
  background-size: 800px 400px;
  opacity: 0.7;
  pointer-events: none;
  will-change: transform;
  /* 關閉動畫以提升效能, 後端只生成一張 static 的雲海圖片, 只是利用前端 CSS 的 background-position-x 來做位移, 沒有複雜運算, 且無 GPU 3D 著色器負載, 且消除 CSS filter: blur(40px) 的高斯模糊運算, 只留下背景圖片的原始細節 */
  /* 雙螢幕若螢幕更新率無法相同, 滑鼠就會出現卡頓狀況, 故關閉動畫. GPU負載亦可大幅降低. */
  /* animation: floatClouds 60s linear infinite; */
}

@keyframes floatClouds {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-800px, 0, 0);
  }
}


.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 620px;
}

.hero-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--pure-white);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.92rem;
  color: var(--primary-purple);
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
  border: 1px solid rgba(124, 92, 186, 0.2);
}

.hero-header-tag svg {
  fill: var(--saint-gold);
}

.hero-title {
  font-size: 3rem;
  line-height: 1.25;
  margin-bottom: 24px;
  color: var(--dark-purple-text);
  letter-spacing: 0.5px;
}

.hero-title span.purple-highlight {
  color: var(--primary-purple);
  position: relative;
  display: inline-block;
}

.hero-title span.purple-highlight::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: rgba(124, 92, 186, 0.18);
  border-radius: 4px;
  z-index: -1;
}

/* 動態名言展演 */
.quote-box {
  background: rgba(255, 255, 255, 0.50);
  /* 純白色，不透明度 88% (透明度 12%) */
  border-left: 4px solid var(--primary-purple);
  padding: 18px 22px;
  border-radius: 0 16px 16px 0;
  margin-bottom: 32px;
  box-shadow: var(--shadow-soft);
  transform: translateZ(0);
}

.quote-text {
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--dark-purple-text);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  min-height: 56px;
  line-height: 1.65;
  transition: opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1), transform 1.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  transform: translateY(0);
}

.quote-text.fade-out {
  opacity: 0;
  transform: translateY(-8px);
}

.quote-author {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: right;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1), transform 1.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  transform: translateY(0);
}

.quote-author.fade-out {
  opacity: 0;
  transform: translateY(-5px);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-cta .btn-outline {
  font-weight: 900 !important;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: 0.5px;
}

.hero-stats {
  display: flex;
  gap: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(124, 92, 186, 0.15);
}

.stat-item h3 {
  font-size: 1.8rem;
  color: var(--primary-purple);
  font-family: var(--font-sans);
  margin-bottom: 2px;
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Hero 右側聖堂視覺框 */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.arch-frame {
  width: fit-content;
  max-width: 100%;
  height: 540px;
  background: linear-gradient(145deg, #F3EDFC 0%, #E5D6F8 100%);
  border-radius: var(--radius-arch);
  padding: 8px;
  box-shadow: 0 25px 50px rgba(50, 31, 82, 0.15);
  position: relative;
  border: 2px solid #C8B4E5;
  outline: 1px solid rgba(124, 92, 186, 0.35);
  overflow: hidden;
}

.arch-image-container {
  width: auto;
  height: 100%;
  border-radius: 110px 110px 10px 10px;
  overflow: hidden;
  position: relative;
}

.arch-image-container img {
  width: auto;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease;
}

.arch-frame:hover img {
  transform: scale(1.05);
}

.arch-overlay-badge {
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(124, 92, 186, 0.2);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.badge-icon {
  width: 44px;
  height: 44px;
  background-color: var(--soft-purple-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-purple);
  flex-shrink: 0;
}

.badge-text h4 {
  font-size: 0.98rem;
  color: var(--dark-purple-text);
  margin-bottom: 2px;
}

.badge-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 6. 緣起與天主教教義區塊 (About Section) */
.origin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.origin-card-stack {
  position: relative;
}

.origin-main-card {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  position: relative;
  z-index: 2;
}

.catholic-cross-decorator {
  position: absolute;
  top: -25px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-purple), #63439F);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(124, 92, 186, 0.4);
}

.catholic-cross-decorator svg {
  width: 24px;
  height: 24px;
  fill: var(--pure-white);
}

.origin-title-tag {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--dark-purple-text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.origin-text {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.bible-quote-card {
  background-color: var(--soft-purple-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  border-left: 4px solid var(--saint-gold);
  margin-top: 25px;
}

.bible-quote-card p {
  font-family: var(--font-serif);
  color: var(--dark-purple-text);
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.bible-quote-source {
  font-size: 0.84rem;
  color: var(--primary-purple);
  font-weight: 600;
  text-align: right;
}

.origin-features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.feature-pill {
  background: var(--pure-white);
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.feature-pill:hover {
  transform: translateY(-4px);
  border-color: var(--primary-purple);
  box-shadow: var(--shadow-hover);
}

.pill-icon {
  width: 42px;
  height: 42px;
  background-color: var(--soft-purple-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-purple);
  margin-bottom: 14px;
}

.pill-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark-purple-text);
  margin-bottom: 6px;
}

.pill-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 7. 核心功能展示區塊 (Core Features Section) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  transition: var(--transition-normal);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(124, 92, 186, 0.4);
}

.feature-card-header {
  margin-bottom: 20px;
}

.feature-icon-wrapper {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--soft-purple-bg) 0%, #E8DFF5 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-purple);
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(124, 92, 186, 0.12);
}

.feature-icon-wrapper svg {
  width: 28px;
  height: 28px;
}

.feature-card-title {
  font-size: 1.25rem;
  color: var(--dark-purple-text);
  margin-bottom: 12px;
}

.feature-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
  flex-grow: 1;
}

.feature-card-list {
  border-top: 1px dashed var(--border-light);
  padding-top: 16px;
}

.feature-card-list li {
  font-size: 0.86rem;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-card-list li::before {
  content: "✦";
  color: var(--primary-purple);
  font-size: 0.8rem;
}

/* 8. 立碑四步驟流程區塊 (Step-by-Step Guide) */
.steps-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.steps-container::before {
  content: "";
  position: absolute;
  top: 75px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-purple), var(--light-purple), var(--saint-gold));
  z-index: 1;
}

.step-card {
  background: var(--pure-white);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  position: relative;
  z-index: 2;
  transition: var(--transition-fast);
}

.step-card:hover {
  transform: translateY(-6px);
}

.step-number {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-purple) 0%, #63439F 100%);
  color: var(--pure-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 auto 20px auto;
  box-shadow: 0 6px 16px rgba(124, 92, 186, 0.35);
  border: 3px solid var(--pure-white);
}

.step-title {
  font-size: 1.1rem;
  color: var(--dark-purple-text);
  margin-bottom: 10px;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-img-preview {
  margin-top: 18px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

/* 9. 天主教特別關懷與原則區塊 (Mission & Principles) */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.mission-content-box {
  background: var(--pure-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
}

.mission-tag {
  color: var(--saint-gold);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}

.principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.principle-item {
  background-color: var(--soft-purple-bg);
  padding: 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid var(--primary-purple);
}

.principle-icon {
  color: var(--primary-purple);
  font-size: 1.2rem;
}

.principle-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-purple-text);
}

/* 10. 線上點燭與追思體驗區塊 (Interactive Candle & Tribute Wall) */
.tribute-demo-wrapper {
  background: linear-gradient(135deg, #2E1B4E 0%, #462D75 100%);
  color: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: 50px;
  box-shadow: 0 20px 50px rgba(46, 27, 78, 0.25);
  position: relative;
  overflow: hidden;
}

.tribute-demo-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.tribute-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 40px auto;
}

.tribute-header h2 {
  color: var(--pure-white);
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.tribute-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.candle-wall {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 40px;
  padding: 30px 0;
  margin-bottom: 30px;
}

/* 動態燭光效果 */
.candle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.candle-container:hover {
  transform: translateY(-4px);
}

.flame {
  width: 16px;
  height: 26px;
  background: radial-gradient(ellipse at 50% 80%, #FFF 0%, #FFD700 40%, #FF4500 80%, transparent 100%);
  border-radius: 50% 50% 35% 35%;
  box-shadow: 0 0 20px #FFD700, 0 0 35px #FF8C00;
  animation: flicker 1.8s infinite alternate ease-in-out;
  margin-bottom: 6px;
  opacity: 0.9;
  transform: translateZ(0);
  will-change: transform, opacity;
}

.candle-body {
  width: 24px;
  height: 80px;
  background: linear-gradient(90deg, #FBF8FF 0%, #E6DCF5 50%, #C4B5E0 100%);
  border-radius: 4px 4px 2px 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

.candle-base {
  width: 48px;
  height: 12px;
  background: linear-gradient(90deg, #D4AF37 0%, #F7E9B8 50%, #B89220 100%);
  border-radius: 6px;
  margin-top: -2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.candle-label {
  margin-top: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-serif);
}

@keyframes flicker {
  0% {
    transform: scale(1) rotate(-1deg) translateZ(0);
    opacity: 0.85;
  }

  50% {
    transform: scale(1.08) rotate(1.5deg) translateZ(0);
    opacity: 1;
  }

  100% {
    transform: scale(0.95) rotate(-0.5deg) translateZ(0);
    opacity: 0.9;
  }
}

.tribute-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.tribute-counter-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tribute-counter-badge span.number {
  color: var(--saint-gold);
  font-weight: 700;
  font-size: 1.1rem;
}

/* 11. 常見問題與手冊下載 (FAQ & Download Section) */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.faq-card {
  background: var(--pure-white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-light);
}

.faq-question {
  font-size: 1.1rem;
  color: var(--dark-purple-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-question::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--soft-purple-bg);
  color: var(--primary-purple);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-answer {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 38px;
}

.downloads-banner {
  margin-top: 50px;
  background: linear-gradient(135deg, var(--soft-purple-bg) 0%, var(--lavender-tint) 100%);
  border-radius: var(--radius-lg);
  padding: 35px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-light);
}

.downloads-info h4 {
  font-size: 1.3rem;
  color: var(--dark-purple-text);
  margin-bottom: 6px;
}

.downloads-info p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.downloads-buttons {
  display: flex;
  gap: 14px;
}

.btn-pdf {
  background: var(--pure-white);
  color: var(--dark-purple-text);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-pdf:hover {
  background: var(--primary-purple);
  color: var(--pure-white);
  border-color: var(--primary-purple);
}

/* 12. 頁尾資訊 (Footer) */
.site-footer {
  background-color: var(--dark-purple-text);
  color: var(--pure-white);
  padding-top: 70px;
  padding-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand h3 {
  color: var(--pure-white);
  font-size: 1.5rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-col h4 {
  color: var(--saint-gold);
  font-size: 1.05rem;
  margin-bottom: 20px;
  font-family: var(--font-sans);
  letter-spacing: 1px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--saint-gold-light);
  padding-left: 5px;
}

.footer-contact-info p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-bottom {
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* 13. 彈窗對話框 (Modal Popup) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(32, 19, 54, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--pure-white);
  width: 90%;
  max-width: 550px;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: translateY(20px);
  transition: var(--transition-normal);
  border: 1px solid var(--border-light);
}

#register-modal .modal-box {
  max-width: 600px;
  /* 原 550px 改為 600px */
}

/* 會員功能表 Modal (下拉式浮動九宮格選單) */
#functionmenu-modal {
  background: rgba(20, 10, 35, 0.15);
  /* 輕薄透明遮罩，保留背景視野，點擊空白即可關閉 */
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  display: block;
  /* 取消全螢幕 flex 居中 */
}

#functionmenu-modal .modal-box {
  position: fixed;
  width: min(468px, calc(100vw - 24px));
  max-width: 468px;
  padding: 24px 20px 22px;
  border-radius: var(--radius-md, 16px);
  box-shadow: 0 20px 48px rgba(32, 19, 54, 0.24), 0 0 0 1px rgba(124, 92, 186, 0.16);
  margin: 0;
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-light);
}

/* 頂部氣泡指示小三角（指向右上方的功能表按鈕） */
#functionmenu-modal .modal-box::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 32px;
  width: 14px;
  height: 14px;
  background: var(--pure-white, #ffffff);
  border-left: 1px solid rgba(124, 92, 186, 0.2);
  border-top: 1px solid rgba(124, 92, 186, 0.2);
  transform: rotate(45deg);
  z-index: 1;
}

#functionmenu-modal:not(.active) .modal-box {
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
}

#functionmenu-modal.active .modal-box {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#functionmenu-modal .modal-title {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

#functionmenu-modal .functionmenu-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.45;
}

.function-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 6px;
}

.function-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 8px;
  gap: 8px;
  background: var(--soft-purple-bg, #fbfaff);
  border: 1px solid rgba(124, 92, 186, 0.15);
  border-radius: var(--radius-sm, 12px);
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s ease);
  color: var(--dark-purple-text, #201336);
  font-family: inherit;
  outline: none;
  box-shadow: 0 2px 5px rgba(106, 76, 147, 0.03);
}

.function-grid-item:hover {
  background: #ffffff;
  border-color: var(--primary-purple, #6a4c93);
  box-shadow: 0 8px 22px rgba(106, 76, 147, 0.16);
  transform: translateY(-2px);
}

.function-grid-item:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(106, 76, 147, 0.1);
}

.function-grid-item .func-icon {
  font-size: 1.92rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.function-grid-item:hover .func-icon {
  transform: scale(1.12);
}

.function-grid-item .func-label {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--dark-purple-text, #201336);
  letter-spacing: 0.3px;
  text-align: center;
  line-height: 1.3;
}

/* 九宮格下方通欄按鈕：關於我 (加高 20%) */
.function-about-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 18px 16px;
  min-height: 58px;
  background: var(--soft-purple-bg, #fbfaff);
  border: 1px solid rgba(124, 92, 186, 0.15);
  border-radius: var(--radius-sm, 12px);
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s ease);
  color: var(--dark-purple-text, #201336);
  font-family: inherit;
  text-decoration: none;
  outline: none;
  box-shadow: 0 2px 5px rgba(106, 76, 147, 0.03);
  box-sizing: border-box;
}

.function-about-btn:hover {
  background: #ffffff;
  border-color: var(--primary-purple, #6a4c93);
  box-shadow: 0 8px 22px rgba(106, 76, 147, 0.16);
  transform: translateY(-2px);
}

.function-about-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(106, 76, 147, 0.1);
}

.function-about-btn .func-icon {
  font-size: 1.45rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.function-about-btn:hover .func-icon {
  transform: scale(1.15);
}

.function-about-btn .func-label {
  display: inline-block;
  font-size: 1.20rem;
  font-weight: 900 !important;
  font-style: italic !important;
  transform: skewX(-12deg);
  color: var(--dark-purple-text, #201336);
  letter-spacing: 0.5px;
}

/* 會員大頭照包覆容器與頭像樣式 */
.function-about-btn .user-avatar-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.function-about-btn .user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.function-about-btn:hover .user-avatar-img {
  transform: scale(1.1);
}

.function-about-btn .default-avatar-icon {
  font-size: 1.35rem;
  line-height: 1;
}

@media (max-width: 480px) {
  #functionmenu-modal .modal-box {
    width: calc(100vw - 20px);
    padding: 18px 14px;
  }

  .function-grid {
    gap: 10px;
  }

  .function-grid-item {
    padding: 14px 6px;
  }

  .function-grid-item .func-icon {
    font-size: 1.6rem;
  }

  .function-grid-item .func-label {
    font-size: 0.88rem;
  }

  .function-about-btn {
    margin-top: 10px;
    padding: 14px 12px;
    min-height: 48px;
  }

  .function-about-btn .func-icon {
    font-size: 1.25rem;
  }

  .function-about-btn .user-avatar-wrapper {
    width: 28px;
    height: 28px;
  }

  .function-about-btn .default-avatar-icon {
    font-size: 1.15rem;
  }

  .function-about-btn .func-label {
    font-size: 0.92rem;
  }
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--soft-purple-bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--primary-purple);
  color: var(--pure-white);
}

.modal-title {
  font-size: 1.4rem;
  color: var(--dark-purple-text);
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark-purple-text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(124, 92, 186, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(124, 92, 186, 0.15);
}

/* ==========================================================================
   針對 1366x768 筆電與中小螢幕之全屏視野最佳化 (Viewport Optimization)
   包含寬度 <= 1366px 或高度 <= 800px 之桌機環境
   ========================================================================== */
@media screen and (max-width: 1366px) and (min-width: 1025px), screen and (max-height: 800px) and (min-width: 1025px) {
  /* 區塊內距適度收斂，降低長滾動負擔 */
  .section-padding {
    padding: 65px 0;
  }

  .section-header {
    margin-bottom: 45px;
  }

  .section-title {
    font-size: 2.1rem;
    margin-bottom: 12px;
  }

  /* 首頁 Hero 區塊第一屏高度緊湊化，確保一進首頁標題、名言、CTA 按鈕與拱門全覽 */
  .hero-section {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 45px;
  }

  .hero-grid {
    gap: 36px;
  }

  .hero-header-tag {
    margin-bottom: 16px;
    padding: 6px 16px;
    font-size: 0.88rem;
  }

  .hero-title {
    font-size: 2.45rem;
    line-height: 1.28;
    margin-bottom: 18px;
  }

  .quote-box {
    padding: 14px 18px;
    margin-bottom: 22px;
  }

  .quote-text {
    font-size: 1.02rem;
    min-height: 48px;
    margin-bottom: 4px;
  }

  .hero-cta {
    gap: 14px;
    margin-bottom: 26px;
  }

  .hero-cta .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }

  .hero-stats {
    padding-top: 18px;
    gap: 28px;
  }

  .stat-item h3 {
    font-size: 1.55rem;
  }

  .stat-item p {
    font-size: 0.82rem;
  }

  /* 右側拱門高度適度下修，避免擠爆 768px 高度視窗 */
  .arch-frame {
    height: 450px;
  }

  /* 核心功能卡片 4 欄適度收斂邊距與文字 */
  .features-grid {
    gap: 20px;
  }

  .feature-card {
    padding: 26px 20px;
  }

  .feature-card-title {
    font-size: 1.15rem;
    margin-bottom: 10px;
  }

  .feature-card-desc {
    font-size: 0.88rem;
    margin-bottom: 18px;
  }

  /* 緣起與理念卡片內距微調 */
  .origin-main-card {
    padding: 32px 28px;
  }

  .origin-grid {
    gap: 40px;
  }

  /* 聖潔之光點燭區高度適度縮小 */
  .tribute-demo-wrapper {
    padding: 40px 30px;
  }

  .candle-wall {
    padding: 20px 0;
    gap: 30px;
  }
}

/* 14. 響應式媒體查詢 (RWD Breakpoints) */
@media (max-width: 1024px) {

  .hero-grid,
  .origin-grid,
  .mission-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .features-grid,
  .steps-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-container::before {
    display: none;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .site-header {
    padding: 14px 0;
  }

  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--pure-white);
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: var(--transition-normal);
  }

  .main-nav.active {
    transform: translateY(0);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 16px;
  }

  .nav-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .features-grid,
  .steps-container,
  .faq-grid,
  .principles-grid {
    grid-template-columns: 1fr;
  }

  .candle-wall {
    gap: 20px;
  }

  .downloads-banner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ==========================================================================
   平板與中型手機頂部導覽列按鈕與標誌微縮 (寬度 <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .brand-logo img:not(.brand-text-img) {
    width: 38px;
    height: 38px;
  }

  .brand-logo .brand-text-img,
  .brand-text-img {
    height: 26px !important;
    width: auto !important;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .btn {
    height: 38px;
    padding: 0 16px;
    font-size: 0.88rem;
    border-radius: 20px;
    gap: 6px;
  }

  .lang-dropdown-btn,
  .lang-select-wrapper {
    height: 38px;
    min-width: 124px;
    padding: 0 10px;
    border-radius: 20px;
  }

  .lang-current-text,
  .lang-select {
    font-size: 0.88rem;
  }

  .lang-globe-icon {
    width: 15px;
    height: 15px;
    margin-right: 4px;
  }

  .lang-arrow-icon {
    width: 11px;
    height: 11px;
    margin-left: 4px;
  }

  .lang-dropdown-menu {
    min-width: 124px;
    border-radius: 14px;
  }
}

/* ==========================================================================
   小型手機頂部導覽列精緻膠囊縮小 (寬度 <= 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .header-inner {
    padding: 0 10px;
  }

  .brand-logo {
    gap: 8px;
  }

  .brand-logo img:not(.brand-text-img) {
    width: 28px;
    height: 28px;
  }

  .brand-logo .brand-text-img,
  .brand-text-img {
    height: 20px !important;
    width: auto !important;
  }

  .brand-logo span {
    font-size: 1.05rem;
    font-weight: 700;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .btn {
    height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .lang-dropdown-btn,
  .lang-select-wrapper {
    height: 32px;
    min-width: 105px;
    padding: 0 8px;
    border-radius: 18px;
  }

  .lang-current-text,
  .lang-select {
    font-size: 0.8rem;
    padding: 0;
  }

  .lang-globe-icon {
    width: 13px;
    height: 13px;
    margin-right: 3px;
  }

  .lang-arrow-icon {
    width: 9px;
    height: 9px;
    margin-left: 3px;
  }

  .lang-dropdown-menu {
    min-width: 105px;
    border-radius: 14px;
    padding: 4px;
  }

  .lang-option {
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  .nav-toggle {
    font-size: 1.35rem;
    padding: 4px;
  }
}

/* ==========================================================================
   超窄小型手機頂部導覽列自適應微縮 (寬度 <= 375px)
   ========================================================================== */
@media (max-width: 375px) {
  .header-inner {
    padding: 0 6px;
  }

  .brand-logo {
    gap: 5px;
  }

  .brand-logo img:not(.brand-text-img) {
    width: 22px;
    height: 22px;
  }

  .brand-logo .brand-text-img,
  .brand-text-img {
    height: 16px !important;
    width: auto !important;
  }

  .header-actions {
    gap: 4px;
  }

  .header-actions .btn {
    height: 28px;
    padding: 0 8px;
    font-size: 0.75rem;
    border-radius: 16px;
  }

  .lang-dropdown-btn,
  .lang-select-wrapper {
    height: 28px;
    min-width: auto;
    padding: 0 6px;
    border-radius: 16px;
  }

  .lang-current-text,
  .lang-select {
    font-size: 0.75rem;
  }

  .lang-globe-icon {
    display: none;
  }

  .lang-arrow-icon {
    width: 8px;
    height: 8px;
    margin-left: 2px;
  }

  .lang-dropdown-menu {
    min-width: 100px;
    border-radius: 12px;
    padding: 3px;
  }

  .lang-option {
    padding: 6px 8px;
    font-size: 0.76rem;
  }
}

/* ==========================================================================
   行動裝置直向顯示專用微縮規則 (Mobile Portrait)
   ========================================================================== */
@media (max-width: 768px) and (orientation: portrait) {
  .brand-logo img:not(.brand-text-img) {
    width: 32px !important;
    height: 32px !important;
  }

  .brand-logo .brand-text-img,
  .brand-text-img {
    height: 22px !important;
    width: auto !important;
  }
}

@media (max-width: 480px) and (orientation: portrait) {
  .brand-logo img:not(.brand-text-img) {
    width: 26px !important;
    height: 26px !important;
  }

  .brand-logo .brand-text-img,
  .brand-text-img {
    height: 18px !important;
    width: auto !important;
  }
}

@media (max-width: 375px) and (orientation: portrait) {
  .brand-logo img:not(.brand-text-img) {
    width: 22px !important;
    height: 22px !important;
  }

  .brand-logo .brand-text-img,
  .brand-text-img {
    height: 15px !important;
    width: auto !important;
  }
}

/* ==========================================================================
   15. 全螢幕靜謐燭光載入動畫 (Preloader)
   ========================================================================== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 45%, #3A235D 0%, #1F1235 70%, #140A24 100%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--pure-white);
  transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1), visibility 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 淡出後徹底停止內部燭光與光暈動畫，釋放 GPU 資源 */
.preloader.loaded * {
  animation: none !important;
}

.preloader-candle-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.preloader-flame {
  width: 22px;
  height: 38px;
  background: radial-gradient(ellipse at 50% 80%, #FFFFFF 0%, #FFDF6D 35%, #FFA500 70%, transparent 100%);
  border-radius: 50% 50% 35% 35%;
  box-shadow: 0 0 30px #FFDF6D, 0 0 60px #FF8C00, 0 0 90px rgba(212, 175, 55, 0.6);
  animation: preloaderFlameFlicker 1.5s infinite alternate ease-in-out;
  margin-bottom: 8px;
}

.preloader-candle-body {
  width: 32px;
  height: 110px;
  background: linear-gradient(90deg, #FFFFFF 0%, #E6DCF5 50%, #BBA9DC 100%);
  border-radius: 6px 6px 3px 3px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.preloader-candle-base {
  width: 64px;
  height: 14px;
  background: linear-gradient(90deg, #D4AF37 0%, #F7E9B8 50%, #B89220 100%);
  border-radius: 8px;
  margin-top: -3px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.preloader-gif-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 140px;
  height: auto;
  opacity: 0.9;
  display: none;
  /* 當使用 CSS 燭光時隱藏或混合 */
}

.preloader-text {
  text-align: center;
}

.preloader-cross {
  font-size: 1.8rem;
  color: var(--saint-gold);
  margin-bottom: 6px;
  animation: crossPulse 2s infinite alternate ease-in-out;
}

.preloader-text h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--pure-white);
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.preloader-text p {
  font-size: 0.88rem;
  color: var(--saint-gold-light);
  letter-spacing: 2px;
  opacity: 0.85;
}

@keyframes preloaderFlameFlicker {
  0% {
    transform: scale(1) rotate(-1.5deg);
    opacity: 0.85;
    box-shadow: 0 0 25px #FFDF6D, 0 0 50px #FF8C00;
  }

  50% {
    transform: scale(1.12) rotate(2deg);
    opacity: 1;
    box-shadow: 0 0 40px #FFDF6D, 0 0 75px #FF8C00, 0 0 110px rgba(212, 175, 55, 0.8);
  }

  100% {
    transform: scale(0.96) rotate(-1deg);
    opacity: 0.9;
    box-shadow: 0 0 30px #FFDF6D, 0 0 55px #FF8C00;
  }
}

@keyframes crossPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.1);
    opacity: 1;
    text-shadow: 0 0 15px var(--saint-gold);
  }
}

/* 2026-09-07 登入/註冊 之欄位驗證錯誤提示樣式 */
/* 1. 當使用者輸入錯誤格式時，顯示柔和紅框與光暈 */
.form-control:user-invalid,
.form-control.is-invalid {
  border-color: #E57373 !important;
  box-shadow: 0 0 0 3px rgba(229, 115, 115, 0.2) !important;
  background-color: #FFF9F9;
}

/* 2. 當使用者輸入正確 Email 時，顯示優雅金邊/紫邊肯定效果 */
.form-control:not(:placeholder-shown):user-valid {
  border-color: var(--saint-gold, #D4AF37) !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15) !important;
}

/* 3. 欄位下方的即時錯誤文字說明 */
.error-message {
  display: none;
  font-size: 0.8rem;
  color: #D32F2F;
  margin-top: 5px;
  letter-spacing: 0.5px;
}

/* 當輸入框錯誤時，自動顯示下方的錯誤文字 */
.form-control:user-invalid+.error-message,
.form-control.is-invalid+.error-message {
  display: block;
}

/* 2026-09-10 Google 帳號第三方登入與分隔線樣式 */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 22px 0 18px 0;
  text-align: center;
  color: var(--text-muted, #7c748c);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(107, 70, 193, 0.2), transparent);
}

.auth-divider span {
  padding: 0 14px;
  letter-spacing: 0.5px;
  user-select: none;
}

/* 社群快速登入按鈕通用樣式 */
.btn-social-login,
.btn-google-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 11px 18px;
  background-color: #FFFFFF;
  color: #3C4043;
  border: 1.5px solid #DADCE0;
  border-radius: var(--radius-md, 8px);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-sans, "Inter", "Noto Sans TC", sans-serif);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
  position: relative;
  outline: none;
}

.btn-social-login+.btn-social-login,
.btn-google-login+.btn-social-login {
  margin-top: 10px;
}

/* 共同圖示與文字排版 */
.btn-social-login .social-icon,
.btn-google-login .google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-social-login .social-icon svg,
.btn-social-login .social-icon img,
.btn-google-login .google-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.btn-social-login .social-btn-text,
.btn-google-login .google-btn-text {
  letter-spacing: 0.3px;
}

/* 1. Google 按鈕 Hover / Active */
.btn-google-login:hover {
  background-color: #F8F9FA;
  border-color: #C6C8CC;
  box-shadow: 0 3px 10px rgba(107, 70, 193, 0.12), 0 1px 3px rgba(60, 64, 67, 0.15);
  transform: translateY(-1px);
  color: #202124;
}

.btn-google-login:active {
  background-color: #F1F3F4;
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

.btn-google-login:focus-visible {
  border-color: #4285F4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.25);
}

/* 2. Facebook 按鈕樣式與 Hover */
.btn-facebook-login {
  border-color: #DADCE0;
  color: #3C4043;
}

.btn-facebook-login:hover {
  background-color: #F0F6FF;
  border-color: #1877F2;
  color: #1877F2;
  box-shadow: 0 3px 10px rgba(24, 119, 242, 0.16), 0 1px 3px rgba(60, 64, 67, 0.15);
  transform: translateY(-1px);
}

.btn-facebook-login:active {
  background-color: #E7F0FC;
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(24, 119, 242, 0.15);
}

.btn-facebook-login:focus-visible {
  border-color: #1877F2;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.25);
}

/* 3. Apple 按鈕樣式與 Hover */
.btn-apple-login {
  border-color: #DADCE0;
  color: #1D1D1F;
}

.btn-apple-login .apple-icon {
  color: #000000;
}

.btn-apple-login:hover {
  background-color: #F8F9FA;
  border-color: #000000;
  color: #000000;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(60, 64, 67, 0.15);
  transform: translateY(-1px);
}

.btn-apple-login:active {
  background-color: #EEEEEE;
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-apple-login:focus-visible {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   訊息通知 (Toast) 樣式：使用系統預設字型
   ========================================================================== */
#custom-toast {
  font-family: var(--font-sans) !important;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   紀念碑園區 (Monument Park) 專屬樣式系統 (移植自 Dev_Monument_3.html)
   ========================================================================== */
.monument-park-section {
  background-color: #E6DCF5;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.16) 0%, rgba(155, 126, 189, 0.22) 30%, rgba(245, 240, 251, 0.5) 65%, transparent 85%),
    linear-gradient(180deg, #E6DCF5 0%, #F5F0FB 40%, var(--off-white) 100%);
  background-repeat: no-repeat;
  padding-top: 60px;
  padding-bottom: 80px;
  overflow-x: auto;
}

/* 頂部標題資訊區 */
.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

.header-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
  color: #FFFFFF !important;
  font-size: 33px;
  font-weight: 700;
  letter-spacing: 4.5px;
  padding: 15px 54px;
  border-radius: 60px;
  text-transform: uppercase;
  margin-bottom: 10px;
  box-shadow: 0 12px 36px rgba(124, 92, 186, 0.35);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  cursor: pointer;
}

.header-badge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 42px rgba(124, 92, 186, 0.5);
  filter: brightness(1.06);
  color: #FFFFFF !important;
}

/* 紀念碑網格容器 (桌機 3 欄、平版 2 欄、行動裝置 1 欄直向排列) */
.monument-grid {
  display: grid;
  grid-template-columns: repeat(3, 400px);
  gap: 48px 36px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1360px;
  width: 100%;
}

/* 響應式調整：針對 1366x768 筆電與中型桌機螢幕 (1140px ~ 1366px) 保持典雅 3 欄並排，防止破版為 2+1 */
@media (max-width: 1366px) and (min-width: 1140px) {
  .monument-grid {
    grid-template-columns: repeat(3, 360px);
    gap: 36px 20px;
    justify-content: center;
  }

  .monument-grid .monument-item {
    width: 360px;
  }

  .monument-grid .monument-viewport {
    transform-origin: top center;
    transform: scale(0.9);
  }

  .monument-grid .monument-phrase-card {
    transform-origin: top center;
    transform: scale(0.9);
    margin-top: -48px; /* 補償 scale 產生之垂直空白，無縫貼合石碑底緣 */
  }

  .monument-grid .monument-item:hover {
    transform: translateY(-4px);
  }
}

/* 響應式調整：中型螢幕與平版橫向 (2 欄排列，降至 1139px 以下才觸發) */
@media (max-width: 1139px) and (min-width: 881px) {
  .monument-grid {
    grid-template-columns: repeat(2, 400px);
    gap: 40px 32px;
  }
}

/* 響應式調整：行動裝置 / 平版直向 (強制單欄直向排列) */
@media (max-width: 880px) {
  .monument-grid {
    grid-template-columns: minmax(0, 400px);
    justify-content: center;
    justify-items: center;
    gap: 36px 0;
    max-width: 440px;
    width: 100%;
    box-sizing: border-box;
  }
}

/* 窄螢幕手機自適應 (<= 440px，如 375px/390px/414px，等比自適應縮放，防止橫向溢出) */
@media (max-width: 440px) {
  .monument-grid {
    max-width: 100%;
    gap: 24px 0;
  }

  .monument-item {
    width: 100%;
    height: calc((100vw - 24px) * 1.5);
    max-height: 600px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }

  .monument-viewport {
    transform-origin: top center;
    transform: scale(calc((100vw - 24px) / 400));
  }
}

/* 紀念碑外層項目卡片 (無邊框) */
.monument-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: none;
  outline: none;
  transition: transform 0.3s ease, z-index 0.3s ease;
}

.monument-item:hover {
  transform: translateY(-6px);
  z-index: 50;
}

/* 400x600 實體尺寸紀念碑容器 (精確 1:1 Pixel-Perfect，中央淡紫微光向外溶入背景) */
.monument-viewport {
  width: 400px;
  height: 600px;
  min-width: 400px;
  min-height: 600px;
  position: relative;
  /* 由中央向外擴散的淡紫色，使用 closest-side 並於邊界前提前轉為透明，徹底消除分界線 */
  background: radial-gradient(ellipse closest-side at 50% 50%,
      rgba(115, 75, 180, 0.45) 0%,
      rgba(130, 90, 190, 0.28) 35%,
      rgba(145, 110, 200, 0.10) 65%,
      rgba(165, 130, 215, 0.02) 82%,
      transparent 90%,
      transparent 100%);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 15px 35px rgba(45, 30, 70, 0.18),
    0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

.monument-viewport:hover {
  transform: translateY(-4px);
  box-shadow:
    0 22px 45px rgba(45, 30, 70, 0.25),
    0 6px 16px rgba(0, 0, 0, 0.1);
}

.monument-item .monument-viewport {
  border: none;
  box-shadow: none;
  overflow: visible;
}

.monument-item:hover .monument-viewport {
  transform: none;
  box-shadow: none;
}

/* ============================================================
   紀念碑 3 種模式核心圖層樣式 (模式 1：單照 / 模式 2：雙照 / 模式 3：短片)
   ============================================================ */

/* 底層：肖像/影片圓孔 (直徑 236px，左 82px，上 251px，圓心座標: 200, 369) */
.avatar-layer {
  position: absolute;
  left: 82px;
  top: 251px;
  width: 236px;
  height: 236px;
  z-index: 10;
  user-select: none;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.45);
  background-color: transparent;
  transition: left 0.1s, top 0.1s, width 0.1s, height 0.1s;
}

.avatar-layer img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 模式 3：動態肖像影片 (.mp4) */
.avatar-layer video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* 影片播放狀態疊加指示 (小提示) */
.video-status-indicator {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  font-size: 11px;
  color: #fff;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.monument-viewport:hover .video-status-indicator,
.monument-item:hover .video-status-indicator {
  opacity: 0.85;
}

/* 模式 2：滑鼠 Hover 時平滑淡入生活照 (Crossfade) */
.avatar-layer img.avatar-life {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.monument-viewport:hover .avatar-layer img.avatar-life,
.monument-item:hover .avatar-layer img.avatar-life,
.avatar-layer.force-life img.avatar-life {
  opacity: 1;
  transform: scale(1);
}

/* 紀念碑無照片時之占位層 (與 Func_MonumentAdd 保持一致) */
.avatar-layer .avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6E5A8A;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1.5px;
  gap: 10px;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  background: radial-gradient(circle, #D8CCE8 0%, #C4B3DB 100%);
}

.avatar-layer .avatar-placeholder svg {
  width: 52px;
  height: 52px;
  stroke: #6E5A8A;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0.85;
}

/* 中層：獨立相框飾邊層 (MonumentAvatarFrame_001.png，尺寸 296x296，左 52px，上 221px) */
.monument-frame-layer {
  position: absolute;
  left: 52px;
  top: 221px;
  width: 296px;
  height: 296px;
  z-index: 15;
  pointer-events: none;
  user-select: none;
}

.monument-frame-layer img {
  width: 100%;
  height: 100%;
  display: block;
}

/* 表層：紀念碑模板底框 (MonumentTemplate_001.png，尺寸 400x600) */
.monument-template-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 400px;
  height: 600px;
  z-index: 20;
  pointer-events: none;
  user-select: none;
}

.monument-template-layer img {
  width: 100%;
  height: 100%;
  display: block;
}

/* 銘文文字層 (疊加於模板上，完全繼承 Dev_Monument_2.html 最新微調參數) */
.monument-text-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 400px;
  height: 600px;
  z-index: 25;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  box-sizing: border-box;
}

/* 照片上方文字群組 (Y 軸約 60px ~ 220px，提供固定參照座標系) */
.text-top-group {
  position: absolute;
  top: 60px;
  left: 20px;
  right: 20px;
  height: 165px;
  pointer-events: none;
}

/* 抬頭 (Title) - 絕對固定位置 (top: 0px，相對於石碑整體 Y: 60px) */
.monument-title {
  position: absolute;
  top: 0px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #D6BD88;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(212, 175, 55, 0.4);
  line-height: 1.2;
}

/* 姓名1 (Name1) - 絕對固定位置 (top: 52px，相對於石碑整體 Y: 112px) */
.monument-name1 {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #FFFFFF;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95), 0 0 12px rgba(255, 255, 255, 0.3);
  line-height: 1.0;
}

/* 姓名2 (Name2) - 絕對固定位置 (top: 88px，相對於石碑整體 Y: 148px) */
.monument-name2 {
  position: absolute;
  top: 88px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--font-monument-en);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #FFFFFF;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95), 0 0 10px rgba(255, 255, 255, 0.3);
  line-height: 1.2;
}

/* 紀念碑英文字型專屬微調類別 (解決英文字級過大、字距過寬問題) */
.monument-name-en {
  font-family: var(--font-monument-en) !important;
  font-size: 18px !important;
  letter-spacing: 1.2px !important;
  font-weight: 600 !important;
}

/* 當英文被置於上方主要姓名層 (name1) 時之視覺適配 */
.monument-name1.monument-name-en {
  font-size: 20px !important;
  /*強制限制在 20px 才不會被 font-size: ??px; 覆蓋 */
  letter-spacing: 1.0px !important;
  top: 52px;
  margin: 0;
}

/* 當英文/次姓名被置於下方第二層姓名 (name2) 時之視覺適配 (放大字體 20%：原 18px 提升至 21.6px) */
.monument-name2.monument-name-en {
  font-size: 21.6px !important;
  letter-spacing: 1.2px !important;
  top: 88px;
  margin: 0;
}

/* 生歿日期 (BD_Date) - 絕對固定位置靠右二列 (top: 125px，相對於石碑整體 Y: 185px) */
.monument-date {
  position: absolute;
  top: 125px;
  /* 👈 距離 text-top-group 頂部 125px (相對於石碑整體 Y 軸約 185px) */
  right: 16px;
  /* 👈 靠右間距，可自由微調 */
  box-sizing: border-box;
  text-align: right;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.8px;
  line-height: 1.35;
  color: #ECE6F6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 8px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.monument-date>div {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
}

.monument-date .date-icon {
  font-size: 1.5em;
  line-height: 1;
}

/* 照片下方文字群組 (532px) */
.text-bottom-group {
  position: absolute;
  top: 532px;
  left: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 立碑人 (InstalledBy) */
.monument-installed-by {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  transform: translateY(-4px);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 1.5px;
  color: #D6BD88;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 6px rgba(212, 175, 55, 0.3);
}

.monument-installed-by .label {
  font-size: 14px;
  font-weight: 600;
  color: #4A3525;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35), 0 1px 3px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.monument-installed-by .name {
  font-family: var(--font-monument-en, var(--font-sans));
  font-size: 17.25px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  line-height: 1;
}

/* ============================================================
   紀念碑下方：亡者簡短語錄引言卡片 (Phrase Quote Card)
   與 Dev_MonumentAdd.html 預覽畫面保持 1:1 一致
   ============================================================ */
.monument-phrase-card {
  width: 400px;
  max-width: 100%;
  margin-top: 14px;
  background: #F8F4FC;
  background-image: linear-gradient(135deg, rgba(248, 244, 252, 0.98) 0%, rgba(242, 234, 250, 0.98) 100%);
  border: 1px solid rgba(124, 92, 186, 0.16);
  border-left: 3.5px solid var(--primary-purple);
  border-radius: 4px 10px 10px 4px;
  padding: 12px 18px;
  box-shadow: 0 4px 14px rgba(79, 44, 141, 0.06);
  transition: all 0.25s ease;
  box-sizing: border-box;
  min-height: 48px;
}

.pv-phrase-text {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1.65;
  color: #2D253A;
  word-break: break-word;
  text-align: left;
  margin: 0;
  min-height: 22px;
}

/* 當沒有亡者簡短語錄（或內容為空）時引言卡片不顯示 */
.monument-phrase-card:has(.pv-phrase-text:empty),
.monument-phrase-card:empty {
  display: none !important;
}