/* ============================================
神格藏經閣 - Pantheon Archive (SIMPLIFIED)
古籍紙張 × 線裝書 × 藏經閣美學

1) Design Tokens
-------------------------------------------- */
:root {
  /* 紙張色系 */
  --paper-white: #f8f4e9;
  --paper-cream: #f2ecdb;
  --paper-old: #e5dfca;
  --paper-aged: #dfd8c2;

  /* 古墨色系 */
  --ink-deep: #3a3129;
  --ink-dark: #5d4c3a;
  --ink-medium: #7a6b56;
  --ink-light: #9c8e7a;
  --ink-wash: #d9d0bb;

  /* 朱砂/金箔 */
  --vermilion-dark: #c62828;
  --vermilion-medium: #d35400;
  --vermilion-light: #e67e22;

  --gold-dark: #f9a825;
  --gold-medium: #fbc02d;
  --gold-light: #ffeb3b;

  /* 靛青 */
  --indigo-dark: #283593;
  --indigo-medium: #3949ab;
  --indigo-light: #5c6bc0;

  /* 尺寸系統 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* 圓角/陰影（更收斂） */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 26px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.16);

  /* 動畫 */
  --duration-fast: 0.18s;
  --duration-normal: 0.28s;
  --duration-slow: 0.45s;

  /* 字體 */
  --font-title: "Ma Shan Zheng", cursive;
  --font-serif: "Noto Serif TC", serif;
  --font-classic: "STKaiti", "KaiTi", cursive;
  --font-fallback: "SimSun", serif;

  /* 響應式 */
  --breakpoint-mobile: 480px;
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 1024px;
  --breakpoint-large: 1200px;

  /* UI 小工具 */
  --ui-border: rgba(176, 155, 124, 0.45);
  --ui-border-soft: rgba(176, 155, 124, 0.25);
  --ui-panel: rgba(248, 244, 233, 0.88);
  --ui-panel-2: rgba(242, 236, 219, 0.9);
}

/* --------------------------------------------
2) Base Reset
-------------------------------------------- */
.panth-wrapper,
.panth-wrapper * {
  box-sizing: border-box;
}

.panth-wrapper * {
  margin: 0;
  padding: 0;
}

.panth-wrapper {
  min-height: 100vh;
  width: 100%;
  color: var(--ink-deep);
  font-family: var(--font-serif), "Source Han Serif TC", "STSong", var(--font-fallback), serif;
  line-height: 1.75;
  position: relative;
  overflow-x: hidden;

  /* 背景：保留紙感，但不要多層 data-uri 疊到爆 */
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(176, 155, 124, 0.10), transparent 55%),
    radial-gradient(900px 500px at 80% 30%, rgba(176, 155, 124, 0.08), transparent 60%),
    linear-gradient(135deg, var(--paper-white) 0%, var(--paper-cream) 35%, var(--paper-old) 70%, var(--paper-aged) 100%);
  background-attachment: fixed;
}

/* 紙張深度紋理（簡化為一層、避免過多點狀） */
.panth-paper-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(80, 60, 40, 0.06), transparent 45%),
    radial-gradient(ellipse at 75% 35%, rgba(70, 50, 30, 0.05), transparent 42%),
    repeating-linear-gradient(
      90deg,
      rgba(140, 120, 100, 0.035) 0 1px,
      transparent 1px 28px
    );
  filter: blur(0.3px);
}

/* 塵埃粒子：保留容器與粒子 class，讓 JS 還能用，但 CSS 更節制 */
.panth-dust-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.panth-dust-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  filter: blur(0.4px);
  will-change: transform, opacity;
  --opacity: 0.10;
}
.panth-dust-particle.small { width: 1px; height: 1px; }
.panth-dust-particle.medium { width: 2px; height: 2px; }
.panth-dust-particle.large { width: 3px; height: 3px; }

.panth-dust-particle.color-1 { background: rgba(140, 120, 100, var(--opacity)); }
.panth-dust-particle.color-2 { background: rgba(156, 142, 122, var(--opacity)); }
.panth-dust-particle.color-3 { background: rgba(176, 155, 124, var(--opacity)); }
.panth-dust-particle.color-4 { background: rgba(192, 160, 128, var(--opacity)); }

/* --------------------------------------------
3) Layout Container (Archive)
-------------------------------------------- */
.panth-archive-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 44px;
  background: var(--ui-panel);
  border: 1px solid rgba(212, 201, 184, 0.65);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(3px);
}

/* 原本左右超粗「書脊」很吃版面、又用了 position:fixed，這裡改成更乾淨的書脊暗示 */
.panth-archive-container::before,
.panth-archive-container::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 18px;
  border-radius: 12px;
  opacity: 0.65;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(176, 155, 124, 0.14), rgba(176, 155, 124, 0.06));
}
.panth-archive-container::before { left: 10px; }
.panth-archive-container::after { right: 10px; }

.panth-no-print {}

/* --------------------------------------------
4) Header (Cover Page)
-------------------------------------------- */
.panth-archive-header {
  text-align: center;
  margin: 60px 0 90px;
  padding: 44px 22px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(176, 155, 124, 0.35);
  background: var(--ui-panel-2);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.panth-archive-header::before {
  content: "";
  position: absolute;
  inset: -20px;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(176, 155, 124, 0.16), transparent 70%),
    radial-gradient(420px 260px at 20% 120%, rgba(176, 155, 124, 0.10), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.panth-archive-title {
  font-family: var(--font-title), var(--font-classic), cursive;
  font-size: clamp(2.4rem, 4.4vw, 4.2rem);
  font-weight: 400;
  color: var(--ink-dark);
  letter-spacing: 0.42em;
  margin: 0 auto 14px;
  display: inline-block;
  padding: 16px 20px;
  position: relative;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

/* 簡化印章：保留「藏」字，但少一堆陰影/裂紋/浮動 */
.panth-archive-title::after {
  content: "藏";
  position: absolute;
  top: -18px;
  right: -22px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-family: var(--font-classic), cursive;
  font-size: 2rem;
  color: rgba(198, 40, 40, 0.85);
  border: 2px solid rgba(198, 40, 40, 0.75);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 10px;
  transform: rotate(10deg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.panth-archive-subtitle {
  font-size: clamp(1.1rem, 1.6vw, 1.6rem);
  color: var(--ink-medium);
  font-style: italic;
  letter-spacing: 0.35em;
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(176, 155, 124, 0.35);
  background: rgba(232, 223, 208, 0.72);
}

/* --------------------------------------------
5) Sections / Titles
-------------------------------------------- */
.panth-section-title {
  font-size: 1.7rem;
  color: var(--ink-dark);
  margin: 60px 0 18px;
  letter-spacing: 0.16em;
  position: relative;
  padding-bottom: 12px;
  text-align: center;
}

.panth-section-title::after {
  content: "";
  display: block;
  width: min(420px, 60%);
  height: 2px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, rgba(176, 155, 124, 0.75), transparent);
  border-radius: 999px;
}

/* --------------------------------------------
6) Deity Grid / Cards
-------------------------------------------- */
.panth-deity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin: 38px 0 70px;
}

/* 保留這些 class 給 JS 用（但不一定要很花） */
.panth-card-scroll-end-left,
.panth-card-scroll-end-right,
.panth-card-paper-texture,
.panth-card-decorative-border,
.panth-card-ink-effect,
.panth-card-click-ripple,
.panth-card-enter-effect,
.panth-card-page-shadow {
  pointer-events: none;
}

/* 卡片主體：更像「卷頁」但乾淨 */
.panth-deity-card {
  position: relative;
  padding: 34px 32px 54px;
  min-height: 280px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(176, 155, 124, 0.30);
  background: linear-gradient(180deg, rgba(248, 244, 233, 0.92), rgba(242, 236, 219, 0.82));
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    transform var(--duration-slow) ease,
    box-shadow var(--duration-slow) ease,
    border-color var(--duration-normal) ease;
  overflow: hidden;
  will-change: transform;
}

.panth-deity-card::before,
.panth-deity-card::after {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  width: 10px;
  border-radius: 999px;
  opacity: 0.55;
  background: linear-gradient(180deg, rgba(176, 155, 124, 0.22), rgba(176, 155, 124, 0.06));
}
.panth-deity-card::before { left: 14px; }
.panth-deity-card::after { right: 14px; }

.panth-deity-card:hover {
  transform: translateY(-6px);
  border-color: rgba(176, 155, 124, 0.55);
  box-shadow: var(--shadow-md);
}

.panth-deity-name {
  font-size: 1.9rem;
  color: var(--ink-dark);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(176, 155, 124, 0.35);
  position: relative;
  z-index: 1;
}

.panth-deity-name a {
  color: inherit;
  text-decoration: none;
  position: relative;
}

.panth-deity-name a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(176, 155, 124, 0.85), rgba(249, 168, 37, 0.65));
  transition: width var(--duration-normal) ease;
}
.panth-deity-name a:hover::after { width: 100%; }

.panth-deity-title {
  font-size: 1.15rem;
  color: var(--ink-medium);
  font-style: italic;
  margin-bottom: 14px;
  line-height: 1.55;
  position: relative;
  padding-left: 14px;
  z-index: 1;
}
.panth-deity-title::before {
  content: "「";
  position: absolute;
  left: 0;
  top: -2px;
  color: rgba(176, 155, 124, 0.55);
  font-family: var(--font-classic), cursive;
}
.panth-deity-title::after {
  content: "」";
  margin-left: 4px;
  color: rgba(176, 155, 124, 0.55);
  font-family: var(--font-classic), cursive;
}

.panth-deity-desc {
  color: rgba(93, 76, 58, 0.92);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  z-index: 1;
  position: relative;
}

.panth-deity-status {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 6px 12px;
  font-size: 0.92rem;
  color: var(--ink-light);
  background: rgba(232, 223, 208, 0.75);
  border: 1px solid rgba(176, 155, 124, 0.30);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

/* --------------------------------------------
7) Single Deity Page Header
-------------------------------------------- */
.panth-deity-header {
  margin-bottom: 54px;
  text-align: center;
  padding: 34px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(176, 155, 124, 0.35);
  background: rgba(242, 236, 219, 0.85);
  box-shadow: var(--shadow-sm);
}

.panth-deity-main-title {
  font-family: var(--font-title), var(--font-classic), cursive;
  font-size: clamp(2.1rem, 3.4vw, 3.2rem);
  color: var(--ink-dark);
  letter-spacing: 0.32em;
  margin-bottom: 12px;
  padding-bottom: 12px;
  position: relative;
}

.panth-deity-main-title::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(176, 155, 124, 0.85), transparent);
  border-radius: 999px;
}

.panth-deity-subtitle {
  display: inline-block;
  margin-top: 10px;
  font-size: 1.25rem;
  color: var(--ink-medium);
  font-style: italic;
  letter-spacing: 0.22em;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(176, 155, 124, 0.30);
  background: rgba(232, 223, 208, 0.62);
}

/* --------------------------------------------
8) Identity / Visual
-------------------------------------------- */
.panth-identity-section {
  margin: 44px 0;
  padding: 36px 34px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(176, 155, 124, 0.30);
  background: rgba(248, 244, 233, 0.82);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.panth-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.panth-image-item {
  text-align: center;
  position: relative;
}

.panth-image-item-center {
  display: grid;
  place-items: center;
}

.panth-image-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(176, 155, 124, 0.28);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
}

.panth-image-load-effect {}

/* 置中資訊（保留原 class） */
.panth-temple-info-centered {
  text-align: center;
  margin-top: 18px;
  color: var(--ink-medium);
  opacity: 0.95;
}

/* --------------------------------------------
9) Essence / Keywords / Stories
-------------------------------------------- */
.panth-essence-section {
  margin: 44px 0;
  padding: 36px 34px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(176, 155, 124, 0.30);
  background: rgba(248, 244, 233, 0.86);
  box-shadow: var(--shadow-sm);
}

.panth-essence-content {
  color: rgba(58, 49, 41, 0.95);
  font-size: 1.05rem;
  line-height: 1.85;
}

.panth-essence-content > p:first-of-type::first-letter {
  float: left;
  font-size: 2.6rem;
  line-height: 1;
  padding: 8px 10px 4px;
  margin-right: 10px;
  border-radius: 10px;
  color: rgba(93, 76, 58, 0.95);
  background: rgba(232, 223, 208, 0.65);
  border: 1px solid rgba(176, 155, 124, 0.30);
}

.panth-keywords-section {
  margin: 44px 0;
}

.panth-keywords-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

/* 保留 minimal 版面 class（不強制使用） */
.panth-keywords-minimal {}
.panth-keyword-minimal {}

.panth-keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(176, 155, 124, 0.35);
  background: rgba(248, 244, 233, 0.8);
  color: var(--ink-dark);
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform var(--duration-normal) ease, box-shadow var(--duration-normal) ease, background var(--duration-normal) ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  user-select: none;
}

.panth-keyword-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.78);
}

.panth-keyword-active {
  border-color: rgba(176, 155, 124, 0.70);
  background: rgba(249, 168, 37, 0.12);
  color: rgba(93, 76, 58, 0.95);
}

.panth-keyword-ink-effect,
.panth-keyword-text-effect,
.panth-keyword-seal,
.panth-keyword-ripple {}

/* Stories */
.panth-stories-section { margin: 44px 0; }

.panth-stories-list {
  margin-top: 16px;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(176, 155, 124, 0.30);
  background: rgba(248, 244, 233, 0.82);
  box-shadow: var(--shadow-sm);
}

.panth-story-items {
  display: grid;
  gap: 14px;
}

.panth-story-item {
  padding: 16px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(176, 155, 124, 0.22);
  background: rgba(255, 255, 255, 0.42);
  transition: transform var(--duration-normal) ease, box-shadow var(--duration-normal) ease, border-color var(--duration-normal) ease;
}

.panth-story-item:hover {
  transform: translateY(-2px);
  border-color: rgba(176, 155, 124, 0.40);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.09);
}

.panth-story-title {
  font-size: 1.15rem;
  color: var(--ink-dark);
  margin-bottom: 8px;
}

.panth-story-title a {
  color: inherit;
  text-decoration: none;
  position: relative;
}

.panth-story-title a:hover { color: rgba(139, 115, 85, 0.95); }

.panth-story-desc {
  color: rgba(93, 76, 58, 0.90);
  line-height: 1.75;
  font-size: 1rem;
}

/* Extensions */
.panth-extensions-section { margin: 44px 0; }

.panth-extension-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.panth-extension-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(176, 155, 124, 0.35);
  background: rgba(242, 236, 219, 0.85);
  color: rgba(93, 76, 58, 0.95);
  text-decoration: none;
  transition: transform var(--duration-normal) ease, box-shadow var(--duration-normal) ease, background var(--duration-normal) ease;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.panth-extension-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.70);
}

/* --------------------------------------------
10) Back Button / Navigation / Notes
-------------------------------------------- */
.panth-back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 6px 0 24px;
  border-radius: 999px;
  border: 1px solid rgba(176, 155, 124, 0.35);
  background: rgba(248, 244, 233, 0.75);
  color: var(--ink-dark);
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  transition: transform var(--duration-normal) ease, box-shadow var(--duration-normal) ease, background var(--duration-normal) ease;
}

.panth-back-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.70);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.12);
}

.panth-empty-note {
  text-align: center;
  color: var(--ink-light);
  opacity: 0.95;
  margin-top: 10px;
}

.panth-deity-keywords {}
.panth-story-navigation {}

/* --------------------------------------------
11) Empty State
-------------------------------------------- */
.panth-empty-state {
  text-align: center;
  padding: 90px 28px;
  margin: 60px auto;
  max-width: 860px;
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(176, 155, 124, 0.40);
  background: rgba(232, 223, 208, 0.55);
  color: var(--ink-medium);
  box-shadow: var(--shadow-sm);
}

.panth-empty-state::before {
  content: "📜";
  display: block;
  font-size: 4.6rem;
  opacity: 0.35;
  margin-bottom: 18px;
}

.panth-empty-state p:first-of-type {
  font-size: 1.35rem;
  color: var(--ink-dark);
  margin-bottom: 10px;
}

.panth-empty-state p:last-of-type {
  font-size: 1.05rem;
  opacity: 0.9;
}

/* --------------------------------------------
12) Toast / Hint / Light / Timeline (保留 class)
-------------------------------------------- */
.panth-dynamic-light {}
.panth-search-hint {}

.panth-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(58, 49, 41, 0.92);
  color: rgba(255, 255, 255, 0.92);
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(176, 155, 124, 0.35);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  max-width: min(720px, 92vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity var(--duration-normal) ease, transform var(--duration-normal) ease, bottom var(--duration-normal) ease;
}

.panth-timeline-connector {}
.panth-timeline-dot {}
.panth-timeline-ripple {}

/* --------------------------------------------
13) Page Decor (保留 class、但更輕)
-------------------------------------------- */
.panth-page-divider {
  height: 1px;
  margin: 34px auto;
  width: min(720px, 80%);
  background: linear-gradient(90deg, transparent, rgba(176, 155, 124, 0.6), transparent);
  border-radius: 999px;
  opacity: 0.9;
}

.panth-page-shadow {}
.panth-page-texture {}
.panth-page-turn-animation {}
.panth-scroll-unfold-effect {}

.panth-page-number {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-size: 0.95rem;
  color: rgba(140, 120, 100, 0.65);
  font-family: var(--font-classic), cursive;
  padding: 4px 10px;
  background: rgba(232, 223, 208, 0.75);
  border-radius: 999px;
  border: 1px solid rgba(176, 155, 124, 0.25);
}

.panth-brush-text {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-family: var(--font-classic), cursive;
  color: rgba(176, 155, 124, 0.28);
  font-size: 1.45rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--duration-normal) ease, transform var(--duration-normal) ease;
}

.panth-card-active .panth-brush-text {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------
14) Animation Hooks (給 JS 掛 class 用)
-------------------------------------------- */
.panth-animate-fade-in {
  animation: panth-fade-in var(--duration-slow) ease both;
}
@keyframes panth-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panth-animate-text-reveal {
  animation: panth-text-reveal var(--duration-slow) ease both;
}
@keyframes panth-text-reveal {
  from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.panth-animate-scroll-unfold {
  animation: panth-unfold var(--duration-slow) ease both;
}
@keyframes panth-unfold {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 可見狀態 */
.panth-page-visible { opacity: 1; transform: translateY(0); }
.panth-card-visible { opacity: 1; transform: translateY(0); }

/* 卷軸狀態（保留行為） */
.panth-scrolled { transform: translateY(var(--scroll-offset)); }
.panth-unrolled { max-height: 1000px; opacity: 1; transform: scaleY(1); }
.panth-rolled { max-height: 0; opacity: 0; transform: scaleY(0); }

/* --------------------------------------------
15) Utility Classes (保留你原本的工具類)
-------------------------------------------- */
.panth-flex-center { display: flex; align-items: center; justify-content: center; }
.panth-flex-between { display: flex; align-items: center; justify-content: space-between; }

.panth-grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.panth-text-center { text-align: center; }
.panth-text-justify { text-align: justify; }

.panth-text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panth-text-multiline-ellipsis {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
  font-size: 1rem;
}

.panth-mt-sm { margin-top: var(--spacing-sm); }
.panth-mt-md { margin-top: var(--spacing-md); }
.panth-mt-lg { margin-top: var(--spacing-lg); }

.panth-mb-sm { margin-bottom: var(--spacing-sm); }
.panth-mb-md { margin-bottom: var(--spacing-md); }
.panth-mb-lg { margin-bottom: var(--spacing-lg); }

.panth-py-sm { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.panth-py-md { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.panth-py-lg { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }

.panth-hidden { display: none !important; }

.panth-visually-hidden {
  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;
}

/* --------------------------------------------
16) Responsive
-------------------------------------------- */
@media (max-width: 1024px) {
  .panth-archive-container { padding: 48px 28px; }
  .panth-archive-title { letter-spacing: 0.32em; }
  .panth-deity-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
  .panth-archive-container { padding: 36px 18px; }
  .panth-archive-container::before,
  .panth-archive-container::after { display: none; }

  .panth-archive-header { margin: 40px 0 60px; padding: 34px 16px; }
  .panth-deity-grid { gap: 16px; margin: 26px 0 50px; }
  .panth-deity-card { padding: 26px 20px 52px; }

  .panth-identity-section,
  .panth-essence-section,
  .panth-stories-list { padding: 26px 18px; }
}

@media (max-width: 480px) {
  .panth-archive-title { letter-spacing: 0.22em; padding: 12px 14px; }
  .panth-archive-title::after { transform: rotate(10deg) scale(0.92); right: -16px; top: -14px; }
  .panth-keyword-tag { width: 100%; justify-content: center; }
  .panth-extension-link { width: 100%; justify-content: center; }
}

/* --------------------------------------------
17) Dark Mode
-------------------------------------------- */
@media (prefers-color-scheme: dark) {
  .panth-wrapper {
    background:
      radial-gradient(1200px 600px at 20% 10%, rgba(249, 168, 37, 0.06), transparent 55%),
      radial-gradient(900px 500px at 80% 30%, rgba(176, 155, 124, 0.05), transparent 60%),
      linear-gradient(135deg, #201c18 0%, #191613 45%, #15120e 100%);
    color: #e6dfcd;
  }

  .panth-paper-layer { opacity: 0.22; }

  .panth-archive-container {
    background: rgba(35, 30, 25, 0.88);
    border-color: rgba(90, 80, 70, 0.55);
  }

  .panth-archive-header {
    background: rgba(45, 40, 35, 0.85);
    border-color: rgba(90, 80, 70, 0.55);
  }

  .panth-archive-title,
  .panth-deity-main-title,
  .panth-section-title,
  .panth-deity-name,
  .panth-story-title { color: #e6dfcd; }

  .panth-archive-subtitle,
  .panth-deity-title,
  .panth-temple-info-centered,
  .panth-empty-state { color: rgba(230, 223, 205, 0.86); }

  .panth-deity-card,
  .panth-identity-section,
  .panth-essence-section,
  .panth-stories-list {
    background: rgba(50, 45, 40, 0.88);
    border-color: rgba(90, 80, 70, 0.55);
  }

  .panth-keyword-tag {
    background: rgba(60, 55, 50, 0.75);
    border-color: rgba(249, 168, 37, 0.45);
    color: rgba(255, 235, 59, 0.85);
  }

  .panth-extension-link {
    background: rgba(60, 55, 50, 0.75);
    border-color: rgba(90, 80, 70, 0.55);
    color: rgba(230, 223, 205, 0.90);
  }
}

/* --------------------------------------------
18) Print
-------------------------------------------- */
@media print {
  .panth-wrapper { background: white !important; color: black !important; }
  .panth-paper-layer,
  .panth-dust-particles,
  .panth-seal-decoration,
  .panth-toast { display: none !important; }

  .panth-archive-container {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    background: white !important;
    padding: 20px !important;
  }

  .panth-deity-card,
  .panth-essence-section,
  .panth-identity-section,
  .panth-stories-list {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    background: white !important;
  }
}

/* --------------------------------------------
19) Reduced Motion
-------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .panth-animate-fade-in,
  .panth-animate-text-reveal,
  .panth-animate-scroll-unfold {
    animation: none !important;
  }

  .panth-deity-card,
  .panth-keyword-tag,
  .panth-extension-link,
  .panth-back-button {
    transition: none !important;
  }
}
