/* ============================================
   VanSherry - Medieval × Apple Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;900&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=IM+Fell+English:ital@0;1&display=swap');

/* ── CSS Variables ── */
:root {
  /* Dark Mode (Default) */
  --bg-primary: #0d0a06;
  --bg-secondary: #13100a;
  --bg-card: rgba(20, 16, 10, 0.85);
  --bg-glass: rgba(255, 210, 140, 0.04);
  --border-color: rgba(196, 158, 80, 0.25);
  --border-glow: rgba(196, 158, 80, 0.6);
  --text-primary: #e8d5a3;
  --text-secondary: #a89060;
  --text-muted: #6b5740;
  --accent-gold: #c49e50;
  --accent-gold-bright: #f0c060;
  --accent-crimson: #8b1a1a;
  --accent-crimson-bright: #c0392b;
  --accent-silver: #a8b8c8;
  --shadow-gold: 0 0 20px rgba(196, 158, 80, 0.3);
  --shadow-deep: 0 8px 32px rgba(0,0,0,0.6);
  --particle-color: rgba(196, 158, 80, 0.6);
  --parchment-filter: none;
  --nav-bg: rgba(10, 8, 4, 0.92);
  --overlay-bg: rgba(0,0,0,0.75);
}

/* Light Mode */
[data-theme="light"] {
  --bg-primary: #f5ead0;
  --bg-secondary: #ede0c0;
  --bg-card: rgba(245, 234, 200, 0.92);
  --bg-glass: rgba(120, 80, 20, 0.05);
  --border-color: rgba(120, 85, 30, 0.3);
  --border-glow: rgba(160, 110, 40, 0.7);
  --text-primary: #2c1a08;
  --text-secondary: #6b4010;
  --text-muted: #9a7040;
  --accent-gold: #9a6e20;
  --accent-gold-bright: #c08820;
  --accent-crimson: #7a1010;
  --accent-crimson-bright: #a02020;
  --accent-silver: #5a6878;
  --shadow-gold: 0 0 20px rgba(160, 110, 40, 0.2);
  --shadow-deep: 0 8px 32px rgba(80,50,10,0.2);
  --particle-color: rgba(160, 120, 40, 0.5);
  --nav-bg: rgba(235, 220, 180, 0.95);
  --overlay-bg: rgba(100, 70, 20, 0.6);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Crimson Text', 'IM Fell English', Georgia, serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
  min-height: 100vh;
}

/* ── Canvas Background ── */
#canvas-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.page-wrapper {
  /* 不建立层叠上下文，避免干扰 fixed 元素 */
  position: static;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-gold); border-radius: 3px; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.5s ease;
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent-gold-bright);
  text-decoration: none;
  letter-spacing: 0.15em;
  text-shadow: 0 0 20px rgba(240, 192, 96, 0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.nav-logo .crown-icon {
  font-size: 1.4rem;
  animation: crownFloat 3s ease-in-out infinite;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s ease;
  cursor: pointer;
}

.nav-links a:hover { color: var(--accent-gold-bright); }

/* ── Theme Toggle ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.theme-toggle:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: var(--shadow-gold);
}

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(196, 158, 80, 0.08) 0%, transparent 70%);
  pointer-events: none;
}


/* 天气感知：不同天气在 hero 区叠加微妙氛围色 */
.hero.weather-rain::before {
  background: radial-gradient(ellipse at center, rgba(100, 140, 180, 0.06) 0%, transparent 70%);
}
.hero.weather-snow::before {
  background: radial-gradient(ellipse at center, rgba(200, 220, 240, 0.06) 0%, transparent 70%);
}
.hero.weather-cloudy::before {
  background: radial-gradient(ellipse at center, rgba(140, 140, 150, 0.05) 0%, transparent 70%);
}
.hero.weather-fog::before {
  background: radial-gradient(ellipse at center, rgba(160, 160, 170, 0.08) 0%, transparent 60%);
}
.hero.weather-sunny_night::before {
  background: radial-gradient(ellipse at center, rgba(100, 160, 80, 0.04) 0%, transparent 70%);
}

.hero-ornament {
  font-size: 2.5rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  opacity: 0.7;
  animation: ornamentPulse 4s ease-in-out infinite;
}

@keyframes ornamentPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 900;
  color: var(--accent-gold-bright);
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-shadow: 0 0 60px rgba(240, 192, 96, 0.3), 0 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 0.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: heroTitleFadeIn 0.6s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.hero-subtitle {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  margin-bottom: 3rem;
  animation: heroReveal 1.2s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

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

.hero-divider {
  text-align: center;
  margin: 0.8rem auto 2rem;
  color: var(--accent-gold);
  animation: heroReveal 1.2s 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  position: relative;
  display: block;
  line-height: 1;
}

.hero-divider::before,
.hero-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-gold));
}

.hero-divider::before {
  right: calc(50% + 1.2em);
  background: linear-gradient(to right, transparent, var(--accent-gold));
}

.hero-divider::after {
  left: calc(50% + 1.2em);
  background: linear-gradient(to left, transparent, var(--accent-gold));
}

/* ── Stats Bar ── */
.stats-bar {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin: 2rem 0;
  animation: heroReveal 1.2s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent-gold-bright);
  text-shadow: 0 0 15px rgba(240, 192, 96, 0.4);
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: 'Cinzel', serif;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
  align-self: center;
}

/* ── Section Titles ── */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 4rem;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
}

.section-ornament {
  color: var(--accent-gold);
  opacity: 0.5;
  font-size: 1.2rem;
  margin: 1rem 0;
  letter-spacing: 0.5em;
}

/* ── Post Grid ── */
.posts-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.filter-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(196, 158, 80, 0.08);
  box-shadow: 0 0 15px rgba(196, 158, 80, 0.15);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.4rem;
}

/* ── Post Card ── */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.post-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold), var(--shadow-deep);
}

.post-card:hover::before {
  transform: scaleX(1);
}

.post-card-category {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-card-category::before {
  content: '⚜';
  font-size: 0.7rem;
}

.post-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.post-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.65rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag:hover {
  border-color: var(--accent-silver);
  color: var(--accent-silver);
}

/* ── Article Page ── */
.article-page {
  display: none;
  max-width: 100%;
  margin: 0 auto;
  padding: 6rem 3rem 6rem;
}

.article-page.active { display: block; }

.article-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(196, 158, 80, 0.15);
  position: relative;
}

.article-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.article-category-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-gold);
  opacity: 0.7;
  margin-bottom: 1.2rem;
  display: block;
}

.article-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 1.8rem;
  letter-spacing: 0.01em;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  flex-wrap: wrap;
  opacity: 0.75;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── 正文阅读容器 ── */
.article-content {
  font-family: 'Crimson Text', Georgia, 'Times New Roman', serif;
  font-size: 1.08rem;
  line-height: 1.9;
  color: var(--text-primary);
  letter-spacing: 0.012em;
  max-width: 66%;
  margin: 0 auto;
  background: rgba(255, 248, 235, 0.028);
  border: 1px solid rgba(196, 158, 80, 0.1);
  border-radius: 16px;
  padding: 3rem 3.5rem;
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.03);
}

.article-content h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 2.8rem 0 1rem;
  letter-spacing: 0.04em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(196, 158, 80, 0.18);
}

.article-content h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin: 2.4rem 0 0.9rem;
  letter-spacing: 0.04em;
  position: relative;
  padding-left: 1rem;
}

.article-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.1em;
  width: 2.5px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--accent-gold), transparent);
}

.article-content h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.0rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 2rem 0 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.article-content p {
  margin-bottom: 1.15rem;
  -webkit-font-smoothing: antialiased;
}

.article-content a {
  color: var(--accent-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 158, 80, 0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.article-content a:hover {
  color: var(--accent-gold-bright);
  border-color: rgba(196, 158, 80, 0.6);
}

.article-content blockquote {
  border-left: none;
  margin: 2rem 0;
  padding: 1.2rem 1.8rem;
  background: rgba(196, 158, 80, 0.05);
  border-radius: 10px;
  font-style: italic;
  color: var(--text-secondary);
  position: relative;
  border: 1px solid rgba(196, 158, 80, 0.1);
}

.article-content blockquote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(to bottom, var(--accent-gold) 0%, transparent 100%);
}

.article-content code {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  background: rgba(196, 158, 80, 0.08);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  font-size: 0.83em;
  color: var(--accent-gold-bright);
  border: 1px solid rgba(196, 158, 80, 0.15);
  letter-spacing: 0;
}

.article-content pre {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(196, 158, 80, 0.12);
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  overflow-x: auto;
  margin: 2rem 0;
  position: relative;
}

.article-content pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,158,80,0.3), transparent);
}

.article-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
}

.article-content hr {
  border: none;
  text-align: center;
  margin: 2.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.article-content hr::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(196, 158, 80, 0.2));
}

.article-content hr::after {
  content: '✦';
  flex: none;
  width: auto;
  height: auto;
  font-size: 0.6rem;
  color: rgba(196, 158, 80, 0.5);
  letter-spacing: 0;
}

.article-content img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(196, 158, 80, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.article-content img:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}

.article-content ul,
.article-content ol {
  padding-left: 1.6rem;
  margin-bottom: 1.15rem;
}

.article-content li {
  margin-bottom: 0.45rem;
  line-height: 1.85;
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content em {
  color: var(--text-secondary);
  font-style: italic;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.92rem;
}

.article-content th {
  background: rgba(196, 158, 80, 0.08);
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(196, 158, 80, 0.2);
  text-align: left;
}

.article-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(196, 158, 80, 0.07);
  color: var(--text-secondary);
}

.article-content tr:last-child td { border-bottom: none; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.3s ease;
  margin-bottom: 2rem;
  padding: 0.5rem 0;
  border: none;
  background: none;
}

.back-btn:hover { color: var(--accent-gold); }

/* ── Admin Panel ── */
/* ── Admin Page (独立页面) ── */
#admin-page {
  padding: 80px 0 60px;
  min-height: 100vh;
}

.admin-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  width: 96%;
  max-width: 1300px;
  margin: 0 auto;
  min-height: calc(100vh - 140px);
  box-shadow: var(--shadow-deep), 0 0 60px rgba(196, 158, 80, 0.1);
  animation: panelSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.admin-title {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-close {
  background: none;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.admin-close:hover {
  border-color: var(--accent-crimson-bright);
  color: var(--accent-crimson-bright);
}

/* ── Forms ── */
.form-group { margin-bottom: 1.5rem; }

.form-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
  appearance: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(196, 158, 80, 0.1);
}

.form-textarea {
  min-height: 300px;
  resize: vertical;
  line-height: 1.7;
  font-size: 0.95rem;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 1.8rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-bright));
  color: #0d0a06;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 158, 80, 0.4);
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--accent-crimson-bright);
  color: var(--accent-crimson-bright);
}

.btn-danger:hover {
  background: var(--accent-crimson-bright);
  color: white;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ── Key Modal ── */
.key-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.key-modal.active { display: flex; }

.key-modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 3rem;
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 0 80px rgba(196, 158, 80, 0.15);
  animation: panelSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.key-modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  animation: keyGlow 2s ease-in-out infinite alternate;
}

@keyframes keyGlow {
  from { text-shadow: 0 0 10px rgba(196, 158, 80, 0.3); }
  to { text-shadow: 0 0 30px rgba(196, 158, 80, 0.8); }
}

.key-modal-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.key-modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-style: italic;
}

.key-error {
  color: var(--accent-crimson-bright);
  font-size: 0.8rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
  margin-top: 1rem;
  min-height: 1.2em;
}

/* ── Admin Tabs ── */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
}

.admin-tab {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s ease;
}

.admin-tab.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

/* ── Post List in Admin ── */
.admin-post-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.admin-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-glass);
  gap: 1rem;
}

.admin-post-item-title {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--text-primary);
  flex: 1;
}

.admin-post-item-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  white-space: nowrap;
}

.admin-post-actions {
  display: flex;
  gap: 0.5rem;
}

/* ── Category Manager ── */
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.category-item button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  transition: color 0.2s ease;
}

.category-item button:hover { color: var(--accent-crimson-bright); }

/* ── Toast Notification ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-deep);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { border-color: var(--accent-gold); }
.toast.error { border-color: var(--accent-crimson-bright); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state p {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
}

/* ── Animations ── */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger-in:nth-child(1) { animation-delay: 0.05s; }
.stagger-in:nth-child(2) { animation-delay: 0.1s; }
.stagger-in:nth-child(3) { animation-delay: 0.15s; }
.stagger-in:nth-child(4) { animation-delay: 0.2s; }
.stagger-in:nth-child(5) { animation-delay: 0.25s; }
.stagger-in:nth-child(6) { animation-delay: 0.3s; }

/* ── Hidden Crest (Easter Egg Trigger) ── */
.hidden-crest {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  opacity: 0.07;
  cursor: pointer;
  z-index: 10000;
  transition: opacity 0.3s ease;
  user-select: none;
  padding: 1rem 1.5rem;   /* 扩大点击热区 */
  line-height: 1;
  pointer-events: all;
}

.hidden-crest:hover { opacity: 0.18; }

.hidden-crest.awakening {
  animation: crestAwaken 0.5s ease;
}

@keyframes crestAwaken {
  0% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.5); opacity: 0.6; }
  100% { transform: translateX(-50%) scale(1); }
}

/* ── Loading ── */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Responsive ── */
@media (max-width: 1400px) {
  .posts-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
  .posts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .nav-links { gap: 1rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 1.5rem; }
  .admin-panel { padding: 1.5rem; }
  .article-page { padding: 5rem 1rem 3rem; }
  .article-content { padding: 2rem 1.5rem; border-radius: 12px; }
}

/* ── Cover Image (Post Card) ── */
.post-card-cover {
  width: calc(100% + 4rem);
  margin: -2rem -2rem 1.5rem;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
  filter: brightness(0.85) saturate(0.9);
}

.post-card:hover .post-card-cover {
  transform: scale(1.03);
  filter: brightness(0.95) saturate(1.05);
}

.post-card-cover-wrap {
  width: calc(100% + 4rem);
  margin: -2rem -2rem 1.5rem;
  height: 180px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: var(--bg-glass);
}

/* ── Cover Image (Article Header) ── */
.article-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  display: block;
  border: 1px solid var(--border-color);
  animation: fadeIn 0.8s ease forwards;
  filter: brightness(0.9) saturate(0.85);
  transition: filter 0.4s ease;
}

.article-cover:hover {
  filter: brightness(1) saturate(1);
}

/* ── Image Upload Area ── */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--accent-gold);
  background: rgba(196, 158, 80, 0.05);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-area-text {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.upload-area-icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.4; }

.cover-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.8rem;
  border: 1px solid var(--border-color);
  display: none;
}

.cover-preview.visible { display: block; }

/* ── Inline image insert toolbar ── */
.editor-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.editor-toolbar button {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-toolbar button:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.inline-upload-input { display: none; }

/* Article inline images */
.article-content img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin: 1.5rem 0;
  display: block;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.article-content img:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-gold);
}

/* ═══════════════════════════════════════════════════
   CHINA MAP — 山河志
   ═══════════════════════════════════════════════════ */

.map-section {
  padding: 4rem 0 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.map-wrapper {
  position: relative;
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* 羊皮纸纹理覆盖层 */
.map-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(180, 150, 80, 0.015) 40px,
    rgba(180, 150, 80, 0.015) 41px
  );
  pointer-events: none;
  border-radius: 16px;
}

/* ── SVG 地图本体 ── */
.china-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* ── 省份 group（承载抬升动效） ── */
.province-group {
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.28s ease;
  transform-origin: center center;
  transform-box: fill-box;
}

.province-group:hover {
  transform: translateY(-6px) scale(1.015);
  filter: url(#province-lift);
  z-index: 10;
}

/* ── 省份路径（面） ── */
.province-path {
  stroke: var(--accent-gold);
  stroke-width: 0.6;
  stroke-opacity: 0.45;
  fill: #242010;
  fill-opacity: 0.82;
  transition: fill 0.25s ease, fill-opacity 0.25s ease,
              stroke-opacity 0.25s ease, stroke-width 0.25s ease;
}

[data-theme="light"] .province-path {
  fill: #ddd5ba;
  fill-opacity: 0.88;
}

.province-path.has-mark {
  /* 省份底色不受标记影响，只加重边框提示 */
  stroke-opacity: 0.7;
  stroke-width: 0.9;
}

[data-theme="light"] .province-path.has-mark {
  stroke-opacity: 0.7;
}

.province-group:hover .province-path {
  stroke-opacity: 1;
  fill-opacity: 1;
  stroke-width: 1;
}

.province-group:hover .province-path:not(.has-mark) {
  fill: #342c14;
}

[data-theme="light"] .province-group:hover .province-path:not(.has-mark) {
  fill: #ede4cc;
}

.province-group:hover .province-path.has-mark {
  stroke-width: 1.2;
}

/* ── 省份标签 ── */
.province-label {
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-size: 8.5px;
  fill: var(--text-muted);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, font-size 0.2s ease, fill 0.2s ease;
}

.province-group:hover .province-label {
  opacity: 1;
  font-size: 9.5px;
  fill: var(--accent-gold);
}

/* ── 标记脉冲动画 ── */
.mark-pulse {
  fill: none;
  stroke-width: 1.5;
  opacity: 0;
  animation: mapPulse 2.6s ease-out infinite;
}

.mark-dot {
  transition: r 0.2s ease;
}

.province-group:hover .mark-dot {
  r: 5;
}

@keyframes mapPulse {
  0%   { r: 7;  opacity: 0.9; }
  100% { r: 22; opacity: 0; }
}

/* ── Tooltip 悬浮卡片 ── */
.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--card-bg);
  border: 1px solid var(--accent-gold);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 0 0 1px rgba(201,168,76,0.15);
  backdrop-filter: blur(12px);
  min-width: 160px;
  max-width: 300px;
  max-height: 320px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 500;
}

.map-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.map-tooltip-name {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.map-tooltip-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* 多地点聚合 tooltip */
.tip-spot-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tip-spot-row:last-child { border-bottom: none; }

.tip-spot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.tip-spot-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tip-spot-name {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.tip-spot-note {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── 后台地图管理 ── */
.admin-map-list {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* 省份分组 */
.admin-map-group {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.admin-map-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.8rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-color);
}

.admin-map-group-name {
  font-size: 0.78rem;
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.06em;
}

.admin-map-group-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.admin-map-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.2s ease;
}

.admin-map-item:hover {
  border-color: var(--accent-gold);
}

.admin-map-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.admin-map-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-map-name {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}

.admin-map-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

/* 编辑按钮 */
.admin-map-edit {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.admin-map-edit:hover {
  border-color: rgba(201,168,76,0.4);
  color: var(--accent-gold);
}

/* 地点操作按钮区 */
.admin-map-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* 内联编辑面板 */
.admin-map-edit-form {
  margin-top: 0.5rem;
  padding: 0.8rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.admin-map-edit-form .form-input,
.admin-map-edit-form .form-textarea {
  font-size: 0.82rem;
  padding: 0.45rem 0.7rem;
}
.admin-map-edit-form .form-textarea {
  min-height: 70px;
  resize: vertical;
}
.admin-map-edit-actions {
  display: flex;
  gap: 0.5rem;
}
.btn-save-edit {
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--accent-gold);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-save-edit:hover {
  background: rgba(201,168,76,0.25);
}
.btn-cancel-edit {
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel-edit:hover {
  color: var(--text-primary);
}

.admin-map-del {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.admin-map-del:hover {
  border-color: #8b3a3a;
  color: #c9705a;
}

.admin-map-add {
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
}

/* 颜色选择器 */
.map-color-picker {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.3rem;
}

.map-color-dot {
  width: 22px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.map-color-dot:hover {
  transform: scale(1.15);
}

.map-color-dot.active {
  border-color: white;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════════════════
   足迹连线 SVG 层
   ═══════════════════════════════════════════════════ */
.links-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* 让连线层的 link-group 可以响应鼠标 */
.links-svg-layer .link-group {
  pointer-events: all;
  cursor: pointer;
}

/* 透明宽区域（便于 hover 捕获细线） */
.link-hit-area {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
}

/* 流光主线 */
.link-path {
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 7 5;
  opacity: 0.55;
  animation: linkFlow 2.2s linear infinite;
  transition: opacity 0.2s ease, stroke-width 0.2s ease;
}

.link-group:hover .link-path {
  opacity: 1;
  stroke-width: 2.8;
}

@keyframes linkFlow {
  from { stroke-dashoffset: 96; }
  to   { stroke-dashoffset: 0; }
}

/* Tooltip 连线专用样式 */
.tip-link-arrow {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.15rem 0;
}

.tip-link-label {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: italic;
  text-align: center;
}

/* ═══════════════════════════════════════════════════
   后台管理：连线区块
   ═══════════════════════════════════════════════════ */
.admin-link-section {
  margin-top: 1.8rem;
}

.admin-section-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.admin-section-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-link-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-link-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  flex-wrap: wrap;
  transition: border-color 0.2s ease;
}

.admin-link-item:hover {
  border-color: rgba(201,168,76,0.3);
}

.admin-link-item.link-warn {
  border-color: rgba(139,58,58,0.4);
  background: rgba(139,58,58,0.05);
}

.admin-link-nodes {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
}

.admin-link-node {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
  background: rgba(201,168,76,0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(201,168,76,0.2);
}

.admin-link-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-link-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.admin-link-warn {
  font-size: 0.75rem;
  color: #c9705a;
}

.admin-link-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.admin-link-add {
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

/* map-container 需要 relative 定位，让连线 SVG 层 absolute 覆盖 */
.map-container {
  position: relative;
}

/* ═══════════════════════════════════════════════════
   地图详情 Drawer
   ═══════════════════════════════════════════════════ */
.map-drawer-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1100;
  backdrop-filter: blur(2px);
  animation: drawerMaskIn 0.22s ease;
}
.map-drawer-mask.open { display: block; }

@keyframes drawerMaskIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.map-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 90vw;
  height: 100vh;
  background: var(--card-bg);
  border-left: 1px solid var(--accent-gold);
  box-shadow: -6px 0 32px rgba(0,0,0,0.45);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.map-drawer.open {
  transform: translateX(0);
}

.map-drawer-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  z-index: 1;
}
.map-drawer-close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.07);
}

.map-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.2rem 2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-gold) transparent;
}
.map-drawer-content::-webkit-scrollbar { width: 4px; }
.map-drawer-content::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: 2px;
  opacity: 0.4;
}

/* Drawer 内部区块 */
.drawer-title {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201,168,76,0.25);
}

.drawer-mark-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.drawer-mark-item:last-child { border-bottom: none; }

.drawer-mark-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.4rem;
}
.drawer-mark-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.drawer-mark-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.drawer-mark-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  padding-left: 1.55rem;
}

/* 连线 Drawer 样式 */
.drawer-link-nodes {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0;
  padding: 0.9rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid rgba(201,168,76,0.15);
}
.drawer-link-node {
  flex: 1;
  text-align: center;
}
.drawer-link-node-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 auto 0.35rem;
}
.drawer-link-node-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.drawer-link-sep {
  font-size: 1.3rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.drawer-link-label-box {
  margin-top: 0.8rem;
  padding: 0.7rem 0.9rem;
  background: rgba(201,168,76,0.06);
  border-left: 2px solid var(--accent-gold);
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.drawer-link-date {
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

/* 连线编辑内联面板 */
.admin-link-edit-form {
  margin-top: 0.5rem;
  padding: 0.8rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.admin-link-edit-form .form-input {
  font-size: 0.82rem;
  padding: 0.45rem 0.7rem;
}
.admin-link-item .admin-map-edit {
  flex-shrink: 0;
}

/* ================================================
   NAV — 当前项居中高亮
   ================================================ */
.nav-carousel-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.8rem;
  list-style: none;
  margin: 0;
  padding: 0 3rem;
  flex-shrink: 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.nav-links li {
  flex-shrink: 0;
}

.nav-links li a {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s, text-shadow 0.3s, letter-spacing 0.3s, opacity 0.3s;
  text-transform: uppercase;
  white-space: nowrap;
  display: block;
  opacity: 0.55;
  padding: 0.2rem 0;
}

.nav-links li a:hover {
  color: var(--accent-gold);
  opacity: 0.85;
}

.nav-links li.nav-active a {
  color: var(--accent-gold-bright);
  text-shadow: 0 0 14px rgba(196, 158, 80, 0.6);
  letter-spacing: 0.22em;
  opacity: 1;
  font-weight: 600;
}

/* ================================================
   FRIENDS PAGE
   ================================================ */
.friends-page {
  min-height: 100vh;
  padding: 7rem 2rem 5rem;
  max-width: 1080px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease both;
}

.friends-header {
  text-align: center;
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.friends-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--accent-gold);
  text-shadow: 0 0 30px rgba(196, 158, 80, 0.5);
  letter-spacing: 0.35em;
  margin: 0.5rem 0 0.4rem;
  font-weight: 900;
}

.friends-subtitle {
  font-family: 'Crimson Text', serif;
  color: var(--text-secondary);
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin: 0 0 1.5rem;
  font-style: italic;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.friend-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem 1.5rem 1.8rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.friend-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.friend-card:hover::before {
  opacity: 1;
}

.friend-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(196, 158, 80, 0.15), 0 0 0 1px rgba(196, 158, 80, 0.4);
  border-color: rgba(196, 158, 80, 0.5);
}

.friend-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  object-fit: cover;
  background: var(--bg-card);
  box-shadow: 0 0 16px rgba(196, 158, 80, 0.25);
  transition: box-shadow 0.3s;
}

.friend-card:hover .friend-avatar {
  box-shadow: 0 0 24px rgba(196, 158, 80, 0.5);
}

.friend-avatar-placeholder {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.friend-name {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.friend-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  font-family: 'Crimson Text', serif;
}

.friends-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  font-family: 'Crimson Text', serif;
}

/* ================================================
   ADMIN — 友链管理
   ================================================ */
.admin-friend-add {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.admin-friends-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 340px;
  overflow-y: auto;
}

.admin-friend-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.admin-friend-item:hover {
  border-color: var(--accent-gold);
}

.admin-friend-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card);
}

.admin-friend-info {
  flex: 1;
  min-width: 0;
}

.admin-friend-info-name {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--accent-gold);
  letter-spacing: 0.06em;
}

.admin-friend-info-url {
  font-size: 0.7rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-friend-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.admin-friend-actions button {
  padding: 0.25rem 0.65rem;
  font-size: 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
}

.admin-friend-actions button:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.admin-friend-actions button.del:hover {
  border-color: #c0392b;
  color: #c0392b;
}/* ================================================
   HOME PAGE — 推荐卷轴区
   ================================================ */
.home-featured-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.home-row-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.home-row-title {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.home-row-ornament {
  color: var(--accent-gold);
  font-size: 0.7rem;
  opacity: 0.7;
}

.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

@media (max-width: 1100px) {
  .home-featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .home-featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .home-featured-grid {
    grid-template-columns: 1fr;
  }
}

/* 首页推荐卡片：精简版 post-card */
.fc-card {
  padding: 1.4rem !important;
}

.fc-cover-wrap {
  width: 100%;
  height: 110px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 0.6rem;
}

.fc-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.fc-card:hover .fc-cover {
  transform: scale(1.05);
}

/* 编年史底部地图区 */

.home-map-preview {
  margin-top: 0 !important;
}

/* 独立页面淡入 */
#archive-page,
#map-page {
  animation: fadeInUp 0.5s ease both;
}

/* ── Write Layout (飞书风格编辑器) ── */

/* 整体双栏布局 */
.write-layout {
  display: flex;
  gap: 0;
  align-items: flex-start;
  min-height: calc(100vh - 260px);
}

/* 左侧主编辑区 */
.write-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

/* 标题输入区 */
.write-title-area {
  padding: 1.8rem 2rem 1rem;
  border-bottom: 1px solid rgba(196,158,80,0.1);
}

.write-title-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  line-height: 1.3;
  padding: 0;
  box-sizing: border-box;
}

.write-title-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* 粘性工具栏 */
.write-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.2rem;
  border-bottom: 1px solid rgba(196,158,80,0.1);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.write-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.write-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* 工具栏格式化按钮 */
.wtb-btn {
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1;
  min-width: 28px;
  text-align: center;
}

.wtb-btn:hover {
  background: rgba(196,158,80,0.12);
  color: var(--accent-gold);
}

.wtb-img-btn {
  font-family: inherit;
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  letter-spacing: 0.03em;
}

.wtb-divider {
  width: 1px;
  height: 16px;
  background: var(--border-color);
  margin: 0 0.3rem;
  flex-shrink: 0;
}

/* 模式切换按钮（编写/预览） */
.write-mode-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.write-mode-btn.active {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-color: var(--accent-gold);
  font-weight: 600;
}

.write-mode-btn:hover:not(.active) {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* 编辑器容器 */
.md-editor-wrap {
  flex: 1;
  display: flex;
  min-height: calc(100vh - 360px);
}

.md-editor-wrap.mode-write .md-preview-pane { display: none; }
.md-editor-wrap.mode-preview .md-editor-pane { display: none; }

/* 编写区 */
.md-editor-pane {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  resize: none;
  padding: 1.5rem 2rem 2rem;
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--text-primary);
  background: transparent;
  outline: none;
  min-height: calc(100vh - 360px);
  box-sizing: border-box;
}

.md-editor-pane::placeholder {
  color: var(--text-muted);
  opacity: 0.45;
}

/* 预览区（复用正文样式） */
.md-preview-pane {
  flex: 1;
  padding: 1.5rem 2rem 2rem;
  overflow-y: auto;
  min-height: calc(100vh - 360px);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.md-preview-pane h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: var(--accent-gold);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(196,158,80,0.18);
}
.md-preview-pane h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--accent-gold);
  margin: 1.8rem 0 0.8rem;
  position: relative;
  padding-left: 1rem;
}
.md-preview-pane h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.1em;
  width: 2.5px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--accent-gold), transparent);
}
.md-preview-pane h3 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 1.5rem 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.md-preview-pane p { margin-bottom: 1rem; }
.md-preview-pane code {
  font-family: 'SF Mono', monospace;
  background: rgba(196,158,80,0.08);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent-gold-bright);
  border: 1px solid rgba(196,158,80,0.15);
}
.md-preview-pane pre {
  background: rgba(0,0,0,0.3);
  padding: 1.2rem 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid rgba(196,158,80,0.12);
  margin: 1.5rem 0;
}
.md-preview-pane pre code { background: none; padding: 0; border: none; font-size: 0.88rem; }
.md-preview-pane blockquote {
  border-left: 3px solid var(--accent-gold);
  margin: 1.5rem 0;
  padding: 0.8rem 1.2rem;
  background: rgba(196,158,80,0.05);
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
  font-style: italic;
}
.md-preview-pane a { color: var(--accent-gold); text-decoration: none; border-bottom: 1px solid rgba(196,158,80,0.3); }
.md-preview-pane img { max-width: 100%; border-radius: 8px; border: 1px solid var(--border-color); }
.md-preview-pane hr { border: none; border-top: 1px solid rgba(196,158,80,0.2); margin: 2rem 0; }
.md-preview-pane table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; }
.md-preview-pane th, .md-preview-pane td { border: 1px solid var(--border-color); padding: 0.5em 0.8em; font-size: 0.9rem; }
.md-preview-pane th { background: rgba(196,158,80,0.08); color: var(--accent-gold); font-family: 'Cinzel', serif; font-size: 0.75rem; letter-spacing: 0.08em; }
.md-preview-pane ul, .md-preview-pane ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.md-preview-pane li { margin-bottom: 0.3rem; }
.md-preview-pane strong { color: var(--text-primary); font-weight: 600; }

/* 底部操作栏 */
.write-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  border-top: 1px solid rgba(196,158,80,0.1);
  background: var(--bg-card);
  gap: 1rem;
  flex-wrap: wrap;
}

.write-footer-right {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

/* 右侧属性面板 */
.write-sidebar {
  width: 280px;
  flex-shrink: 0;
  margin-left: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
  transition: width 0.25s ease, opacity 0.25s ease;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.write-sidebar.collapsed {
  width: 40px;
  overflow: hidden;
}

.write-sidebar.collapsed .write-sidebar-body {
  display: none;
}

.write-sidebar.collapsed .write-sidebar-title {
  display: none;
}

.write-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(196,158,80,0.1);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}

.write-sidebar-title {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.write-sidebar-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.1rem 0.4rem;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.write-sidebar-toggle:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.write-sidebar.collapsed .write-sidebar-toggle {
  transform: rotate(180deg);
}

.write-sidebar-body {
  padding: 1rem;
}

.write-sidebar-body .form-group {
  margin-bottom: 1.2rem;
}

.write-sidebar-body .form-label {
  font-size: 0.65rem;
  margin-bottom: 0.4rem;
}

.write-sidebar-body .form-input,
.write-sidebar-body .form-select,
.write-sidebar-body .form-textarea {
  font-size: 0.82rem;
  padding: 0.45rem 0.7rem;
}

.form-hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
  letter-spacing: 0.05em;
}

/* 响应式：小屏变为上下布局 */
@media (max-width: 900px) {
  .write-layout {
    flex-direction: column;
  }
  .write-sidebar {
    width: 100%;
    margin-left: 0;
    margin-top: 1rem;
    position: static;
    max-height: none;
  }
  .write-sidebar.collapsed {
    width: 100%;
    height: 40px;
  }
  .md-editor-pane,
  .md-preview-pane,
  .md-editor-wrap {
    min-height: 320px;
  }
}

/* ================================================
   ABOUT PAGE
   ================================================ */

/* Hero */
.about-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 2rem 4rem;
}

.about-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%,
    rgba(201,168,76,0.12) 0%,
    rgba(201,168,76,0.04) 50%,
    transparent 70%);
  pointer-events: none;
}

.about-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
}

/* Avatar */
.about-avatar-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 2rem;
}

.about-avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  opacity: 0.5;
  animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.06); opacity: 0.2; }
}

.about-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--gold);
  display: block;
  transition: box-shadow 0.4s ease;
  box-shadow: 0 0 20px rgba(201,168,76,0.15);
}

.about-avatar:hover {
  box-shadow: 0 0 40px rgba(201,168,76,0.4), 0 0 80px rgba(201,168,76,0.15);
}

.about-avatar-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--gold);
  background: var(--card-bg);
}

.about-hero-name {
  font-family: 'Cinzel', 'Noto Serif SC', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

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

.about-hero-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.about-hero-subtitle {
  font-family: 'Crimson Text', 'Noto Serif SC', serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
  animation: fadeInUp 0.8s ease 0.6s both;
}

/* Scroll hint */
.about-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.about-scroll-arrow {
  display: block;
  color: var(--gold);
  font-size: 1.4rem;
  opacity: 0.5;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(8px); opacity: 0.9; }
}

/* Body */
.about-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Cards — 磨砂玻璃 + 滚动入场 */
.about-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(8px);
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

.about-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.about-card:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.about-card-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

/* Bio 区双列 */
.about-bio-wrap {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 700px) {
  .about-bio-wrap { grid-template-columns: 1fr; }
}

/* Tags */
.about-tags-wrap {
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

@media (max-width: 700px) {
  .about-tags-wrap { border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 1.5rem; }
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.about-tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--gold);
  border-radius: 2px;
  font-size: 0.75rem;
  color: var(--gold);
  font-family: 'Cinzel', 'Noto Serif SC', serif;
  letter-spacing: 0.05em;
  transition: all 0.25s ease;
  cursor: default;
  background: rgba(201,168,76,0.04);
}

.about-tag:hover {
  background: rgba(201,168,76,0.12);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(201,168,76,0.15);
}

/* Timeline */
@keyframes tlLineGrow {
  from { transform: translateX(-50%) scaleY(0); opacity: 0; }
  to   { transform: translateX(-50%) scaleY(1); opacity: 1; }
}
@keyframes tlDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.6), 0 0 8px rgba(201,168,76,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(201,168,76,0), 0 0 16px rgba(201,168,76,0.8); }
}
@keyframes tlDotAppear {
  from { transform: scale(0) translateX(0); opacity: 0; }
  to   { transform: scale(1) translateX(0); opacity: 1; }
}
@keyframes tlFlow {
  0%   { top: 0%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.about-timeline {
  position: relative;
  padding: 1rem 0;
}

/* 主轴线 - 生长动画 */
.about-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 15%, var(--gold) 85%, transparent);
  opacity: 0;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  transition: none;
}
.about-timeline.tl-line-visible::before {
  animation: tlLineGrow 1.2s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* 流光粒子 */
.about-timeline::after {
  content: '';
  position: absolute;
  left: calc(50% - 2px);
  top: 0;
  width: 4px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(201,168,76,0.9), transparent);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
}
.about-timeline.tl-line-visible::after {
  animation: tlFlow 3s ease-in-out 0.8s infinite;
}

.about-tl-item {
  display: flex;
  align-items: flex-start;
  width: 50%;
  padding: 0 2.5rem 2.5rem;
  position: relative;
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1), transform 0.65s cubic-bezier(0.4,0,0.2,1);
}

.about-tl-item.right {
  left: 50%;
  transform: translateX(40px);
}

.about-tl-item.revealed {
  opacity: 1;
  transform: translateX(0) !important;
}

/* 圆点 - 出现动画 + 持续脉冲 */
.about-tl-dot {
  position: absolute;
  top: 6px;
  right: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px rgba(201,168,76,0.5);
  z-index: 1;
  opacity: 0;
  transform: scale(0);
  transition: none;
}
.about-tl-item.revealed .about-tl-dot {
  animation: tlDotAppear 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.3s forwards,
             tlDotPulse 2.4s ease-in-out 0.8s infinite;
}

.about-tl-item.right .about-tl-dot {
  right: auto;
  left: -5px;
}

/* 连接横线 */
.about-tl-item::after {
  content: '';
  position: absolute;
  top: 10px;
  right: -2.5rem;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
  opacity: 0.35;
  transition: width 0.5s ease 0.35s;
}
.about-tl-item.right::after {
  right: auto;
  left: -2.5rem;
  background: linear-gradient(to left, var(--gold), transparent);
}
.about-tl-item.revealed::after {
  width: 2.5rem;
}

.about-tl-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem 1.2rem;
  width: 100%;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.about-tl-card:hover {
  box-shadow: 0 4px 24px rgba(201,168,76,0.18);
  border-color: rgba(201,168,76,0.35);
  transform: translateY(-2px);
}

.about-tl-date {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.about-tl-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.about-tl-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.about-tl-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem;
}

@media (max-width: 700px) {
  .about-timeline::before { left: 16px; }
  .about-timeline::after  { left: 14px; }
  .about-tl-item {
    width: 100%;
    left: 0 !important;
    padding-left: 3rem;
    padding-right: 0;
    transform: translateX(-20px);
  }
  .about-tl-item::after { display: none; }
  .about-tl-dot { right: auto; left: 11px !important; }
}

/* Admin Timeline */
.admin-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.admin-tl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: rgba(201,168,76,0.04);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.6rem 0.8rem;
}

.admin-tl-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  align-items: center;
  font-size: 0.8rem;
}

.admin-tl-date {
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
}

.admin-tl-title {
  color: var(--text-primary);
  font-weight: 600;
}

.admin-tl-desc {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.btn-icon-del {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-icon-del:hover {
  border-color: #8b3a3a;
  color: #c0564a;
  background: rgba(139,58,58,0.1);
}

/* fadeInUp 动画（多处复用） */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================
   SKILLS PAGE — 技艺树
   ================================================ */

/* ─── 生长动画 keyframes ─── */
@keyframes trunkGrow {
  from { stroke-dashoffset: 9999; }
  to   { stroke-dashoffset: 0; }
}
@keyframes branchGrow {
  from { stroke-dashoffset: 600; opacity: 0; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes nodePopIn {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  70%  { transform: translate(-50%, -50%) scale(1.12); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes masteredPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(240,192,96,0.5), 0 0 0 0 rgba(240,192,96,0.25); }
  50%       { box-shadow: 0 0 20px rgba(240,192,96,0.8), 0 0 0 8px rgba(240,192,96,0); }
}
@keyframes learningBreathe {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 0.85; }
}
@keyframes rippleOut {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}
@keyframes trunkPathDraw {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}

/* ─── Hero ─── */
.skills-hero {
  text-align: center;
  padding: 5rem 2rem 2rem;
  position: relative;
}
.skills-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--accent-gold-bright);
  letter-spacing: 0.25em;
  text-shadow: 0 0 40px rgba(240,192,96,0.4);
  margin: 0.5rem 0;
}
.skills-hero-subtitle {
  font-family: 'Crimson Text', serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  font-style: italic;
  margin-bottom: 1.5rem;
}

/* ─── 图例 ─── */
.skills-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0 auto 1rem;
  padding: 0.6rem 2rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.mastered { background: #f0c060; box-shadow: 0 0 8px rgba(240,192,96,0.8); }
.legend-dot.skilled  { background: rgba(196,158,80,0.5); border: 1.5px solid #c49e50; }
.legend-dot.learning { background: transparent; border: 1.5px dashed rgba(168,144,96,0.5); }

/* ─── 树容器 ─── */
.skills-tree-container {
  position: relative;
  min-height: 600px;
  overflow: visible;
  /* transform-origin 由 JS 动态设置，用于缩放中心 */
  transform-origin: top center;
  transition: transform 0.3s cubic-bezier(0.34,1.2,0.64,1);
}

/* wrapper：禁止横向滚动，只允许纵向 */
.skills-tree-wrapper {
  width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

#skills-page {
  overflow-x: hidden;
  overflow-y: visible;
}

/* ─── 缩放工具按钮组 ─── */
/* ── 技艺树缩放工具栏 ── */
.skills-zoom-toolbar {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: translateX(12px);
}
.skills-zoom-toolbar.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}
/* 整体卡片容器 */
.skills-zoom-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: rgba(14, 12, 8, 0.82);
  border: 1px solid rgba(196,158,80,0.35);
  border-radius: 28px;
  padding: 6px;
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.55),
    0 0 0 1px rgba(240,192,96,0.08) inset,
    0 1px 0 rgba(240,192,96,0.18) inset;
}
/* 分隔线 */
.zoom-divider {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,158,80,0.3), transparent);
  margin: 2px 0;
}
.skill-zoom-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(196,158,80,0.75);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s, transform 0.18s;
  user-select: none;
  position: relative;
}
.skill-zoom-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skill-zoom-btn:hover {
  color: #f0c060;
  background: rgba(196,158,80,0.1);
  transform: scale(1.12);
}
.skill-zoom-btn.active {
  color: #f0c060;
  background: rgba(196,158,80,0.18);
  box-shadow: 0 0 12px rgba(240,192,96,0.4) inset;
}
.skill-zoom-btn.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(240,192,96,0.6);
  animation: zoomBtnPulse 1.8s ease-in-out infinite;
}
@keyframes zoomBtnPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 0.2; transform: scale(1.3); }
}
/* 悬浮 tooltip */
.skill-zoom-btn[title]:hover::before {
  content: attr(title);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: rgba(14,12,8,0.9);
  color: #c49e50;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(196,158,80,0.25);
  pointer-events: none;
  font-family: var(--font-body, serif);
}
/* 工具激活时树区域cursor */
.skills-tree-wrapper.cursor-zoom-in  { cursor: zoom-in; }
.skills-tree-wrapper.cursor-zoom-out { cursor: zoom-out; }

.skills-tree-svg {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
}

.tree-trunk-path {
  /* stroke-dasharray/offset 由 JS 按实际路径长度动态设置 */
  animation: trunkGrow 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.2s;
}

.tree-branch-path {
  /* stroke-dasharray/offset 由 JS 按实际路径长度动态设置 */
  animation: branchGrow 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ─── 节点层 ─── */
.skills-nodes-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  pointer-events: none;
}

/* ─── 节点基础样式 ─── */
.skill-node {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
  opacity: 0;
  animation: nodePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  user-select: none;
}

.skill-node-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 50px;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Root 节点 */
.skill-node-root .skill-node-inner {
  background: linear-gradient(135deg, rgba(240,192,96,0.2), rgba(196,158,80,0.08));
  border: 1.5px solid rgba(240,192,96,0.7);
  color: var(--accent-gold-bright);
  font-size: 0.85rem;
  padding: 0.6rem 1.3rem;
  box-shadow: 0 0 20px rgba(240,192,96,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.skill-node-root .skill-node-icon {
  font-size: 1rem;
  animation: crownFloat 3s ease-in-out infinite;
}

/* Branch 节点 */
.skill-node-branch .skill-node-inner {
  background: linear-gradient(135deg, rgba(196,158,80,0.15), rgba(120,80,20,0.08));
  border: 1px solid rgba(196,158,80,0.45);
  color: var(--text-primary);
  font-size: 0.75rem;
  padding: 0.4rem 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* Leaf 节点 - 三态 精美菱形标记设计 */
.skill-node-leaf .skill-node-inner {
  font-size: 0.68rem;
  padding: 0.3rem 0.75rem 0.3rem 0.5rem;
  border-radius: 4px;
  gap: 0.4rem;
}

/* 状态图标 - 精美菱形/星形 */
.skill-node-leaf .skill-node-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  font-size: 0.75rem;
  line-height: 1;
}

/* 精通：金色实心 + 强光晕 */
.skill-node-leaf.status-mastered .skill-node-inner {
  background: linear-gradient(135deg, rgba(240,192,96,0.22), rgba(160,110,20,0.1));
  border: 1px solid rgba(240,192,96,0.9);
  border-left: 3px solid rgba(240,192,96,1);
  color: #f5d47a;
  box-shadow: 0 0 14px rgba(240,192,96,0.4), inset 0 1px 0 rgba(255,230,120,0.2);
  animation: masteredPulse 2.5s ease-in-out infinite;
  border-radius: 0 4px 4px 0;
}
.skill-node-leaf.status-mastered .skill-node-status-icon {
  color: #f0c060;
  text-shadow: 0 0 8px rgba(240,192,96,0.9);
}

/* 熟练：半金 + 细边框 */
.skill-node-leaf.status-skilled .skill-node-inner {
  background: linear-gradient(135deg, rgba(196,158,80,0.12), rgba(100,70,10,0.06));
  border: 1px solid rgba(196,158,80,0.55);
  border-left: 2px solid rgba(196,158,80,0.8);
  color: #d4ae6a;
  box-shadow: 0 0 7px rgba(196,158,80,0.2), inset 0 1px 0 rgba(255,200,80,0.08);
  border-radius: 0 4px 4px 0;
}
.skill-node-leaf.status-skilled .skill-node-status-icon { color: #c49e50; }

/* 学习中：灰白虚线 + 呼吸 */
.skill-node-leaf.status-learning .skill-node-inner {
  background: rgba(80,70,50,0.07);
  border: 1px dashed rgba(140,120,80,0.38);
  border-left: 2px dashed rgba(140,120,80,0.55);
  color: rgba(160,148,120,0.75);
  animation: learningBreathe 3s ease-in-out infinite;
  border-radius: 0 4px 4px 0;
}
.skill-node-leaf.status-learning .skill-node-status-icon {
  color: rgba(140,120,80,0.55);
  animation: learningBreathe 3s ease-in-out infinite;
}

/* Hover 效果 */
.skill-node:hover .skill-node-inner {
  transform: scale(1.15);
  box-shadow: 0 0 24px rgba(240,192,96,0.5), 0 4px 20px rgba(0,0,0,0.3);
}
.skill-node-leaf.status-mastered:hover .skill-node-inner {
  box-shadow: 0 0 30px rgba(240,192,96,0.75), 0 4px 20px rgba(0,0,0,0.3);
}

/* 涟漪 */
.skill-ripple {
  position: absolute;
  top: 50%; left: 50%;
  width: 60px; height: 60px;
  margin-left: -30px; margin-top: -30px;
  border-radius: 50%;
  border: 1.5px solid rgba(240,192,96,0.6);
  pointer-events: none;
  animation: rippleOut 0.9s ease-out forwards;
  z-index: 0;
}

/* ─── 技能详情面板 ─── */
.skill-detail-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1900;
  display: none;
  backdrop-filter: blur(2px);
}

.skill-detail-panel {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  width: min(380px, 90vw);
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  padding: 2rem 1.5rem;
}
.skill-detail-panel.open {
  transform: translateX(0);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}

.skill-detail-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 28px; height: 28px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.skill-detail-close:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.skill-detail-header { margin-bottom: 1.5rem; }

.skill-detail-status {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.8rem;
}
.skill-detail-status.status-mastered {
  background: rgba(240,192,96,0.15);
  border: 1px solid rgba(240,192,96,0.6);
  color: #f0c060;
}
.skill-detail-status.status-skilled {
  background: rgba(196,158,80,0.1);
  border: 1px solid rgba(196,158,80,0.4);
  color: var(--accent-gold);
}
.skill-detail-status.status-learning {
  background: rgba(120,100,60,0.08);
  border: 1px dashed rgba(168,144,96,0.4);
  color: var(--text-muted);
}

.skill-detail-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold-bright);
  margin-bottom: 0.5rem;
}

.skill-detail-desc {
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
}

.skill-detail-posts { margin-top: 1.5rem; }
.skill-detail-posts-title {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.skill-detail-post-item {
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-glass);
}
.skill-detail-post-item:hover {
  border-color: var(--accent-gold);
  background: rgba(196,158,80,0.08);
  transform: translateX(4px);
}
.skill-detail-post-title {
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.skill-detail-post-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
}

.skill-detail-no-posts {
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 1.5rem;
}

/* ================================================
   ADMIN — 技艺树后台
   ================================================ */

.skills-admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 700px) {
  .skills-admin-layout { grid-template-columns: 1fr; }
}

.skills-admin-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
}

/* 左侧树编辑器 */
.skills-tree-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ste-branch {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-glass);
}
.ste-branch-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--text-primary);
}
.ste-branch-header:hover, .ste-branch-header.selected {
  background: rgba(196,158,80,0.1);
  color: var(--accent-gold-bright);
}
.ste-branch-icon { color: var(--accent-gold); font-size: 0.9rem; }
.ste-branch-label { flex: 1; }
.ste-side-badge {
  font-size: 0.65rem;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.ste-del-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0.2rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}
.ste-del-btn:hover { color: #c0392b; background: rgba(192,57,43,0.1); }

.ste-children {
  padding: 0.3rem 0.8rem 0.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.ste-leaf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--text-secondary);
  transition: background 0.2s;
}
.ste-leaf:hover, .ste-leaf.selected {
  background: rgba(196,158,80,0.1);
  color: var(--text-primary);
}
.ste-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ste-status-dot.status-mastered { background: #f0c060; box-shadow: 0 0 5px rgba(240,192,96,0.7); }
.ste-status-dot.status-skilled  { background: rgba(196,158,80,0.5); border: 1px solid #c49e50; }
.ste-status-dot.status-learning { background: transparent; border: 1.5px dashed rgba(168,144,96,0.5); }
.ste-leaf-label { flex: 1; }

.ste-add-leaf {
  background: none;
  border: 1px dashed rgba(196,158,80,0.3);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  margin-top: 0.2rem;
}
.ste-add-leaf:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* 右侧节点编辑 */
.skills-node-editor {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  background: var(--bg-glass);
  min-height: 200px;
}

/* 状态选择器 */
.status-selector {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.status-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-family: 'Cinzel', serif;
  cursor: pointer;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.2s;
}
.status-option .status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-option.status-mastered .status-dot { background: #f0c060; }
.status-option.status-skilled  .status-dot { background: rgba(196,158,80,0.6); }
.status-option.status-learning .status-dot { background: transparent; border: 1.5px dashed rgba(168,144,96,0.5); }

.status-option.status-mastered.active,
.status-option.status-mastered:hover {
  background: rgba(240,192,96,0.15);
  border-color: rgba(240,192,96,0.7);
  color: #f0c060;
}
.status-option.status-skilled.active,
.status-option.status-skilled:hover {
  background: rgba(196,158,80,0.12);
  border-color: rgba(196,158,80,0.5);
  color: var(--accent-gold);
}
.status-option.status-learning.active,
.status-option.status-learning:hover {
  background: rgba(120,100,60,0.1);
  border-color: rgba(168,144,96,0.4);
  color: var(--text-secondary);
}

.ste-leaf-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.ste-leaf-header:hover, .ste-leaf-header.selected {
  background: rgba(196,158,80,0.08);
  color: var(--accent-gold);
}

/* ============================================
   P0 Features — Search / Tags / TOC / Progress
   ============================================ */

/* -- Search Button in Nav -- */
.nav-search-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.nav-search-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold-bright);
  box-shadow: var(--shadow-gold);
  transform: scale(1.05);
}

/* -- Search Overlay -- */
.search-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  opacity: 0; transition: opacity 0.3s ease;
}
.search-overlay.active { display: flex; opacity: 1; }
.search-overlay-backdrop {
  position: absolute; inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.search-dialog {
  position: relative; width: 90%; max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-deep), 0 0 60px rgba(196,158,80,0.15);
  overflow: hidden;
  animation: searchDialogIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes searchDialogIn {
  from { transform: translateY(-20px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.search-header {
  display: flex; align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  gap: 0.8rem;
}
.search-icon-wrap { font-size: 1.2rem; opacity: 0.6; flex-shrink: 0; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary);
  font-family: inherit; font-size: 1.05rem; line-height: 1.6;
}
.search-input::placeholder { color: var(--text-muted); font-style: italic; }
.search-shortcut {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem; color: var(--text-muted);
  font-family: 'Cinzel', serif;
  cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.search-shortcut:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.search-results {
  max-height: 55vh; overflow-y: auto; padding: 0.5rem;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
.search-empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.search-empty-icon { font-size: 2.5rem; margin-bottom: 0.8rem; opacity: 0.5; }
.search-empty-state p { font-family: 'Cinzel', serif; font-size: 1rem; letter-spacing: 0.1em; }
.search-empty-hint { font-family: 'Crimson Text', serif !important; font-size: 0.8rem !important; letter-spacing: 0 !important; margin-top: 0.3rem; opacity: 0.6; }
.search-result-item {
  padding: 0.9rem 1rem; border-radius: 10px; cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent; margin-bottom: 0.3rem;
}
.search-result-item:hover {
  background: var(--bg-glass);
  border-color: var(--border-color);
  transform: translateX(4px);
}
.search-result-title {
  font-family: 'Cinzel', serif; font-size: 0.95rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 0.3rem;
}
.search-result-title .highlight,
.search-result-snippet .highlight {
  color: var(--accent-gold-bright);
  background: rgba(196,158,80,0.15);
  border-radius: 2px; padding: 0 2px;
}
.search-result-snippet .highlight { font-weight: 600; }
.search-result-meta {
  display: flex; gap: 0.8rem;
  font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.3rem;
}
.search-result-snippet {
  font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search-result-count {
  text-align: center; padding: 0.6rem;
  font-size: 0.75rem; color: var(--text-muted); font-style: italic;
}
.search-no-result { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.search-no-result-icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.4; }

/* -- Tag Cloud (archive section removed, keeping items for home hot tags) -- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.tag-cloud-item {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-color); border-radius: 20px;
  cursor: pointer; transition: all 0.3s ease;
  font-size: 0.8rem; color: var(--text-secondary);
  background: var(--bg-glass); white-space: nowrap;
}
.tag-cloud-item:hover, .tag-cloud-item.active {
  border-color: var(--accent-gold);
  color: var(--accent-gold-bright);
  background: rgba(196,158,80,0.1);
  box-shadow: 0 0 12px rgba(196,158,80,0.2);
  transform: translateY(-2px);
}
.tag-cloud-item .tag-count { font-size: 0.65rem; opacity: 0.5; font-style: italic; }

/* ── ✦ Stardust Constellation Word Cloud ── */
.stardust-section {
  position: relative;
  margin-bottom: 2rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 12px;
  overflow: hidden;
}
.stardust-header {
  text-align: center;
  padding: 1.2rem 0 0.6rem;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}
.stardust-header span {
  margin: 0 0.5rem;
}
.stardust-canvas-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  cursor: default;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(196,158,80,0.03) 0%, transparent 70%);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
[data-theme="light"] .stardust-canvas-wrap {
  background: radial-gradient(ellipse at center, rgba(120,80,20,0.03) 0%, transparent 70%);
}
.stardust-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.stardust-tooltip {
  position: absolute;
  pointer-events: none;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  font-family: 'Crimson Text', serif;
  font-size: 0.8rem;
  color: var(--accent-gold-bright);
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 0 12px rgba(196,158,80,0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stardust-tooltip.visible {
  opacity: 1;
}
.stardust-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.6rem 0 1rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Crimson Text', serif;
}
.stardust-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.stardust-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.stardust-legend-dot.star { background: var(--accent-gold-bright); box-shadow: 0 0 6px rgba(240,192,96,0.5); }
.stardust-legend-dot.planet { background: var(--accent-silver); box-shadow: 0 0 4px rgba(168,184,200,0.4); }
.stardust-legend-dot.dust { background: var(--text-muted); opacity: 0.5; }
@media (max-width: 768px) {
  .stardust-canvas-wrap { height: 220px; }
  .stardust-legend { gap: 1rem; font-size: 0.65rem; }
}

/* -- Reading Progress Bar -- */
.reading-progress-bar {
  position: fixed; top: 64px; left: 0; right: 0;
  height: 3px; z-index: 999;
  background: transparent; pointer-events: none;
  opacity: 0; transition: opacity 0.3s ease;
}
.reading-progress-bar.visible { opacity: 1; }
.reading-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-bright), #ffd700);
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(196,158,80,0.6), 0 0 20px rgba(196,158,80,0.3);
  position: relative;
}
.reading-progress-fill::after {
  content: ''; position: absolute;
  right: 0; top: -2px; bottom: -2px; width: 6px;
  background: var(--accent-gold-bright); border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-gold-bright);
}

/* -- Float Action Buttons -- */
.float-actions {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 900;
  display: flex; flex-direction: column; gap: 0.8rem; align-items: center;
}
.float-btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary); font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: var(--shadow-deep);
  opacity: 0; transform: translateY(20px) scale(0.8); pointer-events: none;
}
.float-btn.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.float-btn:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-gold), var(--shadow-deep);
  transform: translateY(-3px) scale(1.1);
}
.float-btn:active { transform: scale(0.95); }
.float-btn-random:hover { animation: diceShake 0.4s ease; }
@keyframes diceShake {
  0%, 100% { transform: translateY(-3px) scale(1.1) rotate(0deg); }
  25% { transform: translateY(-3px) scale(1.1) rotate(-15deg); }
  75% { transform: translateY(-3px) scale(1.1) rotate(15deg); }
}

/* -- TOC Sidebar -- */
.toc-sidebar {
  position: fixed; top: 80px; right: -280px;
  width: 260px; max-height: calc(100vh - 100px);
  background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 12px;
  padding: 1rem 0; z-index: 800;
  overflow-y: auto;
  transition: right 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
  box-shadow: var(--shadow-deep);
}
.toc-sidebar.visible { right: 1.5rem; box-shadow: var(--shadow-deep), 0 0 40px rgba(196,158,80,0.1); }
.toc-sidebar::-webkit-scrollbar { width: 3px; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
.toc-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0 1rem 0.8rem;
  border-bottom: 1px solid var(--border-color); margin-bottom: 0.5rem;
}
.toc-icon { font-size: 0.9rem; }
.toc-title { font-family: 'Cinzel', serif; font-size: 0.8rem; color: var(--text-secondary); letter-spacing: 0.1em; }
.toc-list { padding: 0 0.5rem; }
.toc-item {
  display: block; padding: 0.35rem 0.6rem;
  font-size: 0.78rem; color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  cursor: pointer; transition: all 0.25s ease;
  line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toc-item:hover { color: var(--text-primary); background: var(--bg-glass); border-left-color: var(--border-color); }
.toc-item.active {
  color: var(--accent-gold-bright); border-left-color: var(--accent-gold);
  background: rgba(196,158,80,0.08); font-weight: 600;
}
.toc-item.toc-h2 { padding-left: 1rem; }
.toc-item.toc-h3 { padding-left: 1.8rem; font-size: 0.73rem; }
.toc-toggle-btn {
  display: none; position: fixed; bottom: 6.5rem; right: 2rem;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border-color); background: var(--bg-card);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary); font-size: 1.1rem;
  cursor: pointer; z-index: 801;
  align-items: center; justify-content: center;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: var(--shadow-deep);
}
.toc-toggle-btn.visible { display: flex; }
.toc-toggle-btn:hover { border-color: var(--accent-gold); box-shadow: var(--shadow-gold); transform: scale(1.1); }

/* -- Page Transitions -- */
@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: pageSlideIn 0.5s cubic-bezier(0.22,1,0.36,1) forwards; }
.scroll-reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }

/* -- Responsive -- */
@media (max-width: 1100px) {
  .toc-sidebar.visible { right: -280px; }
  .toc-sidebar.visible.mobile-open { right: 1rem; }
  .toc-toggle-btn.visible { display: flex; }
}
@media (min-width: 1101px) {
  .toc-toggle-btn { display: none !important; }
  .toc-sidebar.visible { right: 1.5rem; }
}
@media (max-width: 640px) {
  .search-dialog { width: 95%; border-radius: 12px; }
  .search-overlay { padding-top: 6vh; }
  .float-actions { bottom: 1.2rem; right: 1.2rem; }
  .float-btn { width: 42px; height: 42px; font-size: 1rem; }
  .toc-toggle-btn { bottom: 5.5rem; right: 1.2rem; width: 42px; height: 42px; }
}


/* ════════════════════════════════════════════════
   ✍ 手写动画「字迹」· Calligraphy Reveal
   ════════════════════════════════════════════════ */

/* 标题包裹层，用于定位笔锋 */
/* 手写动画「字迹」包裹层 */
.hero-title-wrap {
  position: relative;
  display: inline-block;
  overflow: visible;
}

/* 笔锋光标：跟随揭示进度从左扫到右 */
.hero-title-pen {
  position: absolute;
  top: 5%;
  bottom: 5%;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(240, 192, 96, 0.9) 30%,
    #f5d070 50%,
    rgba(240, 192, 96, 0.9) 70%,
    transparent 100%
  );
  box-shadow:
    0 0 8px 2px rgba(240, 192, 96, 0.7),
    0 0 20px 6px rgba(240, 192, 96, 0.3),
    0 0 40px 12px rgba(240, 192, 96, 0.1);
  opacity: 0;
  animation: penMove 1.6s 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
  z-index: 2;
}

@keyframes penMove {
  0% {
    left: 0%;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  95% {
    left: 100%;
    opacity: 0;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* 白天主题笔锋色调调暗一点 */
[data-theme="light"] .hero-title-pen {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(160, 110, 30, 0.9) 30%,
    #b8820a 50%,
    rgba(160, 110, 30, 0.9) 70%,
    transparent 100%
  );
  box-shadow:
    0 0 8px 2px rgba(160, 110, 30, 0.6),
    0 0 20px 6px rgba(160, 110, 30, 0.25),
    0 0 40px 12px rgba(160, 110, 30, 0.08);
}

/* 副标题：逐字符浮现（由 JS 拆分 span 后触发） */
.hero-subtitle {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.hero-subtitle .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  animation: charReveal 0.4s ease forwards;
}

/* 空格字符保持宽度 */
.hero-subtitle .char-space {
  display: inline-block;
  opacity: 0;
  animation: charReveal 0.4s ease forwards;
  width: 0.28em;
}

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

/* ================================================
   TYPEWRITER WELCOME
   ================================================ */
.hero-typewriter {
  margin-top: 1rem;
  min-height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.typewriter-text {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.typewriter-cursor {
  font-weight: 100;
  font-size: 1.2rem;
  color: var(--gold);
  animation: tw-blink 0.7s steps(1) infinite;
}
@keyframes tw-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ================================================
   DAILY POEM (晨间喻言)
   ================================================ */
.hero-poem {
  margin-top: 1rem;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 1s 1.5s forwards;
}
.poem-content {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 0.95rem;
  color: var(--text-secondary, #b0a080);
  letter-spacing: 0.08em;
  line-height: 1.8;
  font-style: italic;
}
.poem-info {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================
   404 PAGE — LOST REALM
   ================================================ */
.lost-realm {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.fog {
  position: absolute;
  width: 200%;
  height: 200%;
  opacity: 0.06;
  background: radial-gradient(ellipse at center, var(--gold) 0%, transparent 70%);
  animation: fog-drift 20s ease-in-out infinite;
  pointer-events: none;
}
.fog-1 { top: -50%; left: -50%; animation-duration: 25s; }
.fog-2 { top: -30%; left: -30%; animation-duration: 18s; animation-delay: -5s; opacity: 0.04; }
.fog-3 { top: -60%; left: -20%; animation-duration: 30s; animation-delay: -10s; opacity: 0.03; }
@keyframes fog-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(5%, 3%) rotate(1deg); }
  50% { transform: translate(-3%, 5%) rotate(-1deg); }
  75% { transform: translate(3%, -3%) rotate(0.5deg); }
}
.lost-content {
  text-align: center;
  z-index: 2;
  padding: 2rem;
}
.lost-code {
  font-size: 8rem;
  font-weight: 700;
  font-family: var(--font-serif, Georgia, serif);
  background: linear-gradient(135deg, var(--gold) 0%, #8b6914 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: none;
  opacity: 0.9;
}
.lost-title {
  font-size: 2rem;
  font-family: var(--font-serif, Georgia, serif);
  color: var(--text-primary);
  letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
}
.lost-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.lost-quote {
  font-style: italic;
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  opacity: 0.8;
}
.lost-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.lost-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem !important;
  font-size: 0.9rem !important;
}

/* ================================================
   RELATED POSTS — 卷轴索引
   ================================================ */
.related-posts-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related-header {
  text-align: center;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}
.related-ornament {
  color: var(--gold);
  font-size: 0.9rem;
}
.related-title {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}
.related-grid {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: nowrap;
}
.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex: 0 1 280px;
  max-width: 320px;
  min-width: 0;
}
.related-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.related-card-cover {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}
.related-card-no-cover {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  margin-bottom: 0.8rem;
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(201,168,76,0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.4;
}
.related-card-title {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* ================================================
   COMMENTS — 来访者手记
   ================================================ */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.comments-header {
  text-align: center;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}
.comments-ornament {
  color: var(--gold);
  font-size: 1rem;
}
.comments-title {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}
.comment-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}
.comment-form-row {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.comment-input {
  flex: 1;
  min-width: 120px;
  background: var(--bg-secondary, rgba(0,0,0,0.2));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}
.comment-input:focus {
  border-color: var(--gold);
}
.comment-riddle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
}
.riddle-label {
  font-size: 0.8rem;
  color: var(--gold);
  white-space: nowrap;
}
.comment-riddle-input {
  max-width: 80px;
  text-align: center;
}
.comment-textarea {
  width: 100%;
  min-height: 100px;
  background: var(--bg-secondary, rgba(0,0,0,0.2));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.3s;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}
.comment-textarea:focus {
  border-color: var(--gold);
}
.comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.comment-char-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.comment-submit-btn {
  font-size: 0.85rem !important;
  padding: 0.5rem 1.2rem !important;
}

/* Comment items */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.comment-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  transition: border-color 0.3s;
}
.comment-item:hover {
  border-color: rgba(201,168,76,0.3);
}
.comment-item-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, #8b6914 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #1a1a2e;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-author-tag {
  background: var(--gold);
  color: #1a1a2e;
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.comment-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.comment-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}
.comment-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 2.6rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.comment-actions {
  padding-left: 2.6rem;
  margin-top: 0.5rem;
  display: flex;
  gap: 0.8rem;
}
.comment-action-btn {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0;
  transition: color 0.3s;
}
.comment-action-btn:hover {
  color: var(--gold);
}

/* Comment replies */
.comment-replies {
  margin-top: 0.8rem;
  padding-left: 2.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.comment-reply {
  background: rgba(201,168,76,0.05);
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 0.6rem 0.8rem;
}
.comment-reply .comment-item-header {
  margin-bottom: 0.3rem;
}
.comment-reply .comment-avatar {
  width: 26px;
  height: 26px;
  font-size: 0.7rem;
}
.comment-reply .comment-body {
  padding-left: 2rem;
  font-size: 0.83rem;
}
.comment-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem;
  font-style: italic;
}

/* Reply form inline */
.reply-form-inline {
  margin-top: 0.5rem;
  padding-left: 2.6rem;
  display: flex;
  gap: 0.5rem;
}
.reply-form-inline input {
  flex: 1;
  background: var(--bg-secondary, rgba(0,0,0,0.2));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
}
.reply-form-inline input:focus {
  border-color: var(--gold);
}
.reply-form-inline button {
  font-size: 0.75rem !important;
  padding: 0.4rem 0.8rem !important;
  white-space: nowrap;
}

/* Mobile responsive for comments */
@media (max-width: 768px) {
  .comment-form-row { flex-direction: column; }
  .comment-riddle { min-width: 100%; }
  .comment-body { padding-left: 0; }
  .comment-actions { padding-left: 0; }
  .comment-replies { padding-left: 1rem; }
  .reply-form-inline { padding-left: 0; flex-direction: column; }
  .related-grid { flex-wrap: wrap; }
  .related-card { flex: 0 1 100%; max-width: 100%; }
}

/* ============================================
   Fortune Cards — 命运翻牌 · 星座抽卡
   ============================================ */
.fortune-overlay {
  position: fixed; inset: 0; z-index: 10001;
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.4s ease;
}
.fortune-overlay.active { display: flex; opacity: 1; }
.fortune-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.fortune-container {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 2.5rem; padding: 2rem;
  animation: fortuneContainerIn 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes fortuneContainerIn {
  from { transform: scale(0.85) translateY(30px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* 标题 */
.fortune-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--accent-gold-bright);
  text-shadow: 0 0 30px rgba(240, 192, 96, 0.5);
  letter-spacing: 0.15em;
  text-align: center;
}
.fortune-subtitle {
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  letter-spacing: 0.1em;
}

/* 卡牌容器 */
.fortune-cards {
  display: flex;
  gap: 1.2rem;
  perspective: 1200px;
}

/* 单张卡牌 */
.fortune-card {
  width: 160px; height: 240px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cardFloat 3s ease-in-out infinite;
}
.fortune-card:nth-child(1) { animation-delay: 0s; }
.fortune-card:nth-child(2) { animation-delay: 0.3s; }
.fortune-card:nth-child(3) { animation-delay: 0.6s; }
.fortune-card:nth-child(4) { animation-delay: 0.9s; }
.fortune-card:nth-child(5) { animation-delay: 1.2s; }

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

.fortune-card:hover {
  animation: none;
  transform: translateY(-15px) scale(1.05);
}
.fortune-card:hover .card-back {
  box-shadow: 0 0 40px rgba(196, 158, 80, 0.6), 0 10px 40px rgba(0,0,0,0.5);
}

.fortune-card.flipped {
  animation: none;
  transform: rotateY(180deg);
}
.fortune-card.flipped:hover {
  transform: rotateY(180deg) translateY(-5px);
}
.fortune-card.not-chosen {
  animation: none;
  opacity: 0.3;
  transform: scale(0.9);
  pointer-events: none;
  transition: all 0.5s ease;
}

/* 卡牌正反面共用 */
.card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
}

/* --- 卡牌背面 --- */
.card-back {
  background: linear-gradient(145deg, #1a1510 0%, #0d0a06 50%, #1a1510 100%);
  border: 2px solid var(--accent-gold);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  box-shadow: 0 0 20px rgba(196, 158, 80, 0.3), 0 8px 32px rgba(0,0,0,0.6);
  transition: box-shadow 0.3s ease;
}
.card-back::before {
  content: '';
  position: absolute; inset: 6px;
  border: 1px solid rgba(196, 158, 80, 0.3);
  border-radius: 10px;
}
.card-back::after {
  content: '';
  position: absolute; inset: 12px;
  border: 1px solid rgba(196, 158, 80, 0.15);
  border-radius: 8px;
}
.card-back-emblem {
  font-size: 2.4rem;
  filter: drop-shadow(0 0 10px rgba(196, 158, 80, 0.5));
  z-index: 1;
}
.card-back-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(196,158,80,0.08) 1px, transparent 1px),
    radial-gradient(circle at 80% 80%, rgba(196,158,80,0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(196,158,80,0.05) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 10px 10px;
}

/* --- 卡牌正面（星座风格） --- */
.card-front {
  transform: rotateY(180deg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 0.6rem 0.6rem 0.4rem;
  position: relative;
  gap: 0;
}

/* 星座光环背景 */
.card-front::before {
  content: '';
  position: absolute;
  top: 15%; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0.3;
  z-index: 0;
}

/* 星座内边框 */
.card-front::after {
  content: '';
  position: absolute; inset: 6px;
  border-radius: 10px;
  z-index: 0;
}

/* ---- Tarot Card Face · Apple风格 ---- */
.card-tarot-num {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  opacity: 0.5;
  margin-top: 0.4rem;
  z-index: 1;
}

.card-tarot-symbol {
  font-size: 2.2rem;
  margin-top: 0.15rem;
  z-index: 1;
  filter: drop-shadow(0 0 12px var(--tarot-color, rgba(255,255,255,0.4)));
  animation: tarotGlow 3s ease-in-out infinite;
}
@keyframes tarotGlow {
  0%, 100% { filter: drop-shadow(0 0 8px var(--tarot-color, rgba(255,255,255,0.3))); opacity: 0.9; }
  50% { filter: drop-shadow(0 0 20px var(--tarot-color, rgba(255,255,255,0.5))); opacity: 1; }
}

.card-tarot-name {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  margin-top: 0.15rem;
  text-transform: uppercase;
  z-index: 1;
  opacity: 0.7;
}

.card-tarot-namecn {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  margin-top: 0.1rem;
  z-index: 1;
  opacity: 0.6;
}

.card-divider {
  width: 50%; height: 1px;
  margin: 0.45rem 0;
  z-index: 1;
  opacity: 0.25;
  background: var(--tarot-color, rgba(255,255,255,0.3));
}

.card-divider-bottom {
  width: 35%;
  margin: 0.3rem 0;
}

.card-tarot-poem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  z-index: 1;
  max-width: 88%;
}
.card-tarot-poem span {
  font-size: 0.65rem;
  line-height: 1.5;
  text-align: center;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

.card-post-title {
  font-family: 'Crimson Text', serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 90%;
  opacity: 0.85;
}

.card-read-btn {
  margin-top: auto;
  margin-bottom: 0.5rem;
  padding: 0.3rem 1.2rem;
  border: 1px solid var(--tarot-color, rgba(255,255,255,0.3));
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  background: transparent;
  color: var(--tarot-color, rgba(255,255,255,0.7));
  z-index: 1;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}
.card-read-btn:hover {
  background: rgba(255,255,255,0.08);
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--tarot-color, rgba(255,255,255,0.15));
}

/* ---- 22张塔罗牌主题色 · Apple磨砂玻璃风 ---- */

/* 底部操作按钮 */
.fortune-actions {
  display: flex; gap: 1rem; align-items: center;
}
.fortune-btn {
  padding: 0.6rem 1.8rem;
  border: 1px solid var(--accent-gold);
  border-radius: 25px;
  background: transparent;
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
}
.fortune-btn:hover {
  background: rgba(196, 158, 80, 0.15);
  box-shadow: 0 0 20px rgba(196, 158, 80, 0.3);
  transform: scale(1.05);
}
.fortune-btn-close {
  border-color: var(--text-muted);
  color: var(--text-muted);
}
.fortune-btn-close:hover {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  box-shadow: none;
}

/* 星尘粒子特效 */
.fortune-stars {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.fortune-star {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--accent-gold);
  border-radius: 50%;
  animation: starTwinkle 2s ease-in-out infinite;
}
@keyframes starTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .fortune-cards {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }
  .fortune-card {
    width: 120px; height: 185px;
  }
  .fortune-title { font-size: 1.2rem; }
  .card-constellation-symbol { font-size: 2rem; }
  .card-post-title { font-size: 0.75rem; }
  .card-post-excerpt { font-size: 0.6rem; }
  .card-read-btn { font-size: 0.55rem; padding: 0.25rem 0.7rem; }
  .card-constellation-name { font-size: 0.55rem; }
}
@media (max-width: 480px) {
  .fortune-card {
    width: 100px; height: 160px;
  }
  .card-constellation-symbol { font-size: 1.6rem; }
  .card-post-title { font-size: 0.7rem; -webkit-line-clamp: 2; }
  .card-post-excerpt { display: none; }
}

/* ============================================
   Time Capsule — 时间胶囊 · 封印之书
   ============================================ */

/* 封印卡片 */
.post-card.sealed-card {
  position: relative;
  cursor: default;
  overflow: hidden;
}
.post-card.sealed-card:hover {
  transform: translateY(-2px);
  animation: sealedShake 0.5s ease;
}
@keyframes sealedShake {
  0%, 100% { transform: translateY(-2px) rotate(0); }
  20% { transform: translateY(-2px) rotate(-0.5deg); }
  40% { transform: translateY(-2px) rotate(0.5deg); }
  60% { transform: translateY(-2px) rotate(-0.3deg); }
  80% { transform: translateY(-2px) rotate(0.3deg); }
}

/* 模糊遮罩层 */
.sealed-blur-overlay {
  position: absolute; inset: 0;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  background: rgba(13, 10, 6, 0.5);
  z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.6rem;
  border-radius: 12px;
}

/* 蜡封纹章 */
.sealed-wax {
  width: 64px; height: 64px;
  background: radial-gradient(circle at 40% 35%, #c0392b 0%, #8b1a1a 60%, #5a0f0f 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow:
    0 4px 15px rgba(139, 26, 26, 0.5),
    inset 0 -3px 6px rgba(0,0,0,0.3),
    inset 0 2px 4px rgba(255,150,150,0.2);
  position: relative;
  animation: waxGlow 2s ease-in-out infinite;
}
@keyframes waxGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(139,26,26,0.5), inset 0 -3px 6px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,150,150,0.2); }
  50% { box-shadow: 0 4px 25px rgba(192,57,43,0.7), inset 0 -3px 6px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,150,150,0.3); }
}
.sealed-wax::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(192, 57, 43, 0.3);
}

/* 封印标签 */
.sealed-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  color: #c0392b;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px rgba(192,57,43,0.5);
  font-weight: 700;
}

/* 倒计时 */
.sealed-countdown {
  font-family: 'Crimson Text', serif;
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  display: flex; align-items: center; gap: 0.4rem;
}
.sealed-countdown-number {
  background: rgba(192, 57, 43, 0.15);
  border: 1px solid rgba(192, 57, 43, 0.3);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  color: #c0392b;
  min-width: 24px;
  text-align: center;
  font-size: 0.8rem;
}
.sealed-countdown-label {
  font-size: 0.6rem;
  color: var(--text-muted);
}
.sealed-countdown-sep {
  color: var(--text-muted);
  font-size: 0.65rem;
}

/* 首页精选封印卡片也用同样效果 */
.fc-card.sealed-card .sealed-blur-overlay {
  border-radius: 12px;
}

/* 后台表单封印日期 */
.sealed-date-group {
  display: flex; align-items: center; gap: 0.5rem;
}
.sealed-date-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.sealed-date-group input[type="date"] {
  flex: 1;
}
.sealed-date-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ============================================
   Pilgrim Path — 朝圣之路 · 访客足迹
   ============================================ */

/* 访客光点 — 轻柔烛光，不遮挡博主足迹 */
.visitor-dot {
  fill: rgba(91,192,222,0.35);
  stroke: rgba(91,192,222,0.15);
  stroke-width: 0.5;
  opacity: 0.6;
  transition: r 0.3s ease, opacity 0.3s ease;
  pointer-events: all;
}
.visitor-dot:hover {
  fill: rgba(91,192,222,0.6);
  opacity: 0.9;
}

.visitor-pulse {
  fill: none;
  stroke: rgba(91,192,222,0.2);
  stroke-width: 0.5;
  opacity: 0;
  animation: visitorPulse 3.5s ease-out infinite;
}
@keyframes visitorPulse {
  0% { r: 3; opacity: 0.3; }
  100% { r: 10; opacity: 0; }
}

/* 访客涟漪（最近到访用） — 极淡 */
.visitor-ripple {
  fill: none;
  stroke: rgba(91,192,222,0.15);
  stroke-width: 0.3;
  opacity: 0;
  animation: visitorRipple 4s ease-out infinite;
}
@keyframes visitorRipple {
  0% { r: 2; opacity: 0.25; }
  50% { r: 7; opacity: 0.1; }
  100% { r: 12; opacity: 0; }
}

/* 山河志切换按钮 */
.map-layer-toggle {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.map-layer-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Crimson Text', serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}
.map-layer-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.map-layer-btn.active {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(196, 158, 80, 0.1);
  box-shadow: 0 0 10px rgba(196, 158, 80, 0.2);
}
.map-layer-btn.active-visitor {
  border-color: #5bc0de;
  color: #5bc0de;
  background: rgba(91, 192, 222, 0.1);
  box-shadow: 0 0 10px rgba(91, 192, 222, 0.2);
}

/* 访客统计信息 */
.map-visitor-stats {
  text-align: center;
  margin-top: 0.8rem;
  font-family: 'Crimson Text', serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}
.map-visitor-stats .visitor-count {
  color: #5bc0de;
  font-weight: 600;
}

/* 访客 tooltip */
.visitor-tooltip-tag {
  color: #5bc0de;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  font-family: 'Cinzel', serif;
}

.fortune-card[data-tarot="fool"] .card-front {
  background: linear-gradient(170deg, rgba(30,28,26,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(240,230,211,0.25);
  color: rgba(240,230,211,0.85);
  --tarot-color: #f0e6d3;
}
.fortune-card[data-tarot="fool"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(240,230,211,0.15), transparent 70%); }
.fortune-card[data-tarot="fool"] .card-front::after { border: 1px solid rgba(240,230,211,0.06); }
.fortune-card[data-tarot="magician"] .card-front {
  background: linear-gradient(170deg, rgba(25,21,9,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(201,168,76,0.25);
  color: rgba(201,168,76,0.85);
  --tarot-color: #c9a84c;
}
.fortune-card[data-tarot="magician"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(201,168,76,0.15), transparent 70%); }
.fortune-card[data-tarot="magician"] .card-front::after { border: 1px solid rgba(201,168,76,0.06); }
.fortune-card[data-tarot="priestess"] .card-front {
  background: linear-gradient(170deg, rgba(17,20,23,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(143,164,191,0.25);
  color: rgba(143,164,191,0.85);
  --tarot-color: #8fa4bf;
}
.fortune-card[data-tarot="priestess"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(143,164,191,0.15), transparent 70%); }
.fortune-card[data-tarot="priestess"] .card-front::after { border: 1px solid rgba(143,164,191,0.06); }
.fortune-card[data-tarot="empress"] .card-front {
  background: linear-gradient(170deg, rgba(21,24,16,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(168,198,134,0.25);
  color: rgba(168,198,134,0.85);
  --tarot-color: #a8c686;
}
.fortune-card[data-tarot="empress"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(168,198,134,0.15), transparent 70%); }
.fortune-card[data-tarot="empress"] .card-front::after { border: 1px solid rgba(168,198,134,0.06); }
.fortune-card[data-tarot="emperor"] .card-front {
  background: linear-gradient(170deg, rgba(24,7,5,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(192,57,43,0.25);
  color: rgba(192,57,43,0.85);
  --tarot-color: #c0392b;
}
.fortune-card[data-tarot="emperor"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(192,57,43,0.15), transparent 70%); }
.fortune-card[data-tarot="emperor"] .card-front::after { border: 1px solid rgba(192,57,43,0.06); }
.fortune-card[data-tarot="hierophant"] .card-front {
  background: linear-gradient(170deg, rgba(15,13,11,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(125,107,93,0.25);
  color: rgba(125,107,93,0.85);
  --tarot-color: #7d6b5d;
}
.fortune-card[data-tarot="hierophant"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(125,107,93,0.15), transparent 70%); }
.fortune-card[data-tarot="hierophant"] .card-front::after { border: 1px solid rgba(125,107,93,0.06); }
.fortune-card[data-tarot="lovers"] .card-front {
  background: linear-gradient(170deg, rgba(29,20,23,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(232,160,191,0.25);
  color: rgba(232,160,191,0.85);
  --tarot-color: #e8a0bf;
}
.fortune-card[data-tarot="lovers"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(232,160,191,0.15), transparent 70%); }
.fortune-card[data-tarot="lovers"] .card-front::after { border: 1px solid rgba(232,160,191,0.06); }
.fortune-card[data-tarot="chariot"] .card-front {
  background: linear-gradient(170deg, rgba(9,13,20,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(74,111,165,0.25);
  color: rgba(74,111,165,0.85);
  --tarot-color: #4a6fa5;
}
.fortune-card[data-tarot="chariot"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(74,111,165,0.15), transparent 70%); }
.fortune-card[data-tarot="chariot"] .card-front::after { border: 1px solid rgba(74,111,165,0.06); }
.fortune-card[data-tarot="strength"] .card-front {
  background: linear-gradient(170deg, rgba(26,20,10,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(212,160,85,0.25);
  color: rgba(212,160,85,0.85);
  --tarot-color: #d4a055;
}
.fortune-card[data-tarot="strength"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(212,160,85,0.15), transparent 70%); }
.fortune-card[data-tarot="strength"] .card-front::after { border: 1px solid rgba(212,160,85,0.06); }
.fortune-card[data-tarot="hermit"] .card-front {
  background: linear-gradient(170deg, rgba(13,15,17,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(107,123,141,0.25);
  color: rgba(107,123,141,0.85);
  --tarot-color: #6b7b8d;
}
.fortune-card[data-tarot="hermit"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(107,123,141,0.15), transparent 70%); }
.fortune-card[data-tarot="hermit"] .card-front::after { border: 1px solid rgba(107,123,141,0.06); }
.fortune-card[data-tarot="wheel"] .card-front {
  background: linear-gradient(170deg, rgba(17,13,22,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(142,107,176,0.25);
  color: rgba(142,107,176,0.85);
  --tarot-color: #8e6bb0;
}
.fortune-card[data-tarot="wheel"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(142,107,176,0.15), transparent 70%); }
.fortune-card[data-tarot="wheel"] .card-front::after { border: 1px solid rgba(142,107,176,0.06); }
.fortune-card[data-tarot="justice"] .card-front {
  background: linear-gradient(170deg, rgba(11,21,28,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(93,173,226,0.25);
  color: rgba(93,173,226,0.85);
  --tarot-color: #5dade2;
}
.fortune-card[data-tarot="justice"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(93,173,226,0.15), transparent 70%); }
.fortune-card[data-tarot="justice"] .card-front::after { border: 1px solid rgba(93,173,226,0.06); }
.fortune-card[data-tarot="hanged"] .card-front {
  background: linear-gradient(170deg, rgba(8,22,19,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(69,179,157,0.25);
  color: rgba(69,179,157,0.85);
  --tarot-color: #45b39d;
}
.fortune-card[data-tarot="hanged"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(69,179,157,0.15), transparent 70%); }
.fortune-card[data-tarot="hanged"] .card-front::after { border: 1px solid rgba(69,179,157,0.06); }
.fortune-card[data-tarot="death"] .card-front {
  background: linear-gradient(170deg, rgba(5,7,10,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(44,62,80,0.25);
  color: rgba(44,62,80,0.85);
  --tarot-color: #2c3e50;
}
.fortune-card[data-tarot="death"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(44,62,80,0.15), transparent 70%); }
.fortune-card[data-tarot="death"] .card-front::after { border: 1px solid rgba(44,62,80,0.06); }
.fortune-card[data-tarot="temperance"] .card-front {
  background: linear-gradient(170deg, rgba(15,22,27,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(127,179,216,0.25);
  color: rgba(127,179,216,0.85);
  --tarot-color: #7fb3d8;
}
.fortune-card[data-tarot="temperance"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(127,179,216,0.15), transparent 70%); }
.fortune-card[data-tarot="temperance"] .card-front::after { border: 1px solid rgba(127,179,216,0.06); }
.fortune-card[data-tarot="devil"] .card-front {
  background: linear-gradient(170deg, rgba(17,5,5,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(139,0,0,0.25);
  color: rgba(139,0,0,0.85);
  --tarot-color: #8b0000;
}
.fortune-card[data-tarot="devil"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(139,0,0,0.15), transparent 70%); }
.fortune-card[data-tarot="devil"] .card-front::after { border: 1px solid rgba(139,0,0,0.06); }
.fortune-card[data-tarot="tower"] .card-front {
  background: linear-gradient(170deg, rgba(28,15,5,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(230,126,34,0.25);
  color: rgba(230,126,34,0.85);
  --tarot-color: #e67e22;
}
.fortune-card[data-tarot="tower"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(230,126,34,0.15), transparent 70%); }
.fortune-card[data-tarot="tower"] .card-front::after { border: 1px solid rgba(230,126,34,0.06); }
.fortune-card[data-tarot="star"] .card-front {
  background: linear-gradient(170deg, rgba(21,27,29,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(168,216,234,0.25);
  color: rgba(168,216,234,0.85);
  --tarot-color: #a8d8ea;
}
.fortune-card[data-tarot="star"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(168,216,234,0.15), transparent 70%); }
.fortune-card[data-tarot="star"] .card-front::after { border: 1px solid rgba(168,216,234,0.06); }
.fortune-card[data-tarot="moon"] .card-front {
  background: linear-gradient(170deg, rgba(22,20,25,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(176,160,200,0.25);
  color: rgba(176,160,200,0.85);
  --tarot-color: #b0a0c8;
}
.fortune-card[data-tarot="moon"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(176,160,200,0.15), transparent 70%); }
.fortune-card[data-tarot="moon"] .card-front::after { border: 1px solid rgba(176,160,200,0.06); }
.fortune-card[data-tarot="sun"] .card-front {
  background: linear-gradient(170deg, rgba(30,24,8,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(245,197,66,0.25);
  color: rgba(245,197,66,0.85);
  --tarot-color: #f5c542;
}
.fortune-card[data-tarot="sun"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(245,197,66,0.15), transparent 70%); }
.fortune-card[data-tarot="sun"] .card-front::after { border: 1px solid rgba(245,197,66,0.06); }
.fortune-card[data-tarot="judgement"] .card-front {
  background: linear-gradient(170deg, rgba(19,17,24,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(155,142,192,0.25);
  color: rgba(155,142,192,0.85);
  --tarot-color: #9b8ec0;
}
.fortune-card[data-tarot="judgement"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(155,142,192,0.15), transparent 70%); }
.fortune-card[data-tarot="judgement"] .card-front::after { border: 1px solid rgba(155,142,192,0.06); }
.fortune-card[data-tarot="world"] .card-front {
  background: linear-gradient(170deg, rgba(5,25,14,1) 0%, rgba(10,10,14,1) 55%, rgba(6,6,10,1) 100%);
  border: 1px solid rgba(46,204,113,0.25);
  color: rgba(46,204,113,0.85);
  --tarot-color: #2ecc71;
}
.fortune-card[data-tarot="world"] .card-front::before { background: radial-gradient(ellipse at 50% 25%, rgba(46,204,113,0.15), transparent 70%); }
.fortune-card[data-tarot="world"] .card-front::after { border: 1px solid rgba(46,204,113,0.06); }


/* ============================================
   山河志 · 重设计
   ============================================ */

/* ── Hero 区 ── */
.map-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 2rem 3rem;
}

.map-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 55% at 50% 45%,
    rgba(201,168,76,0.10) 0%,
    rgba(201,168,76,0.03) 50%,
    transparent 70%);
  pointer-events: none;
}

[data-theme="light"] .map-hero-bg {
  background: radial-gradient(ellipse 65% 55% at 50% 45%,
    rgba(160,110,40,0.08) 0%,
    rgba(160,110,40,0.02) 50%,
    transparent 70%);
}

.map-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
  animation: fadeInUp 0.8s ease both;
}

.map-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  text-shadow: 0 0 40px rgba(196,158,80,0.3);
  margin-bottom: 1rem;
}

.map-hero-ornament {
  font-family: 'IM Fell English', serif;
  font-size: 1.1rem;
  color: var(--accent-gold);
  opacity: 0.5;
  letter-spacing: 0.4em;
  animation: fadeInUp 0.8s ease 0.3s both;
}

/* ── 地图区改造 ── */
.map-section {
  padding: 2rem 0 3rem !important;
}

.map-wrapper {
  position: relative;
  margin-top: 0 !important;
  padding: 2.5rem !important;
}

/* ── 四角花纹 ── */
.map-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 5;
  pointer-events: none;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.map-wrapper:hover .map-corner {
  opacity: 0.65;
}

.map-corner::before,
.map-corner::after {
  content: '';
  position: absolute;
  background: var(--accent-gold);
}

/* 水平线 */
.map-corner::before {
  width: 28px;
  height: 1.5px;
}

/* 垂直线 */
.map-corner::after {
  width: 1.5px;
  height: 28px;
}

/* 左上 */
.map-corner-tl {
  top: 12px; left: 12px;
}
.map-corner-tl::before { top: 0; left: 0; }
.map-corner-tl::after { top: 0; left: 0; }

/* 右上 */
.map-corner-tr {
  top: 12px; right: 12px;
}
.map-corner-tr::before { top: 0; right: 0; }
.map-corner-tr::after { top: 0; right: 0; }

/* 左下 */
.map-corner-bl {
  bottom: 12px; left: 12px;
}
.map-corner-bl::before { bottom: 0; left: 0; }
.map-corner-bl::after { bottom: 0; left: 0; }

/* 右下 */
.map-corner-br {
  bottom: 12px; right: 12px;
}
.map-corner-br::before { bottom: 0; right: 0; }
.map-corner-br::after { bottom: 0; right: 0; }

/* 花角小菱形装饰 */
.map-corner-tl::before { border-radius: 0 2px 2px 0; }
.map-corner-tl::after { border-radius: 0 0 2px 2px; }
.map-corner-tr::before { border-radius: 2px 0 0 2px; }
.map-corner-tr::after { border-radius: 0 0 2px 2px; }
.map-corner-bl::before { border-radius: 0 2px 2px 0; }
.map-corner-bl::after { border-radius: 2px 2px 0 0; }
.map-corner-br::before { border-radius: 2px 0 0 2px; }
.map-corner-br::after { border-radius: 2px 2px 0 0; }

/* ── 浮动统计信息（左上） ── */
.map-float-stats {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(13, 10, 6, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(196, 158, 80, 0.2);
  border-radius: 20px;
  font-family: 'Crimson Text', serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  animation: fadeInUp 0.6s ease 0.5s both;
}

[data-theme="light"] .map-float-stats {
  background: rgba(245, 234, 200, 0.75);
  border-color: rgba(120, 85, 30, 0.25);
}

.map-stat-item {
  white-space: nowrap;
}

.map-stat-item span {
  color: var(--accent-gold);
  font-weight: 600;
}

.map-stat-divider {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ── 浮动图层切换（右上） ── */
.map-float-layers {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem;
  background: rgba(13, 10, 6, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(196, 158, 80, 0.2);
  border-radius: 12px;
  animation: fadeInUp 0.6s ease 0.6s both;
}

[data-theme="light"] .map-float-layers {
  background: rgba(245, 234, 200, 0.75);
  border-color: rgba(120, 85, 30, 0.25);
}

.map-float-layers .map-layer-btn {
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  text-align: left;
  white-space: nowrap;
}

/* ── 底部渐隐 ── */
.map-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--card-bg));
  border-radius: 0 0 16px 16px;
  pointer-events: none;
  z-index: 4;
}

/* ── 卷尾装饰带 ── */
.map-scroll-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2.5rem 2rem 4rem;
  animation: fadeInUp 0.6s ease 0.8s both;
}

.map-scroll-line {
  flex: 1;
  max-width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
  opacity: 0.3;
}

.map-scroll-emblem {
  font-size: 1.3rem;
  color: var(--accent-gold);
  opacity: 0.45;
  text-shadow: 0 0 12px rgba(196,158,80,0.3);
  transition: opacity 0.3s ease;
}

.map-scroll-end:hover .map-scroll-emblem {
  opacity: 0.7;
}

.map-scroll-end:hover .map-scroll-line {
  opacity: 0.5;
}

/* ── 移动端适配 ── */
@media (max-width: 768px) {
  .map-hero {
    min-height: 30vh;
    padding: 5rem 1.5rem 2rem;
  }
  .map-hero-title {
    font-size: clamp(1.6rem, 8vw, 2.5rem);
  }
  .map-float-stats {
    position: relative;
    top: auto;
    left: auto;
    justify-content: center;
    margin-bottom: 0.8rem;
    border-radius: 12px;
  }
  .map-float-layers {
    position: relative;
    top: auto;
    right: auto;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
    border-radius: 12px;
  }
  .map-wrapper {
    padding: 1.5rem !important;
  }
  .map-corner {
    width: 24px;
    height: 24px;
  }
  .map-corner::before { width: 18px; }
  .map-corner::after { height: 18px; }
  .map-scroll-line {
    max-width: 100px;
  }
}


/* ============================================
   星墟 — Stardust Anonymous Stars
   ============================================ */

/* Hero */
.stardust-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 2rem 3rem;
}

.stardust-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 55% at 50% 45%,
    rgba(201,168,76,0.08) 0%,
    rgba(201,168,76,0.02) 50%,
    transparent 70%);
  pointer-events: none;
}

[data-theme="light"] .stardust-hero-bg {
  background: radial-gradient(ellipse 65% 55% at 50% 45%,
    rgba(160,110,40,0.06) 0%,
    rgba(160,110,40,0.015) 50%,
    transparent 70%);
}

.stardust-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
  animation: fadeInUp 0.8s ease both;
}

.stardust-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  text-shadow: 0 0 40px rgba(196,158,80,0.25);
  margin-bottom: 1rem;
}

.stardust-hero-ornament {
  font-family: 'IM Fell English', serif;
  font-size: 1.1rem;
  color: var(--accent-gold);
  opacity: 0.5;
  letter-spacing: 0.4em;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.stardust-hero-subtitle {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 0.8rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.5s both;
}

/* 星图主体 */
.stardust-sky {
  position: relative;
  min-height: 60vh;
  padding: 2rem;
  padding-top: 1rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, transparent 50%, var(--bg-primary) 100%);
}
.stardust-bg-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.3;
}
.stardust-stars {
  position: relative;
  width: 100%;
  min-height: 55vh;
}

/* ── 星辰光点 — 纯动画闪烁特效 ── */
.star-point {
  position: absolute;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255,255,255,0.9);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease;
  animation: starFlicker var(--twinkle-duration, 4s) ease-in-out infinite;
  animation-delay: var(--twinkle-delay, 0s);
  overflow: visible;
  will-change: opacity, box-shadow, transform;
}

/* 闪烁核心动画 — 模拟真实星光闪烁 */
@keyframes starFlicker {
  0%   { opacity: 0.5;  box-shadow: 0 0 2px var(--star-color, rgba(255,248,230,0.6)), 0 0 6px var(--star-glow, rgba(255,240,200,0.2)); }
  15%  { opacity: 0.85; box-shadow: 0 0 4px var(--star-color, rgba(255,248,230,0.8)), 0 0 12px var(--star-glow, rgba(255,240,200,0.3)); }
  30%  { opacity: 0.6;  box-shadow: 0 0 2px var(--star-color, rgba(255,248,230,0.5)), 0 0 8px var(--star-glow, rgba(255,240,200,0.15)); }
  50%  { opacity: 1;    box-shadow: 0 0 6px var(--star-color, rgba(255,248,230,1)), 0 0 18px var(--star-glow, rgba(255,240,200,0.5)), 0 0 40px var(--star-halo, rgba(255,220,150,0.15)); }
  65%  { opacity: 0.7;  box-shadow: 0 0 3px var(--star-color, rgba(255,248,230,0.7)), 0 0 10px var(--star-glow, rgba(255,240,200,0.25)); }
  80%  { opacity: 0.9;  box-shadow: 0 0 5px var(--star-color, rgba(255,248,230,0.9)), 0 0 14px var(--star-glow, rgba(255,240,200,0.4)), 0 0 30px var(--star-halo, rgba(255,220,150,0.1)); }
  100% { opacity: 0.5;  box-shadow: 0 0 2px var(--star-color, rgba(255,248,230,0.6)), 0 0 6px var(--star-glow, rgba(255,240,200,0.2)); }
}

/* 偶尔亮闪动画 — 随机触发的明亮脉冲 */
@keyframes starPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  5%  { opacity: 1; transform: scale(1.4); box-shadow: 0 0 8px var(--star-color, rgba(255,248,230,1)), 0 0 24px var(--star-glow, rgba(255,240,200,0.6)), 0 0 50px var(--star-halo, rgba(255,220,150,0.2)); }
  15% { opacity: 0.75; transform: scale(1.05); }
  30% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 0.9; transform: scale(1.1); box-shadow: 0 0 6px var(--star-color, rgba(255,248,230,0.9)), 0 0 16px var(--star-glow, rgba(255,240,200,0.4)); }
  70% { opacity: 0.5; transform: scale(1); }
}

/* Hover 状态 */
.star-point:hover {
  transform: scale(2.5);
  z-index: 10;
  animation-play-state: paused;
  box-shadow:
    0 0 8px var(--star-color, rgba(255,248,230,1)),
    0 0 20px var(--star-glow, rgba(255,240,200,0.6)),
    0 0 40px var(--star-halo, rgba(255,220,150,0.25)),
    0 0 60px var(--star-halo, rgba(255,220,150,0.08));
}
.star-point:hover::before,
.star-point:hover::after {
  animation-play-state: paused;
  opacity: 1 !important;
}

/* ── 光等级 — 色温 + 闪烁差异 ── */

/* Lv.0 — 暗尘星：冷蓝白，微弱闪烁 */
.star-point[data-level="0"] {
  width: 3px; height: 3px;
  background: rgba(200,215,240,0.8);
  --star-color: rgba(200,215,240,0.5);
  --star-glow: rgba(180,200,230,0.12);
  --star-halo: rgba(160,180,220,0.03);
  --twinkle-duration: 6s;
}
.star-point[data-level="0"]::before,
.star-point[data-level="0"]::after { display: none; }

/* Lv.1 — 微光星：暖白 */
.star-point[data-level="1"] {
  width: 4px; height: 4px;
  background: rgba(255,250,235,0.92);
  --star-color: rgba(255,245,220,0.75);
  --star-glow: rgba(240,220,170,0.3);
  --star-halo: rgba(220,190,120,0.1);
  --twinkle-duration: 4.5s;
}
/* 微光星 — 微弱短十字 */
.star-point[data-level="1"]::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,245,220,0.35) 40%, rgba(255,245,220,0.5) 50%, rgba(255,245,220,0.35) 60%, transparent 100%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.star-point[data-level="1"]::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 1px; height: 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,245,220,0.35) 40%, rgba(255,245,220,0.5) 50%, rgba(255,245,220,0.35) 60%, transparent 100%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Lv.2 — 辉星：暖金 */
.star-point[data-level="2"] {
  width: 6px; height: 6px;
  background: rgba(255,240,200,0.95);
  --star-color: rgba(255,230,170,0.9);
  --star-glow: rgba(240,200,120,0.5);
  --star-halo: rgba(220,180,80,0.2);
  --twinkle-duration: 3.5s;
  animation-name: starPulse;
}
/* 辉星 — 金色中等十字 */
.star-point[data-level="2"]::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,220,140,0.15) 15%, rgba(255,220,140,0.55) 45%, rgba(255,230,160,0.7) 50%, rgba(255,220,140,0.55) 55%, rgba(255,220,140,0.15) 85%, transparent 100%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: crossFade 3.5s ease-in-out infinite;
}
.star-point[data-level="2"]::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 1.5px; height: 22px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,220,140,0.15) 15%, rgba(255,220,140,0.55) 45%, rgba(255,230,160,0.7) 50%, rgba(255,220,140,0.55) 55%, rgba(255,220,140,0.15) 85%, transparent 100%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: crossFade 3.5s ease-in-out infinite;
}

/* Lv.3 — 耀星：明金，脉冲闪烁 */
.star-point[data-level="3"] {
  width: 8px; height: 8px;
  background: rgba(255,250,230,1);
  --star-color: rgba(255,240,200,1);
  --star-glow: rgba(255,210,100,0.7);
  --star-halo: rgba(240,190,60,0.35);
  --twinkle-duration: 2.8s;
  animation-name: starPulse;
}
/* 耀星 — 明亮长十字+对角线光芒 */
.star-point[data-level="3"]::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 36px; height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,230,160,0.1) 10%, rgba(255,230,160,0.5) 35%, rgba(255,240,180,0.85) 50%, rgba(255,230,160,0.5) 65%, rgba(255,230,160,0.1) 90%, transparent 100%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: crossFade 2.8s ease-in-out infinite;
  box-shadow: 0 0 4px rgba(255,220,140,0.3);
}
.star-point[data-level="3"]::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 2px; height: 36px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,230,160,0.1) 10%, rgba(255,230,160,0.5) 35%, rgba(255,240,180,0.85) 50%, rgba(255,230,160,0.5) 65%, rgba(255,230,160,0.1) 90%, transparent 100%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: crossFade 2.8s ease-in-out infinite;
  box-shadow: 0 0 4px rgba(255,220,140,0.3);
}


/* 十字光芒呼吸动画 */
@keyframes crossFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* 诞生动画 */
@keyframes starBorn {
  0% {
    transform: scale(0);
    opacity: 0;
    box-shadow: 0 0 0 rgba(255,255,255,0);
  }
  25% {
    transform: scale(3);
    opacity: 1;
    box-shadow:
      0 0 15px rgba(255,248,230,0.9),
      0 0 40px rgba(255,220,150,0.5),
      0 0 80px rgba(196,158,80,0.2);
  }
  50% {
    transform: scale(0.7);
    box-shadow:
      0 0 6px rgba(255,248,230,0.7),
      0 0 16px rgba(255,220,150,0.3);
  }
  75% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow:
      0 0 4px var(--star-color, rgba(255,248,230,0.8)),
      0 0 12px var(--star-glow, rgba(255,240,200,0.3));
  }
}
.star-point.born {
  animation: starBorn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .star-point[data-level="0"] { width: 2px; height: 2px; }
  .star-point[data-level="1"] { width: 3px; height: 3px; }
  .star-point[data-level="2"] { width: 4px; height: 4px; }
  .star-point[data-level="3"] { width: 6px; height: 6px; }
  .star-point[data-level="1"]::before { width: 8px; }
  .star-point[data-level="1"]::after { height: 8px; }
  .star-point[data-level="2"]::before { width: 16px; }
  .star-point[data-level="2"]::after { height: 16px; }
  .star-point[data-level="3"]::before { width: 24px; }
  .star-point[data-level="3"]::after { height: 24px; }
}

/* Hover 气泡 */
.star-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  min-width: 140px;
  max-width: 220px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-family: 'Crimson Text', serif;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.4;
  z-index: 20;
  white-space: pre-wrap;
  word-break: break-all;
}
.star-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-color);
}
.star-tooltip .star-tooltip-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-family: 'IM Fell English', serif;
  font-style: italic;
}
.star-point:hover .star-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

/* 详情弹窗 */
.stardust-modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.stardust-modal-mask.visible { opacity: 1; pointer-events: auto; }

.stardust-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  min-width: 300px;
  max-width: 420px;
  width: 90vw;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 60px rgba(0,0,0,0.5), 0 0 60px rgba(196,158,80,0.1);
  text-align: center;
}
.stardust-modal.visible {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.stardust-modal-close {
  position: absolute; top: 0.75rem; right: 1rem;
  background: none; border: none;
  color: var(--text-muted); font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.stardust-modal-close:hover { color: var(--accent-gold); }

/* 铸星区 */
.stardust-forge {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stardust-forge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  width: 100%;
  max-width: 480px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stardust-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  resize: none;
  outline: none;
  line-height: 1.5;
  box-sizing: border-box;
}
.stardust-input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}
.stardust-forge-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}
.stardust-char-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Crimson Text', serif;
}
.stardust-submit-btn {
  background: linear-gradient(135deg, var(--accent-gold), #8b6914);
  color: #fff;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  letter-spacing: 0.1em;
}
.stardust-submit-btn:hover {
  box-shadow: 0 0 20px rgba(196,158,80,0.4);
  transform: translateY(-1px);
}
.stardust-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.stardust-stats {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'IM Fell English', serif;
  font-style: italic;
}
.stardust-stats span {
  color: var(--accent-gold);
}

/* 铸星飞行粒子 */
.star-cast-particle {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f0c060;
  box-shadow: 0 0 12px var(--accent-gold), 0 0 30px rgba(196,158,80,0.5);
  z-index: 1001;
  pointer-events: none;
  transition: none;
}
.star-cast-particle.flying {
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.star-cast-trail {
  position: fixed;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-gold);
  opacity: 0.6;
  pointer-events: none;
  z-index: 1000;
  animation: trailFade 0.5s ease-out forwards;
}
@keyframes trailFade {
  to { opacity: 0; transform: scale(0); }
}

/* 星辰诞生闪光 */
@keyframes starBorn {
  0% {
    transform: scale(0);
    opacity: 0;
    filter: brightness(3) blur(4px);
    box-shadow: 0 0 0 rgba(255,255,255,0);
  }
  30% {
    transform: scale(2.8);
    opacity: 1;
    filter: brightness(2.5) blur(2px);
    box-shadow: 0 0 50px rgba(255,245,200,0.9),
                0 0 100px rgba(240,200,120,0.4);
  }
  60% {
    transform: scale(0.8);
    filter: brightness(1.3) blur(0);
  }
  80% {
    transform: scale(1.2);
    filter: brightness(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1) blur(0);
  }
}
.star-point.born {
  animation: starBorn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

/* 卷尾装饰 */
.stardust-scroll-end {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; padding: 2rem 0 3rem;
}
.stardust-scroll-line {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.3;
}
.stardust-scroll-emblem {
  color: var(--accent-gold); opacity: 0.4;
  font-size: 1.2rem;
  transition: opacity 0.3s;
}
.stardust-scroll-end:hover .stardust-scroll-emblem { opacity: 0.7; }
.stardust-scroll-end:hover .stardust-scroll-line { opacity: 0.5; }

/* 空状态 */
.stardust-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text-muted);
}
.stardust-empty-icon {
  font-size: 3rem; color: var(--accent-gold); opacity: 0.3;
  margin-bottom: 1rem;
  animation: starTwinkle 3s ease-in-out infinite alternate;
}
.stardust-empty-hint { font-size: 0.85rem; margin-top: 0.5rem; }

/* 移动端 */
@media (max-width: 768px) {
  .stardust-hero { min-height: 28vh; padding: 5rem 1.5rem 2rem; }
  .stardust-hero-title { letter-spacing: 0.1em; font-size: clamp(1.6rem, 5vw, 2.5rem); }
  .stardust-sky { min-height: 50vh; padding: 1rem; }
  .stardust-forge-card { max-width: 100%; }
  .star-tooltip { display: none; }
  .stardust-modal { padding: 1.5rem; min-width: unset; }
}

/* ── Admin Stars Enhanced ── */
.admin-star-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  background: var(--bg-tertiary);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  gap: 0.6rem;
  transition: border-color 0.3s ease;
}
.admin-star-item:hover {
  border-color: var(--accent-gold);
}
.admin-star-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.admin-star-text {
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.4;
}
.admin-star-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}
.admin-star-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.admin-star-level {
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}
.admin-star-level[data-level="0"] {
  color: rgba(180,200,230,0.9);
  background: rgba(180,200,230,0.1);
}
.admin-star-level[data-level="1"] {
  color: rgba(240,220,170,0.9);
  background: rgba(240,220,170,0.1);
}
.admin-star-level[data-level="2"] {
  color: rgba(240,200,120,0.9);
  background: rgba(240,200,120,0.15);
}
.admin-star-level[data-level="3"] {
  color: rgba(255,215,140,1);
  background: rgba(255,215,140,0.15);
  font-weight: 600;
}
.admin-star-lights-ctrl {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}
.admin-lights-btn {
  background: var(--bg-secondary);
  border: none;
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}
.admin-lights-btn:hover {
  background: var(--accent-gold);
  color: #fff;
}
.admin-lights-btn:active {
  transform: scale(0.9);
}
.admin-lights-input {
  width: 38px;
  height: 24px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  background: transparent;
  color: var(--accent-gold);
  font-size: 0.75rem;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
  outline: none;
}
.admin-lights-input::-webkit-outer-spin-button,
.admin-lights-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.admin-star-delete {
  background: none;
  border: 1px solid rgba(220,80,60,0.3);
  color: #dc503c;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
/* 后台管理 - 铸星表单 */
.admin-cast-star-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}
.admin-cast-star-input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s;
}
.admin-cast-star-input:focus {
  border-color: var(--accent-gold);
}
.admin-cast-star-input::placeholder {
  color: var(--text-muted);
}
.admin-cast-star-btn {
  padding: 0.4rem 0.8rem;
  background: var(--accent-gold);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.admin-cast-star-btn:hover {
  opacity: 0.85;
}
.admin-cast-star-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-star-delete:hover {
  background: rgba(220,80,60,0.15);
  border-color: #dc503c;
}

@media (max-width: 768px) {
  .admin-star-item {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-star-controls {
    margin-top: 0.4rem;
    justify-content: flex-end;
  }
}



/* ============================================
   Daily Chronicle — 每日事件
   ============================================ */

.daily-events-wrap {
  max-width: 1400px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.daily-events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
  align-items: stretch;
}

/* 卡片基础 */
.de-card {
  perspective: 800px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  cursor: pointer;
  height: 100%;
}
.de-card.de-visible {
  opacity: 1;
  transform: translateY(0);
}
.de-card-inner {
  position: relative;
  border-radius: 12px;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  transform-style: preserve-3d;
  height: 100%;
}
.de-card.de-flipped .de-card-inner {
  transform: rotateY(180deg);
}
.de-card-front,
.de-card-back {
  padding: 1.4rem 1.2rem;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  text-align: center;
  box-sizing: border-box;
}
.de-card-front {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
}
.de-card-back {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* badge */
.de-card-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.6rem;
  opacity: 0.85;
  font-weight: 600;
  flex-shrink: 0;
}
/* 卡片内容自动间距 - 标题在顶，内容均匀分布 */
.de-tarot .de-card-front .de-card-badge,
.de-star .de-card-front .de-card-badge,
.de-scroll .de-card-front .de-card-badge,
.de-scenery .de-card-front .de-card-badge {
  margin-top: 0;
}
.de-tarot .de-card-front {
  gap: 0.1rem;
  padding-top: 1.2rem;
}
.de-star .de-card-front {
  gap: 0.15rem;
  padding-top: 1.2rem;
}


/* divider */
.de-divider {
  width: 40px;
  height: 1px;
  margin: 0.6rem auto;
  opacity: 0.3;
}

/* ── 塔罗牌卡片 ── */
.de-tarot .de-card-front,
.de-tarot .de-card-back {
  --tc: var(--tarot-color, #c9a84c);
  background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 10%, transparent), rgba(30,22,12,0.3));
  border: 1px solid color-mix(in srgb, var(--tc) 20%, transparent);
  transition: background 0.6s ease, border-color 0.6s ease;
}
[data-theme="light"] .de-tarot .de-card-front,
[data-theme="light"] .de-tarot .de-card-back {
  background: linear-gradient(160deg, color-mix(in srgb, var(--tc, #c9a84c) 18%, transparent), color-mix(in srgb, var(--tc, #c9a84c) 4%, transparent));
  border-color: color-mix(in srgb, var(--tc, #c9a84c) 22%, transparent);
}
.de-tarot .de-divider {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tc, #c9a84c) 50%, transparent), transparent);
  height: 1px;
  border: none;
}
.de-tarot-num {
  font-size: 0.65rem;
  letter-spacing: 3px;
  opacity: 0.6;
  color: var(--tarot-color, #c9a84c);
}
.de-tarot-symbol {
  font-size: 2.2rem;
  margin: 0.3rem 0;
  animation: deTarotPulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px var(--tarot-color, #c9a84c));
  transition: filter 0.6s ease;
}
@keyframes deTarotPulse {
  0%,100% { transform: scale(1); opacity: 0.9; filter: drop-shadow(0 0 6px var(--tarot-color, #c9a84c)); }
  50% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 14px var(--tarot-color, #c9a84c)); }
}
.de-tarot-name {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 2px;
  margin-bottom: 0.15rem;
}
.de-tarot-namecn {
  font-size: 0.85rem;
  opacity: 0.8;
}
.de-tarot-poem {
  font-size: 0.72rem;
  line-height: 1.6;
  opacity: 0.65;
}
.de-tarot-poem span { display: block; }
.de-tarot-advice {
  font-size: 0.78rem;
  line-height: 1.6;
  font-style: italic;
  opacity: 0.75;
  margin-top: 0.2rem;
  color: color-mix(in srgb, var(--tarot-color, #c9a84c) 70%, currentColor);
}
.de-tarot-goto {
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  opacity: 0.4;
  margin-top: 0.6rem;
  cursor: pointer;
  transition: opacity 0.25s;
}
.de-tarot-goto:hover {
  opacity: 0.85;
}
/* ── 易经64卦背面 ── */
.de-yijing-back {
  background: linear-gradient(160deg, color-mix(in srgb, var(--tc, #c9a84c) 12%, transparent), rgba(30,22,12,0.35)) !important;
  border: 1px solid color-mix(in srgb, var(--tc, #c9a84c) 22%, transparent) !important;
}
[data-theme="light"] .de-yijing-back {
  background: linear-gradient(160deg, color-mix(in srgb, var(--tc, #c9a84c) 22%, transparent), color-mix(in srgb, var(--tc, #c9a84c) 6%, transparent)) !important;
  border-color: color-mix(in srgb, var(--tc, #c9a84c) 20%, transparent) !important;
}
.de-yijing-trigram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0.15rem 0;
  opacity: 0.9;
}
.de-yijing-upper, .de-yijing-lower {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 4px;
}
.de-yijing-nature {
  font-size: 0.6rem;
  letter-spacing: 2px;
  opacity: 0.5;
  margin-top: 0.05rem;
}
.de-yijing-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0.15rem 0 0.1rem;
  letter-spacing: 6px;
}
.de-yijing-struct {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  font-size: 0.65rem;
  opacity: 0.55;
  letter-spacing: 1px;
}
.de-yijing-struct-up, .de-yijing-struct-down {
  display: block;
  font-size: 0.65rem;
}
.de-yijing-struct-sep {
  display: block;
  font-size: 0.5rem;
  opacity: 0.3;
  letter-spacing: 3px;
}
.de-yijing-words {
  font-size: 0.75rem;
  font-style: italic;
  line-height: 1.4;
  opacity: 0.75;
  margin-top: 0.15rem;
}
.de-yijing-meaning {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* 翻面提示 */
.de-tarot-flip-hint {
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  opacity: 0.3;
  margin-top: 0.35rem;
  transition: opacity 0.3s;
  animation: deFlipHintPulse 3s ease-in-out infinite;
}
.de-card:hover .de-tarot-flip-hint {
  opacity: 0.6;
}
@keyframes deFlipHintPulse {
  0%,100% { opacity: 0.25; }
  50% { opacity: 0.45; }
/* ── 塔罗卡片粒子动画层 ── */
.de-tarot-anim {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 12px;
  z-index: 0;
}
.de-tarot .de-card-front > *:not(.de-tarot-anim) {
  position: relative;
  z-index: 1;
}
/* 塔罗粒子 - 漂浮符文 */
.tarot-rune { display: none !important;
  position: absolute;
  font-size: 0.7rem;
  opacity: 0;
  animation: tarotRuneFloat var(--dur, 6s) var(--delay, 0s) ease-in-out infinite;
  color: var(--tarot-color, #c9a84c);
  filter: blur(0.5px);
}
@keyframes tarotRuneFloat {
  0% { opacity: 0; transform: translateY(20px) rotate(0deg) scale(0.6); }
  20% { opacity: 0.35; }
  50% { opacity: 0.5; transform: translateY(-10px) rotate(180deg) scale(1); }
  80% { opacity: 0.25; }
  100% { opacity: 0; transform: translateY(-40px) rotate(360deg) scale(0.6); }
}
/* 塔罗粒子 - 星尘 */
.tarot-dust {
  position: absolute;
  width: var(--size, 2px);
  height: var(--size, 2px);
  border-radius: 50%;
  background: var(--tarot-color, #c9a84c);
  opacity: 0;
  animation: tarotDustDrift var(--dur, 5s) var(--delay, 0s) ease-in-out infinite;
}
@keyframes tarotDustDrift {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  30% { opacity: 0.6; }
  70% { opacity: 0.4; }
  100% { opacity: 0; transform: translate(var(--dx, 20px), var(--dy, -30px)) scale(0); }
}
/* 塔罗粒子 - 光环 */
.tarot-halo {
  position: absolute;
  width: var(--size, 40px);
  height: var(--size, 40px);
  border-radius: 50%;
  border: 1px solid var(--tarot-color, #c9a84c);
  opacity: 0;
  animation: tarotHaloExpand var(--dur, 4s) var(--delay, 0s) ease-out infinite;
}
@keyframes tarotHaloExpand {
  0% { opacity: 0.4; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(1.5); }
}
/* 名称使用卡牌颜色 */
.de-tarot-name {
  color: var(--tarot-color, inherit);
  text-shadow: 0 0 12px color-mix(in srgb, var(--tarot-color, #c9a84c) 30%, transparent);
}
.de-tarot-namecn {
  color: var(--tarot-color, inherit);
  opacity: 0.9;
}

/* ── 卷轴卡片粒子 ── */
.scroll-ink-particle {
  position: absolute;
  width: var(--size, 1.5px);
  height: var(--size, 1.5px);
  border-radius: 50%;
  background: var(--scroll-color, #c4a050);
  opacity: 0;
  animation: scrollInkFloat var(--dur, 7s) var(--delay, 0s) ease-in-out infinite;
}
@keyframes scrollInkFloat {
  0% { opacity: 0; transform: translateY(10px); }
  40% { opacity: 0.3; }
  60% { opacity: 0.2; }
  100% { opacity: 0; transform: translateY(-25px) translateX(var(--dx, 5px)); }
}
.de-scroll-anim {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 12px;
  z-index: 0;
}
.de-scroll .de-card-front > *:not(.de-scroll-anim) {
  position: relative;
  z-index: 1;
}

/* ── 星语卡片粒子 ── */
.star-sparkle { display: none !important;
  position: absolute;
  font-size: var(--size, 0.5rem);
  opacity: 0;
  animation: starSparkle var(--dur, 4s) var(--delay, 0s) ease-in-out infinite;
  color: var(--star-color, #d2b982);
}
@keyframes starSparkle {
  0% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: 0.7; transform: scale(1) rotate(180deg); }
  100% { opacity: 0; transform: scale(0.4) rotate(360deg); }
}
.de-star-anim {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 12px;
  z-index: 0;
}
.de-star .de-card-front > *:not(.de-star-anim) {
  position: relative;
  z-index: 1;
}

}

.de-advice {
  font-size: 0.85rem;
  line-height: 1.7;
  font-style: italic;
  padding: 0 0.5rem;
  opacity: 0.9;
}

/* ── 推荐古卷卡片 ── */
.de-scroll .de-card-front {
  background: linear-gradient(160deg, rgba(170,130,55,0.1), rgba(35,26,14,0.28));
  border: 1px solid rgba(196,158,80,0.18);
}
[data-theme="light"] .de-scroll .de-card-front {
  background: linear-gradient(160deg, rgba(240,225,185,0.4), rgba(170,130,55,0.06));
  border-color: rgba(196,158,80,0.2);
}
.de-scroll .de-divider { background: rgba(196,158,80,0.3); }
.de-scroll-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.de-scroll-excerpt {
  font-size: 0.78rem;
  line-height: 1.6;
  opacity: 0.6;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.de-scroll-meta {
  font-size: 0.68rem;
  opacity: 0.45;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}
.de-scroll-line {
  font-size: 0.78rem;
  font-style: italic;
  opacity: 0.7;
  line-height: 1.6;
}
.de-scroll-cta {
  font-size: 0.72rem;
  margin-top: 0.6rem;
  letter-spacing: 1px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.de-scroll:hover .de-scroll-cta { opacity: 1; }

/* 推荐卡片背面 */
.de-scroll-back {
  background: linear-gradient(160deg, rgba(170,130,55,0.14), rgba(35,26,14,0.32)) !important;
  border: 1px solid rgba(196,158,80,0.2) !important;
}
[data-theme="light"] .de-scroll-back {
  background: linear-gradient(160deg, rgba(240,225,185,0.45), rgba(170,130,55,0.08)) !important;
  border-color: rgba(196,158,80,0.22) !important;
}
.de-scroll-back-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  letter-spacing: 1px;
}
.de-scroll-back-desc {
  font-size: 0.72rem;
  line-height: 1.6;
  opacity: 0.55;
  margin-bottom: 0.6rem;
  text-align: center;
}
.de-scroll-actions {
  display: flex;
  justify-content: center;
  margin: 0.3rem 0;
}
.de-scroll-open-btn {
  font-size: 0.75rem;
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  border: 1px solid rgba(196,158,80,0.3);
  background: rgba(196,158,80,0.08);
  color: inherit;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 1px;
}
.de-scroll-open-btn:hover {
  background: rgba(196,158,80,0.2);
  border-color: rgba(196,158,80,0.5);
}

/* ── 星语卡片 ── */
.de-star .de-card-front {
  background: linear-gradient(160deg, color-mix(in srgb, var(--star-color, #d2b982) 10%, transparent), rgba(25,20,12,0.3));
  border: 1px solid color-mix(in srgb, var(--star-color, #d2b982) 20%, transparent);
  overflow: hidden;
  position: relative;
}
[data-theme="light"] .de-star .de-card-front {
  background: linear-gradient(160deg, color-mix(in srgb, var(--star-color, #d2b982) 18%, transparent), color-mix(in srgb, var(--star-color, #d2b982) 4%, transparent));
  border-color: color-mix(in srgb, var(--star-color, #d2b982) 22%, transparent);
}
.de-star .de-divider {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--star-color, #d2b982) 45%, transparent), transparent);
  height: 1px;
  border: none;
}
.de-star-text {
  font-size: 0.88rem;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 12px color-mix(in srgb, var(--star-color, #d2b982) 25%, transparent);
}
.de-star-lights {
  font-size: 0.7rem;
  opacity: 0.6;
  color: color-mix(in srgb, var(--star-color, #d2b982) 65%, currentColor);
}
.de-star-prompt {
  font-size: 0.75rem;
  opacity: 0.6;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}
.de-star-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.de-star-light-btn,
.de-star-goto {
  font-size: 0.7rem;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--star-color, #d2b982) 30%, transparent);
  background: color-mix(in srgb, var(--star-color, #d2b982) 8%, transparent);
  color: var(--star-color, inherit);
  cursor: pointer;
  transition: all 0.25s;
}
.de-star-light-btn:hover {
  background: color-mix(in srgb, var(--star-color, #d2b982) 20%, transparent);
  border-color: color-mix(in srgb, var(--star-color, #d2b982) 50%, transparent);
}
.de-star-light-btn.de-lighted {
  opacity: 0.6;
  cursor: default;
  border-color: rgba(210,185,130,0.15);
}
.de-star-goto {
  background: transparent;
  border-color: color-mix(in srgb, var(--star-color, #d2b982) 20%, transparent);
}
.de-star-goto:hover {
  border-color: color-mix(in srgb, var(--star-color, #d2b982) 45%, transparent);
}

/* 星语背面 */
.de-star-back {
  background: linear-gradient(160deg, color-mix(in srgb, var(--star-color, #d2b982) 12%, transparent), rgba(25,20,12,0.35)) !important;
  border: 1px solid color-mix(in srgb, var(--star-color, #d2b982) 22%, transparent) !important;
}
[data-theme="light"] .de-star-back {
  background: linear-gradient(160deg, color-mix(in srgb, var(--star-color, #d2b982) 22%, transparent), color-mix(in srgb, var(--star-color, #d2b982) 6%, transparent)) !important;
  border-color: color-mix(in srgb, var(--star-color, #d2b982) 25%, transparent) !important;
}
.de-star-back-desc {
  font-size: 0.72rem;
  line-height: 1.6;
  opacity: 0.55;
  margin: 0.3rem 0 0.4rem;
  text-align: center;
}
.de-star-back-sep {
  width: 40%;
  height: 1px;
  background: color-mix(in srgb, var(--star-color, #d2b982) 25%, transparent);
  margin: 0.5rem auto;
}

/* 悬浮效果 */
.de-card:hover .de-card-front,
.de-card:hover .de-card-back {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 20px color-mix(in srgb, var(--tarot-color, var(--scroll-color, var(--star-color, rgba(201,168,76,0.06)))) 12%, transparent);
}
.de-card:hover {
  transform: translateY(-3px);
}
.de-card.de-visible:hover {
  transform: translateY(-3px);
}

/* CTA按钮 */
.de-cta {
  font-size: 0.75rem;
  padding: 0.45rem 1.2rem;
  border-radius: 8px;
  border: 1px solid rgba(142,107,176,0.35);
  background: rgba(142,107,176,0.12);
  color: inherit;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 1px;
}
.de-cta:hover {
  background: rgba(142,107,176,0.25);
  border-color: rgba(142,107,176,0.6);
}

/* 响应式 */
@media (max-width: 768px) {
  .daily-events-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .de-card-front,
  .de-card-back {
    padding: 1.2rem 1rem;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .daily-events-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
}


/* ============================================
   天气氛围系统 · Weather Ambient
   ============================================ */
#weather-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* 天气小组件 */
.weather-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 1.2s ease, transform 0.3s ease;
  margin-top: 0.2rem;
  margin-bottom: 0.8rem;
  cursor: default;
  padding: 0.3em 0.8em;
  border: 1px solid rgba(196,158,80,0.12);
  border-radius: 20px;
  background: rgba(196,158,80,0.04);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.weather-widget.visible { opacity: 1; }
.weather-widget:hover {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(196,158,80,0.25);
  background: rgba(196,158,80,0.07);
}
.weather-widget-icon { font-size: 0.8rem; line-height: 1; }
.weather-widget-sep {
  color: var(--accent-gold);
  opacity: 0.35;
  font-size: 0.45rem;
}

/* 雾效果 (CSS fallback) */
.weather-fog {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%; height: 35vh;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(to top, rgba(180,180,190,0.06), transparent);
  animation: fogDrift 30s ease-in-out infinite alternate;
}
.weather-fog.dense {
  height: 50vh;
  background: linear-gradient(to top, rgba(180,180,190,0.12), transparent);
}
[data-theme="light"] .weather-fog {
  background: linear-gradient(to top, rgba(120,120,130,0.06), transparent);
}
[data-theme="light"] .weather-fog.dense {
  background: linear-gradient(to top, rgba(120,120,130,0.1), transparent);
}
@keyframes fogDrift {
  0%   { transform: translateX(-3%); }
  100% { transform: translateX(3%); }
}

/* ============================================
   NPC 对话气泡 · NPC Encounters (v2)
   ============================================ */
.npc-bubble {
  position: absolute;
  max-width: 240px;
  padding: 10px 14px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(196,158,80,0.15);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 999;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  animation: npcBubbleIn 0.6s ease forwards;
  pointer-events: none;
}
.npc-bubble.fade-out {
  animation: npcBubbleOut 0.6s ease forwards;
}

.npc-bubble-line {
  font-family: 'IM Fell English', 'Noto Serif SC', serif;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.npc-bubble-sign {
  display: block;
  text-align: right;
  margin-top: 4px;
  font-size: 0.62rem;
  color: var(--accent-gold);
  opacity: 0.7;
  font-style: italic;
}

@keyframes npcBubbleIn {
  0%   { opacity: 0; transform: translateY(6px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes npcBubbleOut {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(0.96); }
}

/* 移动端NPC气泡：居中显示 */
@media (max-width: 768px) {
  .npc-bubble {
    max-width: 85%;
    left: 50% !important;
    transform: translateX(-50%) translateY(6px) scale(0.96);
  }
  .npc-bubble:not(.fade-out) {
    animation: npcBubbleInMobile 0.6s ease forwards;
  }
  .npc-bubble.fade-out {
    animation: npcBubbleOutMobile 0.6s ease forwards;
  }
}
@keyframes npcBubbleInMobile {
  0%   { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.96); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes npcBubbleOutMobile {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-4px) scale(0.96); }
}



/* ══════════════════════════════════════════
   今日风物 — Daily Scenery Card
   ══════════════════════════════════════════ */

/* 风物卡片正面 */
.de-scenery .de-card-front {
  background: linear-gradient(160deg, rgba(60,130,120,0.15), rgba(20,20,30,0.35));
  border: 1px solid rgba(100,180,150,0.2);
  overflow: hidden;
  position: relative;
}
[data-theme="light"] .de-scenery .de-card-front {
  background: linear-gradient(160deg, rgba(100,180,150,0.12), rgba(60,130,120,0.06));
  border-color: rgba(100,180,150,0.22);
}
.de-scenery .de-card-back {
  background: linear-gradient(160deg, rgba(60,130,120,0.15), rgba(20,20,30,0.35));
  border: 1px solid rgba(100,180,150,0.2);
}
[data-theme="light"] .de-scenery .de-card-back {
  background: linear-gradient(160deg, rgba(100,180,150,0.12), rgba(60,130,120,0.06));
  border-color: rgba(100,180,150,0.22);
}
.de-scenery .de-divider { background: rgba(100,180,150,0.35); }

.de-scenery-emoji {
  font-size: 2.4rem;
  margin: 0.3rem 0;
  animation: deSceneryFloat 4s ease-in-out infinite;
}
@keyframes deSceneryFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.de-scenery-name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 0.15rem;
}
.de-scenery-region {
  font-size: 0.68rem;
  opacity: 0.5;
  letter-spacing: 1px;
}
.de-scenery-desc {
  font-size: 0.75rem;
  line-height: 1.6;
  opacity: 0.7;
  margin-top: 0.3rem;
}
.de-scenery-vibe {
  font-size: 0.65rem;
  opacity: 0.4;
  letter-spacing: 2px;
  margin-top: 0.5rem;
  text-transform: uppercase;
}
/* 风物卡片背面 */
.de-scenery-back-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.de-scenery-back-country {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}
.de-scenery-back-desc {
  font-size: 0.72rem;
  line-height: 1.6;
  opacity: 0.65;
  margin-bottom: 0.8rem;
}
.de-scenery-map-btn {
  display: inline-block;
  padding: 0.45rem 1.2rem;
  border-radius: 20px;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(100,180,150,0.3);
  background: rgba(100,180,150,0.1);
  color: inherit;
  text-decoration: none;
}
.de-scenery-map-btn:hover {
  background: rgba(100,180,150,0.25);
  border-color: rgba(100,180,150,0.5);
  transform: scale(1.05);
}
.de-scenery-flip-hint {
  font-size: 0.6rem;
  opacity: 0.3;
  margin-top: 0.8rem;
  letter-spacing: 1px;
}
/* 修复翻转卡片点击穿透 — 翻转后front不拦截事件 */
.de-card.de-flipped .de-card-front {
  pointer-events: none;
}
.de-card.de-flipped .de-card-back {
  pointer-events: auto;
}
.de-card:not(.de-flipped) .de-card-back {
  pointer-events: none;
}


/* ── 风物粒子动画层 ── */
.de-scenery-anim {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 12px;
  z-index: 0;
}
.de-scenery .de-card-front > *:not(.de-scenery-anim) {
  position: relative;
  z-index: 1;
}

/* 粒子基础 */
.scenery-particle {
  position: absolute;
  pointer-events: none;
}

/* ❄️ snow */
.sp-snow {
  width: 3px; height: 3px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: spSnow linear infinite;
}
@keyframes spSnow {
  0% { transform: translateY(-10px) translateX(0); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.5; }
  100% { transform: translateY(300px) translateX(20px); opacity: 0; }
}

/* 🌧️ rain */
.sp-rain {
  width: 1px; height: 8px;
  background: linear-gradient(transparent, rgba(150,200,255,0.5));
  animation: spRain linear infinite;
}
@keyframes spRain {
  0% { transform: translateY(-10px) rotate(15deg); opacity: 0; }
  10% { opacity: 0.6; }
  100% { transform: translateY(300px) rotate(15deg); opacity: 0; }
}

/* 🌊 wave */
.sp-wave {
  width: 30px; height: 2px;
  background: rgba(100,200,255,0.25);
  border-radius: 50%;
  animation: spWave ease-in-out infinite;
}
@keyframes spWave {
  0%,100% { transform: translateX(0) scaleX(1); opacity: 0.2; }
  50% { transform: translateX(10px) scaleX(1.3); opacity: 0.45; }
}

/* 🍃 leaf */
.sp-leaf {
  font-size: 10px;
  animation: spLeaf ease-in-out infinite;
}
.sp-leaf::after { content: "🍃"; }
@keyframes spLeaf {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 0; }
  20% { opacity: 0.6; }
  100% { transform: translateY(280px) rotate(360deg) translateX(30px); opacity: 0; }
}

/* ☁️ cloud */
.sp-cloud {
  width: 30px; height: 10px;
  background: rgba(200,200,220,0.12);
  border-radius: 10px;
  animation: spCloud linear infinite;
}
@keyframes spCloud {
  0% { transform: translateX(-40px); opacity: 0; }
  20% { opacity: 0.2; }
  80% { opacity: 0.15; }
  100% { transform: translateX(220px); opacity: 0; }
}

/* ⭐ star */
.sp-star {
  width: 2px; height: 2px;
  background: rgba(255,215,0,0.6);
  border-radius: 50%;
  animation: spStar ease-in-out infinite;
}
@keyframes spStar {
  0%,100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.5); }
}

/* 🏜️ sand */
.sp-sand {
  width: 2px; height: 2px;
  background: rgba(210,180,120,0.4);
  border-radius: 50%;
  animation: spSand linear infinite;
}
@keyframes spSand {
  0% { transform: translateX(-20px) translateY(0); opacity: 0; }
  20% { opacity: 0.5; }
  100% { transform: translateX(200px) translateY(10px); opacity: 0; }
}

/* 🌫️ mist */
.sp-mist {
  width: 60px; height: 20px;
  background: rgba(200,200,220,0.08);
  border-radius: 20px;
  animation: spMist ease-in-out infinite;
  filter: blur(4px);
}
@keyframes spMist {
  0% { transform: translateX(-30px); opacity: 0; }
  50% { opacity: 0.15; }
  100% { transform: translateX(30px); opacity: 0; }
}

/* 🔥 fire */
.sp-fire {
  width: 4px; height: 6px;
  background: radial-gradient(rgba(255,100,0,0.5), transparent);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: spFire ease-out infinite;
}
@keyframes spFire {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-40px) scale(0.3); opacity: 0; }
}

/* 🌌 aurora */
.sp-aurora {
  width: 80px; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(0,255,120,0.15), rgba(0,200,255,0.1), transparent);
  animation: spAurora ease-in-out infinite;
}
@keyframes spAurora {
  0%,100% { transform: translateX(-20px) scaleX(0.8); opacity: 0.1; }
  50% { transform: translateX(20px) scaleX(1.2); opacity: 0.3; }
}

/* 🌸 sakura */
.sp-sakura {
  font-size: 10px;
  animation: spSakura ease-in-out infinite;
}
.sp-sakura::after { content: "🌸"; }
@keyframes spSakura {
  0% { transform: translateY(-10px) rotate(0deg) translateX(0); opacity: 0; }
  20% { opacity: 0.7; }
  100% { transform: translateY(280px) rotate(720deg) translateX(40px); opacity: 0; }
}

/* 🏮 lantern */
.sp-lantern {
  width: 3px; height: 4px;
  background: rgba(255,100,50,0.4);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255,100,50,0.2);
  animation: spLantern ease-in-out infinite;
}
@keyframes spLantern {
  0%,100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-15px); opacity: 0.6; }
}

/* 🦋 butterfly */
.sp-butterfly {
  font-size: 8px;
  animation: spButterfly ease-in-out infinite;
}
.sp-butterfly::after { content: "🦋"; }
@keyframes spButterfly {
  0%,100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(15px) translateY(-10px); }
  50% { transform: translateX(30px) translateY(5px); }
  75% { transform: translateX(15px) translateY(-5px); }
}

/* ✨ firefly */
.sp-firefly {
  width: 3px; height: 3px;
  background: rgba(200,255,100,0.6);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(200,255,100,0.3);
  animation: spFirefly ease-in-out infinite;
}
@keyframes spFirefly {
  0%,100% { opacity: 0.1; transform: translate(0,0); }
  25% { opacity: 0.7; transform: translate(10px,-8px); }
  50% { opacity: 0.2; transform: translate(20px,3px); }
  75% { opacity: 0.6; transform: translate(5px,-5px); }
}

/* 塔罗符号背景光晕 */
.de-tarot-symbol::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tarot-color, #c9a84c) 15%, transparent), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.de-tarot-symbol {
  position: relative;
}

/* 星语文字光晕 */
.de-star-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 40px;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--star-color, #d2b982) 8%, transparent), transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(8px);
}
.de-star-text {
  position: relative;
}

/* ── 星语 emoji 浮动动画（仿照风物） ── */
.de-star-emoji { display: none !important;
  font-size: 2rem;
  margin: 0.2rem 0;
  animation: deStarEmojiFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--star-color, #d2b982) 40%, transparent));
}
@keyframes deStarEmojiFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.05); }
}



/* ================================================
   LUMINA v2 (拾光集) — Film Strip + Masonry Gallery
   ================================================ */

/* ── Header ── */
.lumina-header {
  text-align: center;
  padding: 100px 20px 40px;
  position: relative;
}
.lumina-title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 2.2rem;
  color: var(--accent-gold);
  letter-spacing: 0.35em;
  margin-bottom: 0.6rem;
  animation: heroReveal 0.8s ease both;
}
.lumina-ornament {
  display: inline-block;
  color: var(--accent-gold-bright);
  animation: ornamentPulse 3s ease-in-out infinite;
  margin: 0 0.3em;
  font-size: 0.7em;
  vertical-align: middle;
}
.lumina-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--text-secondary);
  text-transform: uppercase;
  animation: heroReveal 0.8s ease 0.2s both;
}
.lumina-divider {
  margin: 1rem 0;
  color: var(--border-color);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  animation: heroReveal 0.8s ease 0.4s both;
}
.lumina-desc {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  animation: heroReveal 0.8s ease 0.6s both;
}

/* ── Film Strip 胶片区域 v2 — 更大尺寸 ── */
.film-strip {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 40px 0 70px;
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.film-strip-inner {
  background: #1a1510;
  border-top: 1px solid rgba(196,158,80,0.18);
  border-bottom: 1px solid rgba(196,158,80,0.18);
  padding: 0;
  position: relative;
}

/* 齿孔行 */
.film-sprockets {
  display: flex;
  gap: 24px;
  padding: 8px 0;
  justify-content: flex-start;
  overflow: hidden;
  height: 22px;
  align-items: center;
  position: relative;
}
.film-sprockets::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(196,158,80,0.12);
}
.film-sprockets-top::before { bottom: 0; }
.film-sprockets-bottom::before { top: 0; }

.film-sprocket-hole {
  width: 14px;
  height: 16px;
  border-radius: 2px;
  background: var(--bg-primary);
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

/* 帧轨道包裹 */
.film-track-wrap {
  overflow: hidden;
  position: relative;
}

/* 帧轨道 - JS驱动无缝循环，不再用CSS animation */
.film-track {
  display: flex;
  gap: 0;
  will-change: transform;
}

/* 单个胶片帧 — v2 更大 */
/* 单个胶片帧 — v3 带边界标识 */
.film-frame {
  flex-shrink: 0;
  width: 580px;
  padding: 18px 24px 22px;
  cursor: pointer;
  position: relative;
  transition: filter 0.3s ease;
}
.film-frame:hover {
  filter: brightness(1.15);
}

/* ── 帧间分隔条 ── */
.film-frame-divider {
  position: absolute;
  right: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(196,158,80,0.06) 15%,
    rgba(196,158,80,0.25) 50%,
    rgba(196,158,80,0.06) 85%,
    transparent 100%
  );
}
/* 分隔条中央的菱形装饰 */
.film-frame-divider::after {
  content: '◇';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6px;
  color: rgba(196,158,80,0.35);
  text-shadow: 0 0 4px rgba(196,158,80,0.2);
}

/* ── 帧编号标记 ── */
.film-frame-number {
  position: absolute;
  top: 4px;
  left: 20px;
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: rgba(196,158,80,0.3);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 2;
}
/* 右下角的标记码 */
.film-frame-code {
  position: absolute;
  bottom: 3px;
  right: 22px;
  font-family: 'Courier New', monospace;
  font-size: 0.42rem;
  letter-spacing: 0.15em;
  color: rgba(196,158,80,0.2);
  pointer-events: none;
}

/* 帧内图片区域 */
.film-frame-images {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  border-radius: 2px;
  overflow: hidden;
}
.film-frame-img {
  flex: 1;
  height: 300px;
  object-fit: cover;
  display: block;
  background: #0d0a06;
}

/* 帧内文字 */
.film-frame-text {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 6px;
  opacity: 0.9;
}

.film-frame-date {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-align: center;
  margin-top: 5px;
  text-transform: uppercase;
}

/* 胶片颗粒感 */
.film-strip-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  pointer-events: none;
  z-index: 1;
}

/* ── Section Title ── */
.lumina-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 20px;
  color: var(--border-color);
  font-size: 0.8rem;
}
.lumina-section-line {
  width: 80px;
  height: 1px;
  background: var(--border-color);
}
.lumina-section-heading {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  color: var(--accent-gold);
  margin: 0.8rem 0 0.3rem;
}
.lumina-section-sub {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 50px;
}

/* ════════════════════════════════════════
   小红书瀑布流双列交错布局
   ════════════════════════════════════════ */
/* ══ 5列 CSS Grid 布局 — 双图占2列，横竖版自适应 ══ */
.lumina-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  /* JS masonry 接管布局，不再使用 CSS Grid */
}

/* 双图光帧：宽度和位置由JS masonry计算 */
.lumina-card.card-dual {
  /* grid-column: span 2; — 已由JS masonry接管 */
}

/* 隐藏旧的flex列容器（保留兼容） */
.lumina-masonry-col {
  display: none;
}
.lumina-masonry {
  display: none;
}

/* ══════════════════════════════════════════
   光帧卡片 — 5列Grid适配 v4
   单图1列，双图2列(span 2)
   横版图矮 / 竖版图高，交错展示
   ══════════════════════════════════════════ */
.lumina-card {
  background: var(--bg-card);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  position: absolute;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease, border-color 0.3s ease,
              top 0.4s ease, left 0.4s ease;
  /* JS masonry 设置 top/left/width */
}
.lumina-card.revealed {
  opacity: 1;
  transform: translateY(0);
}
.lumina-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 14px 40px rgba(0,0,0,0.28), 0 0 0 1px rgba(196,158,80,0.2);
  border-color: rgba(196,158,80,0.35);
  z-index: 10;
}

/* ── 封面图区域 ── */
.lumina-card-cover {
  position: relative;
  overflow: hidden;
  background: #0d0a06;
}

/* 封面图通用 */
.lumina-card-cover img {
  width: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  /* 默认 aspect-ratio，图片加载后由 orient class 覆盖 */
  aspect-ratio: 4/3;
}
.lumina-card:hover .lumina-card-cover img {
  transform: scale(1.03);
}

/* 单图 — 根据横竖版动态 aspect-ratio */
.lumina-card-cover.cover-single.orient-portrait img {
  aspect-ratio: 3/4;
}
.lumina-card-cover.cover-single.orient-landscape img {
  aspect-ratio: 16/10;
}
.lumina-card-cover.cover-single.orient-square img {
  aspect-ratio: 1/1;
}

/* 双图 — 并排展示（占2列所以有空间） */
.lumina-card-cover.cover-dual {
  display: flex;
  gap: 3px;
}
.lumina-card-cover.cover-dual img {
  flex: 1;
  min-width: 0;
}
.lumina-card-cover.cover-dual.orient-portrait img {
  aspect-ratio: 3/4;
}
.lumina-card-cover.cover-dual.orient-landscape img {
  aspect-ratio: 16/10;
}
.lumina-card-cover.cover-dual.orient-square img {
  aspect-ratio: 1/1;
}

/* 多图指示器 — 右上角数量角标 */
.lumina-card-img-count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 16px;
  z-index: 3;
  pointer-events: none;
}

/* ── 卡片底部信息区 ── */
.lumina-card-info {
  padding: 12px 14px 14px;
}

.lumina-card-text {
  font-family: 'Crimson Text', 'IM Fell English', serif;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* 双图卡片文字可以显示更多 */
.lumina-card.card-dual .lumina-card-text {
  -webkit-line-clamp: 3;
}

/* 底部元数据行 */
.lumina-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lumina-card-date {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.lumina-card-ornament {
  font-size: 0.5rem;
  color: rgba(196,158,80,0.3);
  letter-spacing: 0.25em;
}

/* 封面底部渐变 */
.lumina-card-cover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.12), transparent);
  pointer-events: none;
  z-index: 1;
}

/* 卡片边框金色微光 */
.lumina-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(196,158,80,0);
  transition: box-shadow 0.4s ease;
  pointer-events: none;
}
.lumina-card:hover::after {
  box-shadow: inset 0 0 0 1px rgba(196,158,80,0.28);
}

/* 保留旧的 .lumina-list 供兼容 */
.lumina-list {
  display: none;
}

/* ── Empty ── */
.lumina-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.lumina-empty-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: ornamentPulse 3s ease-in-out infinite;
  color: var(--accent-gold);
}
.lumina-empty-hint {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ── 卷尾装饰 ── */
.lumina-scroll-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 40px 0 80px;
}
.lumina-scroll-line {
  width: 60px;
  height: 1px;
  background: var(--border-color);
}
.lumina-scroll-emblem {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Lightbox ── */
.lumina-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lumina-lightbox.active {
  display: flex;
}

.lumina-lightbox-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeIn 0.3s ease;
}

.lumina-lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  max-width: 92vw;
  max-height: 88vh;
  animation: panelSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lumina-lightbox-img {
  max-width: 88vw;
  max-height: 75vh;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 16px 64px rgba(0,0,0,0.5);
}

.lumina-lightbox-close {
  position: absolute;
  top: -40px;
  right: -10px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2;
}
.lumina-lightbox-close:hover { color: var(--accent-gold); }

.lumina-lightbox-prev,
.lumina-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(196,158,80,0.2);
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.lumina-lightbox-prev { left: -60px; }
.lumina-lightbox-next { right: -60px; }
.lumina-lightbox-prev:hover,
.lumina-lightbox-next:hover {
  background: rgba(196,158,80,0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.lumina-lightbox-caption {
  margin-top: 16px;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  max-width: 500px;
}

/* ── 管理后台 featured 开关样式 ── */
.lumina-featured-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.lumina-featured-toggle.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}
.lumina-featured-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.lumina-featured-toggle.active::after {
  transform: translateX(16px);
}

/* ── 响应式 ── */
@media (max-width: 768px) {
  .lumina-title { font-size: 1.6rem; letter-spacing: 0.25em; }
  .film-frame { width: 360px; }
  .film-frame-img { height: 180px; }
  .lumina-grid {
    padding: 0 12px;
  }
  .lumina-card-info {
    padding: 10px 12px 12px;
  }
  .lumina-card-text {
    font-size: 0.82rem;
  }
  .lumina-lightbox-prev { left: 8px; }
  .lumina-lightbox-next { right: 8px; }
  .lumina-lightbox-prev,
  .lumina-lightbox-next {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .lumina-title { font-size: 1.3rem; }
  .film-frame { width: 300px; padding: 10px 14px 14px; }
  .film-frame-img { height: 150px; }
  .lumina-grid {
    padding: 0 8px;
  }
  .lumina-card-text { font-size: 0.8rem; }
  .lumina-card-info { padding: 8px 10px 10px; }
}

/* ── Light mode overrides ── */
[data-theme="light"] .film-strip-inner {
  background: #e8dcbe;
  border-top-color: rgba(154,110,32,0.2);
  border-bottom-color: rgba(154,110,32,0.2);
}
[data-theme="light"] .film-sprocket-hole {
  background: var(--bg-primary);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}
[data-theme="light"] .film-frame {
  border-right-color: rgba(154,110,32,0.1);
}
[data-theme="light"] .film-frame-img {
  background: #ddd0b0;
}
[data-theme="light"] .lumina-card {
  background: rgba(255,255,255,0.75);
  border-color: rgba(120,85,30,0.15);
}
[data-theme="light"] .lumina-card-cover {
  background: #ddd0b0;
}
[data-theme="light"] .lumina-card:hover {
  border-color: rgba(160,110,40,0.4);
  box-shadow: 0 14px 40px rgba(80,50,10,0.12);
}
[data-theme="light"] .lumina-card-img-count {
  background: rgba(255,255,255,0.7);
  color: #4a3010;
}
[data-theme="light"] .film-frame-number,
[data-theme="light"] .film-frame-code {
  color: rgba(120,85,30,0.3);
}
[data-theme="light"] .film-frame-divider {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(120,85,30,0.06) 15%,
    rgba(120,85,30,0.2) 50%,
    rgba(120,85,30,0.06) 85%,
    transparent 100%
  );
}
[data-theme="light"] .film-frame-divider::after {
  color: rgba(120,85,30,0.3);
}

/* ═══════════════════════════════════════════════════════
   卦堂 (DIVINATIO) — 梅花易数问卦页面样式
   ═══════════════════════════════════════════════════════ */
.div-hero { position:relative; min-height:100vh; display:flex; align-items:center; justify-content:center; overflow:hidden; padding:120px 20px 60px; }
.div-smoke-canvas { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:1; opacity:0.6; }
.div-hero-content { position:relative; z-index:2; text-align:center; }
.div-taiji-wrap { width:220px; height:220px; margin:0 auto 40px; position:relative; }
.div-taiji { width:100%; height:100%; animation:divTaijiSpin 30s linear infinite; filter:drop-shadow(0 0 30px rgba(196,158,80,0.3)); }
.div-bagua-ring { animation:divBaguaCounterSpin 30s linear infinite; }
@keyframes divTaijiSpin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes divBaguaCounterSpin { from{transform:rotate(0deg)} to{transform:rotate(-360deg)} }
.div-taiji-wrap::before { content:''; position:absolute; top:-20px; left:-20px; right:-20px; bottom:-20px; border:1px solid var(--accent-gold); border-radius:50%; opacity:0.15; animation:divRingPulse 4s ease-in-out infinite; }
.div-taiji-wrap::after { content:''; position:absolute; top:-40px; left:-40px; right:-40px; bottom:-40px; border:1px solid var(--accent-gold); border-radius:50%; opacity:0.08; animation:divRingPulse 4s ease-in-out infinite 2s; }
@keyframes divRingPulse { 0%,100%{transform:scale(1);opacity:0.08} 50%{transform:scale(1.05);opacity:0.2} }
.div-hero-title { font-family:'Cinzel',serif; font-size:4rem; letter-spacing:0.5em; color:var(--text-primary); margin-bottom:8px; display:flex; justify-content:center; gap:0.5em; }
.div-title-char { display:inline-block; animation:divCharFloat 3s ease-in-out infinite; animation-delay:calc(var(--i)*0.3s); text-shadow:0 0 40px rgba(196,158,80,0.4); }
@keyframes divCharFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.div-hero-latin { font-family:'Cinzel',serif; font-size:0.85rem; letter-spacing:1em; color:var(--accent-gold); opacity:0.5; margin-bottom:20px; }
.div-hero-ornament { color:var(--accent-gold); opacity:0.4; font-size:0.9rem; letter-spacing:0.3em; margin-bottom:16px; }
.div-hero-desc { font-size:1.15rem; color:var(--text-secondary); letter-spacing:0.3em; }

/* 引言区 */
.div-intro { max-width:950px; margin:-20px auto 60px; padding:0 24px; }
.div-intro-border { position:relative; border:1px solid var(--border-color); padding:40px 36px; background:var(--bg-card); backdrop-filter:blur(10px); }
.div-intro-corner { position:absolute; width:16px; height:16px; border-color:var(--accent-gold); border-style:solid; }
.div-intro-corner-tl { top:-1px; left:-1px; border-width:2px 0 0 2px; }
.div-intro-corner-tr { top:-1px; right:-1px; border-width:2px 2px 0 0; }
.div-intro-corner-bl { bottom:-1px; left:-1px; border-width:0 0 2px 2px; }
.div-intro-corner-br { bottom:-1px; right:-1px; border-width:0 2px 2px 0; }
.div-quote { text-align:center; margin-bottom:24px; padding-bottom:24px; border-bottom:1px solid var(--border-color); }
.div-quote p { font-size:1.15rem; font-style:italic; color:var(--accent-gold); line-height:2; letter-spacing:0.05em; }
.div-quote cite { display:block; margin-top:12px; font-size:0.85rem; color:var(--text-muted); font-style:normal; }
.div-intro-text p { font-size:0.95rem; color:var(--text-secondary); line-height:2; margin-bottom:8px; text-indent:2em; }
.div-intro-text strong { color:var(--accent-gold); }

/* 使用指引 */
.div-guide { max-width:900px; margin:0 auto 70px; padding:0 24px; }

/* 问卦须知 - 折叠横条 */
.div-guide-bar { max-width:1920px; margin:0 auto 16px; padding:0 40px; cursor:pointer; }
.div-guide-bar-inner { display:flex; align-items:center; justify-content:center; gap:12px; padding:8px 0; border:none; background:transparent; transition:all 0.3s ease; }
.div-guide-bar-inner:hover .div-guide-bar-text { color:var(--accent-gold); }
.div-guide-bar-inner:hover .div-guide-bar-hint { color:var(--text-secondary); }
.div-guide-bar-icon { display:none; }
.div-guide-bar-text { font-size:0.76rem; color:var(--text-muted); letter-spacing:0.2em; white-space:nowrap; transition:color 0.3s; opacity:0.7; }
.div-guide-bar-hint { font-size:0.7rem; color:var(--text-muted); letter-spacing:0.08em; opacity:0.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; transition:all 0.3s; }
.div-guide-bar-arrow { font-size:0.6rem; color:var(--text-muted); opacity:0.35; transition:transform 0.3s; }
.div-guide-expand { max-height:0; overflow:hidden; transition:max-height 0.4s ease; }
.div-guide-expand.open { }
.div-guide-items { display:grid; grid-template-columns:repeat(4,1fr); gap:0; padding:14px 0 6px; border-top:1px solid rgba(196,158,80,0.06); margin-top:6px; }
.div-guide-item { display:flex; align-items:flex-start; gap:10px; padding:10px 14px; }
.div-guide-item:last-child { }
.div-guide-item-icon { font-size:0.95rem; flex-shrink:0; margin-top:1px; opacity:0.5; }
.div-guide-item strong { display:block; font-size:0.76rem; color:var(--text-secondary); letter-spacing:0.08em; margin-bottom:2px; font-weight:500; }
.div-guide-item p { font-size:0.7rem; color:var(--text-muted); line-height:1.6; margin:0; opacity:0.7; }
.div-section-title { display:flex; align-items:center; justify-content:center; gap:20px; margin-bottom:12px; font-family:'Cinzel',serif; font-size:1.3rem; color:var(--text-primary); letter-spacing:0.3em; }
.div-section-line { width:60px; height:1px; background:linear-gradient(90deg,transparent,var(--accent-gold),transparent); }
.div-section-sub { text-align:center; font-family:'Cinzel',serif; font-size:0.75rem; letter-spacing:0.5em; color:var(--text-muted); margin-bottom:40px; }
.div-guide-cards { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.div-guide-card { background:var(--bg-card); border:1px solid var(--border-color); padding:28px 20px; text-align:center; transition:all 0.4s ease; position:relative; overflow:hidden; }
.div-guide-card::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:linear-gradient(90deg,transparent,var(--accent-gold),transparent); opacity:0; transition:opacity 0.4s; }
.div-guide-card:hover { border-color:var(--border-glow); transform:translateY(-4px); box-shadow:var(--shadow-gold); }
.div-guide-card:hover::before { opacity:1; }
.div-guide-icon { font-size:2rem; margin-bottom:14px; }
.div-guide-card h3 { font-family:'Cinzel',serif; font-size:1rem; color:var(--accent-gold); margin-bottom:10px; letter-spacing:0.2em; }
.div-guide-card p { font-size:0.85rem; color:var(--text-secondary); line-height:1.8; }

/* 卦帖长廊 */
.div-gallery { max-width:1920px; margin:0 auto 70px; padding:0 40px; }
.div-gallery-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:20px; }
.div-card { background:var(--bg-card); border:1px solid var(--border-color); cursor:pointer; transition:all 0.4s ease; position:relative; overflow:hidden; }
.div-card::before { content:''; position:absolute; top:0; left:0; width:100%; height:100%; background:radial-gradient(circle at 50% 0%,rgba(196,158,80,0.06) 0%,transparent 60%); opacity:0; transition:opacity 0.4s; }
.div-card:hover { border-color:var(--border-glow); transform:translateY(-3px); box-shadow:var(--shadow-gold); }
.div-card:hover::before { opacity:1; }
.div-card-header { padding:20px 24px 12px; display:flex; justify-content:space-between; align-items:flex-start; }
.div-card-cat { font-size:0.7rem; color:var(--accent-gold); border:1px solid var(--accent-gold); padding:2px 10px; letter-spacing:0.15em; opacity:0.8; }
.div-card-date { font-size:0.75rem; color:var(--text-muted); font-family:'Cinzel',serif; }
.div-card-question { padding:0 24px 16px; font-size:0.95rem; color:var(--text-primary); line-height:1.8; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.div-card-footer { padding:12px 24px; border-top:1px solid var(--border-color); display:flex; justify-content:space-between; align-items:center; }
.div-card-asker { font-size:0.8rem; color:var(--text-secondary); }
.div-card-asker::before { content:'\270E '; }
.div-card-gua { font-size:0.8rem; color:var(--accent-gold); letter-spacing:0.1em; }
.div-empty { text-align:center; padding:60px 20px; color:var(--text-muted); }
.div-empty-icon { font-size:3rem; margin-bottom:16px; opacity:0.3; }
.div-empty-hint { font-size:0.85rem; margin-top:8px; opacity:0.6; }

/* === 卦帖状态标记 === */
.div-card-status { font-size:0.6rem; padding:2px 8px; letter-spacing:0.1em; border-radius:0; }
.div-status-pending { color:var(--text-muted); border:1px solid var(--border-color); background:rgba(255,255,255,0.03); }
.div-status-answered { color:var(--accent-gold); border:1px solid var(--accent-gold); background:rgba(196,158,80,0.08); }
.div-card-header { gap:8px; flex-wrap:nowrap; align-items:center; }

/* 待解卡片封印效果 */
.div-card-pending { opacity:0.72; }
.div-card-pending:hover { opacity:0.92; }
.div-card-seal { position:absolute; top:0; left:0; width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; pointer-events:none; z-index:2; background:rgba(10,10,15,0.35); opacity:0; transition:opacity 0.4s; }
.div-card-pending:hover .div-card-seal { opacity:1; }
.div-card-seal span:first-child { font-size:1.5rem; margin-bottom:4px; }
.div-card-seal span:last-child { font-size:0.7rem; color:var(--text-muted); letter-spacing:0.15em; }

/* 卡片body：左边问题+右边迷你六爻 */
.div-card-body { display:flex; align-items:flex-start; padding:0 24px 16px; gap:12px; }
.div-card-body .div-card-question { padding:0; flex:1; min-width:0; }
.div-card-mini-gua { flex-shrink:0; }

/* 迷你六爻图 */
.mini-yao-stack { display:flex; flex-direction:column; gap:3px; padding:2px 0; }
.mini-yao { display:flex; align-items:center; gap:2px; height:5px; }
.mini-yang-bar { width:28px; height:3px; background:var(--text-muted); border-radius:1px; }
.mini-yin-bar { width:11px; height:3px; background:var(--text-muted); border-radius:1px; }
.mini-yin-gap { width:4px; }
.mini-dong .mini-yang-bar, .mini-dong .mini-yin-bar { background:var(--accent-gold); box-shadow:0 0 6px rgba(196,158,80,0.5); }

/* 弹窗增强 */
.div-modal-top-row { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.div-modal-status-pending { font-size:0.8rem; color:var(--text-muted); letter-spacing:0.1em; }
.div-modal-status-answered { font-size:0.8rem; color:var(--accent-gold); letter-spacing:0.1em; }
.div-modal-gua-trigrams { display:flex; justify-content:center; gap:24px; margin:12px 0 16px; }
.div-modal-trigram { font-size:0.82rem; color:var(--text-secondary); letter-spacing:0.05em; }
.div-modal-yao-wrap { display:flex; justify-content:center; margin:8px 0; }
.div-modal-yao-wrap .mh-yao-stack { transform:scale(0.85); }
.div-modal-dong-hint { text-align:center; font-size:0.75rem; color:var(--text-muted); margin-top:8px; letter-spacing:0.1em; }
.div-modal-interp-section { margin-bottom:24px; }
.div-modal-interp-title { font-family:'Cinzel',serif; font-size:0.8rem; color:var(--text-muted); letter-spacing:0.3em; text-align:center; margin-bottom:16px; padding-bottom:10px; border-bottom:1px solid var(--border-color); }

/* 待解弹窗提示 */
.div-modal-pending-hint { text-align:center; padding:32px 20px; margin-bottom:24px; border:1px dashed var(--border-color); background:rgba(196,158,80,0.02); }
.div-modal-pending-icon { font-size:2.5rem; margin-bottom:12px; animation:pendingPulse 3s ease-in-out infinite; }
.div-modal-pending-hint p { font-size:0.95rem; color:var(--text-secondary); letter-spacing:0.15em; margin:0; }
.div-modal-pending-sub { font-size:0.8rem !important; color:var(--text-muted) !important; margin-top:6px !important; opacity:0.7; }
@keyframes pendingPulse { 0%,100%{opacity:0.5;transform:scale(1)} 50%{opacity:1;transform:scale(1.08)} }


/* 求卦表单 */
.div-form-section { max-width:800px; margin:0 auto 70px; padding:0 24px; }

/* 递交卦帖 V2 */
.div-form-header { display:flex; align-items:center; justify-content:center; gap:20px; margin-bottom:28px; }
.div-form-header-line { width:60px; height:1px; background:linear-gradient(90deg,transparent,var(--accent-gold),transparent); }
.div-form-header-title { font-family:'Cinzel',serif; font-size:1.1rem; color:var(--text-primary); letter-spacing:0.3em; }
.div-form-v2 { background:var(--bg-card); border:1px solid var(--border-color); padding:32px 28px; backdrop-filter:blur(10px); position:relative; }
.div-form-v2::before { content:''; position:absolute; top:0; left:0; right:0; height:1px; background:linear-gradient(90deg,transparent,var(--accent-gold),transparent); }
.div-form-row { display:flex; gap:16px; margin-bottom:20px; }
.div-form-col { margin-bottom:20px; }
.div-form-col-half { flex:1; }
.div-form-label-v2 { display:block; font-size:0.82rem; color:var(--text-secondary); margin-bottom:8px; letter-spacing:0.08em; }
.div-form-opt { font-size:0.7rem; color:var(--text-muted); margin-left:4px; }
.div-form-req { color:var(--accent-gold); }
.div-form-input-v2 { width:100%; padding:10px 14px; background:var(--bg-secondary); border:1px solid var(--border-color); color:var(--text-primary); font-family:inherit; font-size:0.85rem; transition:all 0.3s; outline:none; box-sizing:border-box; }
.div-form-input-v2:focus { border-color:var(--accent-gold); box-shadow:0 0 8px rgba(196,158,80,0.12); }
.div-form-input-v2::placeholder { color:var(--text-muted); opacity:0.5; }
.div-form-textarea-v2 { width:100%; padding:12px 14px; background:var(--bg-secondary); border:1px solid var(--border-color); color:var(--text-primary); font-family:inherit; font-size:0.85rem; resize:vertical; min-height:100px; transition:all 0.3s; outline:none; line-height:1.8; box-sizing:border-box; }
.div-form-textarea-v2:focus { border-color:var(--accent-gold); box-shadow:0 0 8px rgba(196,158,80,0.12); }
.div-form-textarea-v2::placeholder { color:var(--text-muted); opacity:0.5; }
.div-form-meta { display:flex; justify-content:flex-end; margin-top:4px; }
.div-char-count-v2 { font-size:0.7rem; color:var(--text-muted); }
.div-cat-pills { display:flex; flex-wrap:wrap; gap:8px; }
.div-cat-pill { padding:5px 16px; border:1px solid var(--border-color); background:transparent; color:var(--text-secondary); font-family:inherit; font-size:0.8rem; cursor:pointer; transition:all 0.3s; letter-spacing:0.12em; border-radius:0; }
.div-cat-pill:hover { border-color:var(--accent-gold); color:var(--accent-gold); }
.div-cat-pill.active { border-color:var(--accent-gold); background:rgba(196,158,80,0.08); color:var(--accent-gold); }
.div-submit-btn-v2 { width:100%; padding:13px; background:transparent; border:1px solid var(--accent-gold); color:var(--accent-gold); font-family:'Cinzel',serif; font-size:0.95rem; letter-spacing:0.4em; cursor:pointer; transition:all 0.4s; position:relative; overflow:hidden; }
.div-submit-btn-v2::before { content:''; position:absolute; top:0; left:-100%; width:100%; height:100%; background:linear-gradient(90deg,transparent,rgba(196,158,80,0.08),transparent); transition:left 0.6s; }
.div-submit-btn-v2:hover { background:rgba(196,158,80,0.06); box-shadow:0 0 20px rgba(196,158,80,0.12); }
.div-submit-btn-v2:hover::before { left:100%; }
.div-submit-btn-v2:disabled { opacity:0.4; cursor:not-allowed; }
.div-form-footer-note { text-align:center; font-size:0.75rem; color:var(--text-muted); margin-top:16px; letter-spacing:0.05em; }
.div-form-wrap { margin-top:10px; }
.div-form-border { position:relative; border:1px solid var(--border-color); padding:36px 32px; background:var(--bg-card); backdrop-filter:blur(10px); }
.div-form-corner { position:absolute; width:20px; height:20px; border-color:var(--accent-gold); border-style:solid; }
.div-form-corner-tl { top:-1px; left:-1px; border-width:2px 0 0 2px; }
.div-form-corner-tr { top:-1px; right:-1px; border-width:2px 2px 0 0; }
.div-form-corner-bl { bottom:-1px; left:-1px; border-width:0 0 2px 2px; }
.div-form-corner-br { bottom:-1px; right:-1px; border-width:0 2px 2px 0; }
.div-form-group { margin-bottom:24px; }
.div-form-label { display:block; font-size:0.9rem; color:var(--text-primary); margin-bottom:8px; letter-spacing:0.1em; }
.div-label-icon { margin-right:4px; }
.div-optional { font-size:0.75rem; color:var(--text-muted); font-style:italic; }
.div-required { color:var(--accent-crimson-bright); }
.div-form-input { width:100%; padding:12px 16px; background:var(--bg-secondary); border:1px solid var(--border-color); color:var(--text-primary); font-family:inherit; font-size:0.9rem; transition:all 0.3s; outline:none; }
.div-form-input:focus { border-color:var(--accent-gold); box-shadow:0 0 12px rgba(196,158,80,0.15); }
.div-form-input::placeholder { color:var(--text-muted); opacity:0.6; }
.div-form-textarea { width:100%; padding:14px 16px; background:var(--bg-secondary); border:1px solid var(--border-color); color:var(--text-primary); font-family:inherit; font-size:0.9rem; resize:vertical; min-height:120px; transition:all 0.3s; outline:none; line-height:1.8; }
.div-form-textarea:focus { border-color:var(--accent-gold); box-shadow:0 0 12px rgba(196,158,80,0.15); }
.div-form-textarea::placeholder { color:var(--text-muted); opacity:0.6; }
.div-char-count { text-align:right; font-size:0.75rem; color:var(--text-muted); margin-top:4px; }
.div-category-tags { display:flex; flex-wrap:wrap; gap:10px; }
.div-cat-tag { padding:6px 18px; border:1px solid var(--border-color); background:transparent; color:var(--text-secondary); font-family:inherit; font-size:0.85rem; cursor:pointer; transition:all 0.3s; letter-spacing:0.15em; }
.div-cat-tag:hover { border-color:var(--accent-gold); color:var(--accent-gold); }
.div-cat-tag.active { border-color:var(--accent-gold); background:rgba(196,158,80,0.1); color:var(--accent-gold); }
.div-submit-btn { width:100%; padding:16px; background:linear-gradient(135deg,rgba(196,158,80,0.15),rgba(196,158,80,0.05)); border:1px solid var(--accent-gold); color:var(--accent-gold); font-family:'Cinzel',serif; font-size:1.1rem; letter-spacing:0.4em; cursor:pointer; transition:all 0.4s; display:flex; align-items:center; justify-content:center; gap:12px; position:relative; overflow:hidden; }
.div-submit-btn::before { content:''; position:absolute; top:0; left:-100%; width:100%; height:100%; background:linear-gradient(90deg,transparent,rgba(196,158,80,0.1),transparent); transition:left 0.6s; }
.div-submit-btn:hover { background:linear-gradient(135deg,rgba(196,158,80,0.25),rgba(196,158,80,0.1)); box-shadow:var(--shadow-gold); transform:translateY(-2px); }
.div-submit-btn:hover::before { left:100%; }
.div-submit-btn:disabled { opacity:0.5; cursor:not-allowed; transform:none; }
.div-submit-icon { font-size:1.2rem; }
.div-form-note { margin-top:16px; text-align:center; }
.div-form-note p { font-size:0.8rem; color:var(--text-muted); }

/* 起卦仪式 Overlay */
.div-ritual-overlay { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.92); z-index:10000; display:none; align-items:center; justify-content:center; opacity:0; transition:opacity 0.6s; }
.div-ritual-overlay.active { display:flex; opacity:1; }
.div-ritual-content { text-align:center; }
.div-ritual-taiji { width:120px; height:120px; margin:0 auto 40px; }
.div-ritual-svg { width:100%; height:100%; animation:divTaijiSpin 3s linear infinite; }
.div-ritual-yao { display:flex; flex-direction:column-reverse; align-items:center; gap:8px; margin-bottom:30px; min-height:120px; }
.div-yao-line { display:flex; gap:6px; opacity:0; transform:scale(0.5); transition:all 0.5s ease; }
.div-yao-line.visible { opacity:1; transform:scale(1); }
.div-yao-segment { width:36px; height:5px; background:var(--accent-gold); box-shadow:0 0 8px rgba(196,158,80,0.4); }
.div-yao-gap { width:8px; }
.div-ritual-text { font-size:1rem; color:var(--accent-gold); letter-spacing:0.3em; animation:divTextPulse 2s ease-in-out infinite; }
@keyframes divTextPulse { 0%,100%{opacity:0.6} 50%{opacity:1} }

/* 卦帖详情 Modal */
.div-modal-mask { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.7); z-index:9998; display:none; opacity:0; transition:opacity 0.4s; backdrop-filter:blur(4px); }
.div-modal-mask.active { display:block; opacity:1; }
.div-modal { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%) scale(0.9); width:90%; max-width:600px; max-height:85vh; background:var(--bg-secondary); border:1px solid var(--border-color); z-index:9999; display:none; opacity:0; overflow-y:auto; transition:all 0.4s ease; }
.div-modal.active { display:block; opacity:1; transform:translate(-50%,-50%) scale(1); }
.div-modal-close { position:sticky; top:12px; float:right; margin:12px; background:none; border:1px solid var(--border-color); color:var(--text-secondary); width:32px; height:32px; font-size:1rem; cursor:pointer; transition:all 0.3s; z-index:1; }
.div-modal-close:hover { border-color:var(--accent-gold); color:var(--accent-gold); }
.div-modal-content { padding:40px 36px; }
.div-modal-cat { display:inline-block; font-size:0.7rem; color:var(--accent-gold); border:1px solid var(--accent-gold); padding:2px 12px; letter-spacing:0.15em; margin-bottom:16px; }
.div-modal-question { font-size:1.1rem; color:var(--text-primary); line-height:2; margin-bottom:20px; padding-bottom:20px; border-bottom:1px solid var(--border-color); }
.div-modal-meta { display:flex; justify-content:space-between; font-size:0.8rem; color:var(--text-muted); margin-bottom:24px; }
.div-modal-gua-section { text-align:center; margin-bottom:24px; padding:20px; border:1px solid var(--border-color); background:rgba(196,158,80,0.03); }
.div-modal-gua-title { font-family:'Cinzel',serif; font-size:0.8rem; color:var(--text-muted); letter-spacing:0.3em; margin-bottom:10px; }
.div-modal-gua-name { font-size:1.5rem; color:var(--accent-gold); letter-spacing:0.2em; margin-bottom:4px; }
.div-modal-gua-symbol { font-size:2rem; color:var(--accent-gold); opacity:0.6; }
.div-modal-interpretation { font-size:0.95rem; color:var(--text-secondary); line-height:2; margin-bottom:24px; }
.div-modal-interpretation p { margin-bottom:8px; text-indent:2em; }
.div-modal-blessing { text-align:center; padding:16px 20px; border:1px dashed var(--accent-gold); background:rgba(196,158,80,0.03); font-style:italic; color:var(--accent-gold); font-size:0.9rem; letter-spacing:0.1em; opacity:0.9; }
.div-scroll-end { display:flex; align-items:center; justify-content:center; gap:16px; padding:40px 0 60px; }
.div-scroll-line { width:100px; height:1px; background:linear-gradient(90deg,transparent,var(--accent-gold),transparent); opacity:0.3; }
.div-scroll-emblem { color:var(--accent-gold); opacity:0.3; font-size:1.2rem; }

/* 响应式 */
@media(max-width:1400px) {
  .div-gallery-grid { grid-template-columns:repeat(4,1fr); }
}
@media(max-width:1000px) {
  .div-gallery-grid { grid-template-columns:repeat(3,1fr); }
}
@media(max-width:768px) {
  .div-hero-title { font-size:2.8rem; }
  .div-taiji-wrap { width:160px; height:160px; }
  .div-guide-cards { grid-template-columns:repeat(2,1fr); }
  .div-gallery-grid { grid-template-columns:repeat(2,1fr); }
  .div-form-v2 { padding:24px 18px; }
  .div-form-row { flex-direction:column; gap:0; }
  .div-guide-items { grid-template-columns:repeat(2,1fr); }
  .div-intro-border { padding:28px 20px; }
}
@media(max-width:480px) {
  .div-hero-title { font-size:2.2rem; letter-spacing:0.3em; }
  .div-taiji-wrap { width:130px; height:130px; }
  .div-guide-cards { grid-template-columns:1fr; }
  .div-guide-items { grid-template-columns:1fr; }
  .div-guide-bar-hint { display:none; }
  .div-gallery-grid { grid-template-columns:repeat(1,1fr); }
  .div-hero-latin { font-size:0.7rem; }
}


/* ================================================================
   梅花易数·卦象卡片系统
   ================================================================ */
.adm-div-card {
  border: 1px solid var(--border-color);
  padding: 16px;
  margin-bottom: 16px;
  background: var(--bg-card);
}
.mh-section {
  margin: 16px 0 4px;
  padding: 16px;
  border: 1px solid rgba(196,158,80,0.2);
  background: rgba(196,158,80,0.03);
}
.mh-title-bar {
  color: var(--accent-gold);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  opacity: 0.9;
}
.mh-title-icon {
  margin-right: 4px;
}
.mh-lunar-info {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

/* 卡片组 */
.mh-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
.mh-card {
  border: 1px solid var(--border-color);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-primary);
  position: relative;
}
.mh-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196,158,80,0.15);
}
.mh-card-active {
  border-color: var(--accent-gold) !important;
  background: rgba(196,158,80,0.08) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 16px rgba(196,158,80,0.25) !important;
  opacity: 1 !important;
}
.mh-card-dim {
  opacity: 0.4;
}
.mh-card-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.15em;
}
.mh-card-symbol {
  font-size: 1.4rem;
  margin: 4px 0;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.mh-sym-upper {
  font-size: 1.6rem;
  line-height: 1.1;
}
.mh-sym-lower {
  font-size: 1.6rem;
  line-height: 1.1;
  opacity: 0.75;
}
.mh-card-name {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin: 6px 0 4px;
  font-weight: 500;
}
.mh-card-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* 卡片颜色主题 */
.mh-card-ben { border-color: rgba(196,158,80,0.3); }
.mh-card-ben .mh-card-symbol { color: var(--accent-gold); }
.mh-card-hu { border-color: rgba(100,160,200,0.3); }
.mh-card-hu .mh-card-symbol { color: rgba(100,160,200,0.8); }
.mh-card-bian { border-color: rgba(200,80,80,0.3); }
.mh-card-bian .mh-card-symbol { color: rgba(200,100,100,0.8); }
.mh-card-tiyong { border-color: rgba(160,140,100,0.3); }
.mh-card-tiyong .mh-card-symbol { color: rgba(180,160,100,0.8); font-size: 1.1rem; }

/* 详情面板 */
.mh-detail {
  border: 1px solid rgba(196,158,80,0.25);
  background: rgba(196,158,80,0.03);
  padding: 20px;
  margin-top: 8px;
  animation: mhFadeIn 0.3s ease;
}
@keyframes mhFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mh-detail-header {
  color: var(--accent-gold);
  font-size: 1rem;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.mh-detail-icon {
  margin-right: 6px;
}
.mh-detail-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: normal;
}
.mh-detail-body {
  color: var(--text-primary);
}
.mh-detail-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.mh-detail-left {
  flex: 0 0 auto;
  min-width: 160px;
}
.mh-detail-right {
  flex: 1;
}

/* 六爻可视化 */
.mh-yao-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
}
.mh-yao-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 20px;
}
.mh-yao-sep {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.mh-yao-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}
.mh-yao-line {
  display: flex;
  align-items: center;
  width: 100px;
  height: 6px;
  gap: 0;
}
.mh-yang .mh-yang-bar {
  width: 100%;
  height: 5px;
  background: var(--text-primary);
  border-radius: 1px;
}
.mh-yin .mh-yin-bar {
  width: 42%;
  height: 5px;
  background: var(--text-secondary);
  border-radius: 1px;
}
.mh-yin .mh-yin-gap {
  width: 16%;
  height: 5px;
}
.mh-dong .mh-yang-bar,
.mh-dong .mh-yin-bar {
  background: var(--accent-gold) !important;
  box-shadow: 0 0 8px rgba(196,158,80,0.5);
  animation: mhPulse 1.5s ease-in-out infinite;
}
@keyframes mhPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(196,158,80,0.5); }
  50%      { opacity: 0.6; box-shadow: 0 0 16px rgba(196,158,80,0.8); }
}
.mh-dong-mark {
  font-size: 0.6rem;
  color: var(--accent-gold);
  margin-left: 4px;
  animation: mhPulse 1.5s ease-in-out infinite;
}

/* 信息项 */
.mh-info-item {
  display: flex;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 8px;
}
.mh-info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 40px;
  flex-shrink: 0;
}
.mh-info-val {
  font-size: 0.9rem;
  color: var(--text-primary);
}
.mh-info-val em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--accent-gold);
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid rgba(196,158,80,0.3);
  border-radius: 2px;
}
.mh-dong-text {
  color: var(--accent-gold) !important;
  font-weight: 500;
}

/* 起卦计算过程 */
.mh-calc-trace {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  line-height: 1.8;
  opacity: 0.7;
}

/* 体用关系 */
.mh-tiyong-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 8px 0 16px;
}
.mh-ty-box {
  text-align: center;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  min-width: 100px;
  background: var(--bg-primary);
}
.mh-ty-ti { border-color: rgba(196,158,80,0.4); }
.mh-ty-yong { border-color: rgba(100,160,200,0.4); }
.mh-ty-title {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}
.mh-ty-symbol {
  font-size: 1.8rem;
  margin: 4px 0;
}
.mh-ty-ti .mh-ty-symbol { color: var(--accent-gold); }
.mh-ty-yong .mh-ty-symbol { color: rgba(100,160,200,0.8); }
.mh-ty-name {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin: 4px 0;
}
.mh-ty-wx {
  font-size: 0.7rem;
  color: var(--accent-gold);
  padding: 1px 8px;
  border: 1px solid rgba(196,158,80,0.3);
  display: inline-block;
  margin: 4px 0;
}
.mh-ty-pos {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.mh-ty-rel {
  text-align: center;
}
.mh-ty-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.mh-ty-rel-text {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 500;
}
.mh-wx-explain {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.8;
  padding: 8px 16px;
  background: rgba(196,158,80,0.04);
  border: 1px dashed rgba(196,158,80,0.15);
}
.mh-ty-section-label {
  font-size: 0.75rem;
  color: var(--accent-gold);
  letter-spacing: 0.2em;
  text-align: center;
  margin: 12px 0 8px;
  position: relative;
}
.mh-ty-section-label::before,
.mh-ty-section-label::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: rgba(196,158,80,0.3);
  vertical-align: middle;
  margin: 0 10px;
}
.mh-ty-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,158,80,0.2), transparent);
  margin: 16px 0 4px;
}
.mh-wx-summary {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 2;
  padding: 12px 16px;
  background: rgba(196,158,80,0.06);
  border: 1px solid rgba(196,158,80,0.15);
  text-align: left;
}

/* 移动端适配 */
@media (max-width: 600px) {
  .mh-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .mh-detail-row {
    flex-direction: column;
    gap: 16px;
  }
  .mh-tiyong-grid {
    flex-direction: column;
    gap: 12px;
  }
  .mh-ty-rel {
    transform: rotate(90deg);
  }
  .mh-calc-trace {
    font-size: 0.6rem;
  }
}


/* ======== 文章内嵌点赞组件 — Medieval Inline Style ======== */

.article-like-section {
  display: none;
  text-align: center;
  padding: 2.5rem 0 2rem;
  margin: 3rem 0 0;
  border-top: 1px solid var(--border-color);
  position: relative;
}
.article-like-section::before {
  content: '⚜';
  position: absolute;
  top: -0.6em;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  padding: 0 1rem;
  font-size: 0.8rem;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
}
.article-like-section.visible {
  display: block;
}

.article-like-prompt {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

/* ── 点赞按钮 ── */
.article-like-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.6rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Cinzel', serif;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.article-like-btn:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(196,158,80,0.12);
}
.article-like-btn:active {
  transform: translateY(0) scale(0.97);
}

/* 心形图标 */
.article-like-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.article-like-path {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.4s ease, stroke 0.4s ease, filter 0.4s ease;
}

/* 数量文本 */
.article-like-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  min-width: 1.2em;
  transition: color 0.3s ease;
}

/* 文字标签 */
.article-like-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

/* ── 已点赞态 ── */
.article-like-btn.liked {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(196,158,80,0.06), var(--bg-card));
}
.article-like-btn.liked .article-like-path {
  fill: var(--accent-gold);
  stroke: var(--accent-gold);
  filter: drop-shadow(0 0 4px rgba(196,158,80,0.35));
}
.article-like-btn.liked .article-like-count {
  color: var(--accent-gold);
}
.article-like-btn.liked .article-like-label {
  color: var(--accent-gold);
}

/* ── 点赞弹性动画 ── */
.article-like-btn.like-pop .article-like-icon {
  animation: likeHeartPop 0.5s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
}
@keyframes likeHeartPop {
  0%   { transform: scale(1); }
  15%  { transform: scale(0.7); }
  40%  { transform: scale(1.25); }
  65%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* 取消点赞 */
.article-like-btn.like-unpop .article-like-icon {
  animation: likeHeartUnpop 0.3s ease forwards;
}
@keyframes likeHeartUnpop {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.85); }
  100% { transform: scale(1); }
}

/* 数字弹跳 */
.article-like-count.count-bump {
  animation: likeCountBump 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes likeCountBump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* +1 飘升 */
.article-like-plus {
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  pointer-events: none;
  animation: likePlusFloat 0.65s ease-out forwards;
}
@keyframes likePlusFloat {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-24px); }
}

/* ── 微粒 ── */
.article-like-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-gold);
  pointer-events: none;
  animation: likeSpark 0.5s ease-out forwards;
}
@keyframes likeSpark {
  0%   { transform: translate(0,0) scale(1); opacity: 0.85; }
  100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

/* ======== 卡片点赞数 ======== */
.post-card-likes {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
}
.post-card-likes svg {
  width: 12px;
  height: 12px;
}
.post-card-likes svg path {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.8;
}
.post-card-likes.has-likes svg path {
  fill: var(--accent-gold);
  stroke: var(--accent-gold);
}
.post-card-likes.has-likes {
  color: var(--accent-gold);
}


/* ══════════════════════════════════════════════
   永恒星辰 — Eternal Star
   ══════════════════════════════════════════════ */

.star-eternal {
  width: 14px !important;
  height: 14px !important;
  background: radial-gradient(circle, #fff 0%, #ffe8a0 30%, #f5c542 60%, rgba(245,197,66,0) 100%) !important;
  border-radius: 50%;
  z-index: 50 !important;
  cursor: pointer;
  animation: eternalPulse 3s ease-in-out infinite, eternalRainbow 8s linear infinite !important;
  box-shadow:
    0 0 15px rgba(255,215,0,0.9),
    0 0 35px rgba(255,180,50,0.6),
    0 0 60px rgba(255,150,30,0.4),
    0 0 100px rgba(245,197,66,0.25),
    0 0 150px rgba(255,200,80,0.1) !important;
  filter: none !important;
}

.star-eternal:hover {
  transform: translate(-50%,-50%) scale(2) !important;
  box-shadow:
    0 0 20px rgba(255,215,0,1),
    0 0 50px rgba(255,180,50,0.8),
    0 0 80px rgba(255,150,30,0.5),
    0 0 130px rgba(245,197,66,0.35),
    0 0 200px rgba(255,200,80,0.15) !important;
}

@keyframes eternalPulse {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: 0.85; }
  25%  { transform: translate(-50%,-50%) scale(1.3);  opacity: 1; }
  50%  { transform: translate(-50%,-50%) scale(0.95); opacity: 0.9; }
  75%  { transform: translate(-50%,-50%) scale(1.2);  opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(1);   opacity: 0.85; }
}

@keyframes eternalRainbow {
  0%   { filter: hue-rotate(0deg)   drop-shadow(0 0 12px rgba(255,215,0,0.8)); }
  25%  { filter: hue-rotate(60deg)  drop-shadow(0 0 16px rgba(255,180,200,0.7)); }
  50%  { filter: hue-rotate(160deg) drop-shadow(0 0 20px rgba(150,200,255,0.8)); }
  75%  { filter: hue-rotate(240deg) drop-shadow(0 0 16px rgba(200,150,255,0.7)); }
  100% { filter: hue-rotate(360deg) drop-shadow(0 0 12px rgba(255,215,0,0.8)); }
}

.star-eternal-rings {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  pointer-events: none;
}

.star-eternal-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid transparent;
}

.star-eternal-ring.ring-1 {
  width: 50px; height: 50px;
  margin: -25px 0 0 -25px;
  border-color: rgba(255,215,0,0.3);
  animation: eternalRingSpin 12s linear infinite, eternalRingPulse 3s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(255,215,0,0.15), inset 0 0 8px rgba(255,215,0,0.1);
}

.star-eternal-ring.ring-2 {
  width: 80px; height: 80px;
  margin: -40px 0 0 -40px;
  border-color: rgba(255,180,100,0.2);
  border-style: dashed;
  animation: eternalRingSpin 20s linear infinite reverse, eternalRingPulse 4s ease-in-out infinite 1s;
  box-shadow: 0 0 12px rgba(255,180,100,0.1), inset 0 0 12px rgba(255,180,100,0.05);
}

.star-eternal-ring.ring-3 {
  width: 120px; height: 120px;
  margin: -60px 0 0 -60px;
  border-color: rgba(200,170,255,0.12);
  border-style: dotted;
  animation: eternalRingSpin 30s linear infinite, eternalRingGlow 5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(200,170,255,0.08);
}

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

@keyframes eternalRingPulse {
  0%, 100% { opacity: 0.4; transform: rotate(0deg) scale(1); }
  50%      { opacity: 0.8; transform: rotate(180deg) scale(1.08); }
}

@keyframes eternalRingGlow {
  0%, 100% { opacity: 0.3; box-shadow: 0 0 20px rgba(200,170,255,0.08); }
  50%      { opacity: 0.6; box-shadow: 0 0 40px rgba(200,170,255,0.2), 0 0 80px rgba(255,200,100,0.08); }
}

.star-eternal-particles {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  pointer-events: none;
}

.star-eternal-particle {
  position: absolute;
  width: var(--size, 2px);
  height: var(--size, 2px);
  background: radial-gradient(circle, rgba(255,235,180,0.9), rgba(255,200,100,0.3));
  border-radius: 50%;
  animation: eternalParticleFloat 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transform: rotate(var(--angle, 0deg)) translateY(calc(-1 * var(--dist, 40px)));
  opacity: 0;
}

@keyframes eternalParticleFloat {
  0%   { opacity: 0; transform: rotate(var(--angle)) translateY(0); }
  20%  { opacity: 0.9; }
  60%  { opacity: 0.6; }
  100% { opacity: 0; transform: rotate(var(--angle)) translateY(calc(-1 * var(--dist, 40px) * 1.5)); }
}

.star-eternal-core {
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: #fff;
  border-radius: 50%;
  box-shadow:
    0 0 4px #fff,
    0 0 8px rgba(255,230,150,0.9),
    0 0 16px rgba(255,200,80,0.6);
  animation: eternalCoreBreath 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes eternalCoreBreath {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 4px #fff, 0 0 8px rgba(255,230,150,0.9), 0 0 16px rgba(255,200,80,0.6); }
  50%      { transform: scale(1.5); box-shadow: 0 0 8px #fff, 0 0 16px rgba(255,230,150,1), 0 0 30px rgba(255,200,80,0.8), 0 0 50px rgba(245,197,66,0.3); }
}

.star-tooltip-eternal {
  min-width: 180px;
  max-width: 260px;
  background: linear-gradient(135deg, rgba(30,25,40,0.95), rgba(20,18,30,0.98)) !important;
  border: 1px solid rgba(255,215,0,0.3) !important;
  box-shadow: 0 0 20px rgba(255,215,0,0.15), inset 0 0 30px rgba(255,200,100,0.05);
  text-align: center;
  padding: 1rem 1.2rem !important;
}

.star-tooltip-eternal::after {
  border-top-color: rgba(255,215,0,0.3) !important;
}

.star-tooltip-note {
  font-size: 0.75rem;
  color: rgba(255,215,150,0.8);
  margin-top: 0.5rem;
  font-style: italic;
}

.star-tooltip-eternal .star-tooltip-time {
  color: rgba(255,200,100,0.6) !important;
  font-size: 0.7rem;
  margin-top: 0.3rem;
}

.eternal-modal-wrap {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 1rem 0;
}

.eternal-modal-glow {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center,
    rgba(255,215,0,0.06) 0%,
    rgba(255,180,80,0.03) 30%,
    transparent 60%);
  animation: eternalModalGlow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes eternalModalGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

.eternal-modal-icon {
  font-size: 3.5rem;
  color: #f5c542;
  text-shadow:
    0 0 20px rgba(255,215,0,0.8),
    0 0 40px rgba(255,180,50,0.5),
    0 0 80px rgba(245,197,66,0.3);
  animation: eternalIconFloat 3s ease-in-out infinite, eternalRainbow 8s linear infinite;
  margin-bottom: 0.5rem;
  position: relative;
}

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

.eternal-modal-label {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: rgba(255,215,0,0.7);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.eternal-modal-divider {
  margin: 0.8rem 0;
  color: rgba(255,215,0,0.35);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
}

.eternal-modal-text {
  font-family: 'Crimson Text', serif;
  font-size: 1.3rem;
  color: var(--text-primary);
  line-height: 1.8;
  margin: 1.5rem 0;
  white-space: pre-wrap;
  word-break: break-all;
  position: relative;
  text-shadow: 0 0 30px rgba(255,215,0,0.15);
}

.eternal-modal-note {
  font-size: 0.9rem;
  color: rgba(255,215,150,0.85);
  margin: 1rem 0 0.5rem;
  font-style: italic;
  letter-spacing: 0.05em;
}

.eternal-note-icon {
  font-style: normal;
  font-size: 1rem;
}

.eternal-modal-time {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: rgba(255,200,100,0.5);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.eternal-modal-lights {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.eternal-modal-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  color: rgba(255,200,100,0.6);
  letter-spacing: 0.2em;
  margin-bottom: 1.2rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 20px;
  display: inline-block;
  background: rgba(255,215,0,0.03);
}

.eternal-light-btn {
  background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,180,50,0.1)) !important;
  border: 1px solid rgba(255,215,0,0.3) !important;
  color: rgba(255,215,0,0.9) !important;
  text-shadow: 0 0 8px rgba(255,215,0,0.3);
}

.eternal-light-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(255,215,0,0.25), rgba(255,180,50,0.2)) !important;
  box-shadow: 0 0 20px rgba(255,215,0,0.2);
}

.stardust-modal:has(.eternal-modal-wrap) {
  border: 1px solid rgba(255,215,0,0.2) !important;
  box-shadow:
    0 0 30px rgba(255,215,0,0.1),
    0 0 60px rgba(255,180,50,0.05),
    inset 0 0 40px rgba(255,215,0,0.03) !important;
}

@media (max-width: 768px) {
  .star-eternal {
    width: 10px !important;
    height: 10px !important;
  }
  .star-eternal-ring.ring-1 { width: 35px; height: 35px; margin: -17.5px 0 0 -17.5px; }
  .star-eternal-ring.ring-2 { width: 55px; height: 55px; margin: -27.5px 0 0 -27.5px; }
  .star-eternal-ring.ring-3 { width: 80px; height: 80px; margin: -40px 0 0 -40px; }
  .eternal-modal-icon { font-size: 2.5rem; }
  .eternal-modal-text { font-size: 1.1rem; }
}


/* ══════════════════════════════════════════════════
   铭刻堂 — MEMORIAL HALL
   ══════════════════════════════════════════════════ */

/* ── Hero 区 ── */
.memorial-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 2rem 3rem;
  background: linear-gradient(180deg, #050403 0%, var(--bg-primary) 100%);
}

.memorial-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 50% 45%, rgba(196,158,80,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.memorial-dust-canvas-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
}

.memorial-dust-canvas {
  width: 100%;
  height: 100%;
}

.memorial-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
}

.memorial-hero-ornament {
  font-family: 'IM Fell English', serif;
  font-size: 0.9rem;
  color: var(--accent-gold);
  opacity: 0.4;
  letter-spacing: 0.5em;
  animation: fadeInUp 0.8s ease both;
  margin-bottom: 1.5rem;
}

.memorial-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.3em;
  text-shadow: 0 0 60px rgba(196,158,80,0.2);
  margin-bottom: 0.8rem;
  animation: fadeInUp 0.8s ease 0.15s both;
}

.memorial-hero-en {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.6rem, 1.5vw, 0.85rem);
  color: var(--accent-silver);
  letter-spacing: 0.4em;
  opacity: 0.5;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.memorial-hero-motto {
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  line-height: 1.6;
  max-width: 500px;
  animation: fadeInUp 0.8s ease 0.45s both;
  margin-bottom: 2rem;
}

/* ── 烛火 ── */
.memorial-candle-wrap {
  animation: fadeInUp 0.8s ease 0.6s both;
  margin-bottom: 1rem;
}

.memorial-candle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.memorial-flame {
  position: relative;
  width: 8px;
  height: 20px;
  border-radius: 50% 50% 20% 20%;
  background: linear-gradient(to top, #f5c542, #ff9d2e, rgba(255,160,50,0.3));
  animation: memorialFlameFlicker 2.5s ease-in-out infinite;
  filter: blur(0.5px);
}

.memorial-flame-inner {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 10px;
  border-radius: 50% 50% 20% 20%;
  background: linear-gradient(to top, #fff8e0, #ffe4a0);
  animation: memorialFlameFlicker 1.8s ease-in-out infinite 0.3s;
}

.memorial-candle-light {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,197,66,0.12) 0%, transparent 70%);
  animation: memorialCandleGlow 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes memorialFlameFlicker {
  0%, 100% { transform: scaleX(1) scaleY(1) rotate(0deg); opacity: 0.9; }
  15%      { transform: scaleX(0.85) scaleY(1.05) rotate(-2deg); opacity: 1; }
  30%      { transform: scaleX(1.1) scaleY(0.95) rotate(1deg); opacity: 0.85; }
  50%      { transform: scaleX(0.9) scaleY(1.08) rotate(-1deg); opacity: 1; }
  70%      { transform: scaleX(1.05) scaleY(0.97) rotate(2deg); opacity: 0.9; }
  85%      { transform: scaleX(0.95) scaleY(1.03) rotate(-1deg); opacity: 0.95; }
}

@keyframes memorialCandleGlow {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.memorial-scroll-hint {
  position: absolute;
  bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.8s both;
}

.memorial-scroll-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  animation: memorialScrollBounce 2s ease-in-out infinite;
  display: block;
}

@keyframes memorialScrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(6px); opacity: 0.8; }
}

/* ── 纪念碑主体 ── */
.memorial-body {
  max-width: 850px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.memorial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

/* ── 纪念碑卡片 ── */
/* ── 铭刻堂卡片核心 ── */
/* ── 铭刻堂卡片核心 ── */
.memorial-card {
  position: relative;
  background: linear-gradient(160deg, rgba(16,14,12,0.95), rgba(8,7,6,0.98));
  border-radius: 6px;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
  overflow: hidden;
  animation: memorialCardIn 0.8s ease both;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.memorial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 40px rgba(220,190,120,0.1);
}

.memorial-card-eternal:hover {
  box-shadow: 0 15px 40px rgba(0,0,0,0.7), 0 0 50px rgba(255,245,220,0.15);
}

/* 内部边框与花纹 */
.memorial-card-inner {
  position: relative;
  flex: 1;
  border: 1px solid rgba(220,190,120,0.15);
  padding: 2.5rem 1.5rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 40%, rgba(255,255,255,0.01) 100%);
  border-radius: 2px;
}

.memorial-card-eternal .memorial-card-inner {
  border-color: rgba(255,245,220,0.25);
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 50%, rgba(255,255,255,0.02) 100%);
}

/* 典雅的四角边饰 */
.memorial-card-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  opacity: 0.6;
}
.memorial-card-corner.top-left { top: 4px; left: 4px; border-top-color: rgba(220,190,120,0.4); border-left-color: rgba(220,190,120,0.4); }
.memorial-card-corner.top-right { top: 4px; right: 4px; border-top-color: rgba(220,190,120,0.4); border-right-color: rgba(220,190,120,0.4); }
.memorial-card-corner.bottom-left { bottom: 4px; left: 4px; border-bottom-color: rgba(220,190,120,0.4); border-left-color: rgba(220,190,120,0.4); }
.memorial-card-corner.bottom-right { bottom: 4px; right: 4px; border-bottom-color: rgba(220,190,120,0.4); border-right-color: rgba(220,190,120,0.4); }

.memorial-card-eternal .memorial-card-corner { border-color: rgba(255,245,220,0.6); }

/* 神圣光束背景（Eternal特有） */
.memorial-divine-light {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 100%;
  background: radial-gradient(ellipse at top, rgba(255,245,220,0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: divineBreathe 4s ease-in-out infinite alternate;
}

@keyframes divineBreathe {
  0% { opacity: 0.6; }
  100% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

/* 头像与神光环（Halo） */
.memorial-card-halo-wrapper {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.memorial-halo-ring-1, .memorial-halo-ring-2 {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

.memorial-halo-ring-1 {
  width: 86px; height: 86px;
  border: 1px solid rgba(220,190,120,0.3);
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation: spinSlow 15s linear infinite;
}

.memorial-halo-ring-2 {
  width: 76px; height: 76px;
  border: 1px dashed rgba(220,190,120,0.25);
  animation: spinSlowReverse 20s linear infinite;
}

.memorial-card-eternal .memorial-halo-ring-1 {
  border: 1px solid rgba(255,245,220,0.4);
  border-top-color: transparent;
  border-bottom-color: transparent;
  box-shadow: 0 0 15px rgba(255,245,220,0.2);
}
.memorial-card-eternal .memorial-halo-ring-2 { border: 1px dashed rgba(255,245,220,0.35); }

@keyframes spinSlow { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spinSlowReverse { 100% { transform: translate(-50%, -50%) rotate(-360deg); } }

.memorial-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(220,190,120,0.8);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1815;
  z-index: 2;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.memorial-card-eternal .memorial-card-avatar {
  border-color: #fff8e6;
  box-shadow: 0 0 20px rgba(255,245,220,0.3), inset 0 0 10px rgba(0,0,0,0.5);
}

.memorial-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.memorial-avatar-placeholder { font-size: 1.8rem; color: #dcb871; opacity: 0.8; }
.memorial-card-eternal .memorial-avatar-placeholder { color: #fff8e6; text-shadow: 0 0 10px rgba(255,245,220,0.5); }

/* 文字排版 */
.memorial-card-name {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f7eec5;
  letter-spacing: 0.15em;
  margin-bottom: 0.2rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.memorial-card-eternal .memorial-card-name { color: #fff; text-shadow: 0 0 12px rgba(255,245,220,0.4); }

.memorial-card-title {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(220,190,120,0.8);
  margin-bottom: 1rem;
}

/* 分割线 */
.memorial-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80%;
  margin: 0.5rem 0 1rem;
}
.memorial-divider::before, .memorial-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, rgba(220,190,120,0.3), transparent);
}
.memorial-divider span { font-size: 0.7rem; color: rgba(220,190,120,0.6); padding: 0 10px; }
.memorial-card-eternal .memorial-divider::before, .memorial-card-eternal .memorial-divider::after {
  background: linear-gradient(to right, transparent, rgba(255,245,220,0.4), transparent);
}
.memorial-card-eternal .memorial-divider span { color: rgba(255,245,220,0.8); text-shadow: 0 0 8px rgba(255,245,220,0.4); }

/* 墓志铭和日期 */
.memorial-card-epitaph {
  font-family: 'Kaiti', 'STKaiti', serif;
  font-size: 0.95rem;
  color: #dcd0b8;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}
.memorial-card-eternal .memorial-card-epitaph { color: #f0eada; }

.memorial-card-date {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

/* 标签底部 */
.memorial-type-tag {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}
.memorial-type-luminary {
  color: rgba(220,190,120,0.9);
  border: 1px solid rgba(220,190,120,0.2);
  background: rgba(220,190,120,0.05);
}
.memorial-type-eternal {
  color: #fff8e6;
  border: 1px solid rgba(255,245,220,0.3);
  background: rgba(255,245,220,0.08);
  box-shadow: 0 0 15px rgba(255,245,220,0.1);
}

/* 飘浮神圣粒子 */
.memorial-sparkle-container {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; overflow: hidden;
}
.sparkle {
  position: absolute; width: 2px; height: 2px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 0 4px #fff, 0 0 8px #fff8e6;
  opacity: 0; animation: floatSparkle 4s infinite ease-in-out;
}
.sparkle.s1 { left: 20%; top: 60%; animation-delay: 0s; }
.sparkle.s2 { left: 80%; top: 40%; animation-delay: 1.5s; }
.sparkle.s3 { left: 50%; top: 80%; animation-delay: 3s; }
.sparkle.s4 { left: 30%; top: 30%; animation-delay: 2s; }
@keyframes floatSparkle {
  0% { opacity: 0; transform: translateY(10px) scale(0.5); }
  50% { opacity: 0.8; transform: translateY(-10px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.5); }
}

/* 空状态 */
.memorial-empty { grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.memorial-empty-icon { font-size: 2.5rem; opacity: 0.3; margin-bottom: 1rem; color: #fff8e6; text-shadow: 0 0 15px rgba(255,245,220,0.5); }
.memorial-empty-hint { font-size: 0.85rem; margin-top: 0.5rem; opacity: 0.6; }

/* ── 页尾 ── */
.memorial-footer,
.memorial-footer-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 2rem 0;
  max-width: 400px;
  margin: 2rem auto 0;
}
.memorial-footer-end { margin-top: 0.5rem; padding-bottom: 3rem; }
.memorial-footer-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, rgba(196,158,80,0.2), transparent); }
.memorial-footer-emblem { color: var(--accent-gold); opacity: 0.35; font-size: 0.85rem; }
.memorial-footer-text {
  text-align: center; font-family: 'Crimson Text', serif; font-style: italic;
  font-size: 0.9rem; color: var(--text-muted); padding: 0.6rem 0; letter-spacing: 0.1em;
}

/* ══ 详情弹窗 ══ */
.memorial-modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 999;
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
.memorial-modal-mask.visible { opacity: 1; pointer-events: auto; }
.memorial-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95);
  z-index: 1000; background: var(--bg-card); border: 1px solid rgba(196,158,80,0.12);
  border-radius: 16px; padding: 0; min-width: 320px; max-width: 500px; width: 90%;
  max-height: 85vh; overflow-y: auto; opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.memorial-modal.visible { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.memorial-modal-close {
  position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  color: var(--text-muted); font-size: 1rem; cursor: pointer; transition: color 0.2s; z-index: 100;
}
.memorial-modal-close:hover { color: var(--text-primary); }

.memorial-modal-wrap {
  position: relative;
  background: linear-gradient(160deg, rgba(20,18,16,0.95), rgba(10,9,8,0.98));
  border-radius: 16px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  width: 100%;
}
.memorial-modal-eternal {
  border: 1px solid rgba(255,245,220,0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 80px rgba(255,245,220,0.15);
}
.memorial-modal-divine-light {
  position: absolute; top: -50px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,245,220,0.15) 0%, transparent 70%);
  pointer-events: none; animation: divineBreathe 4s infinite alternate;
}
.memorial-modal-halo-wrapper {
  position: relative; width: 100px; height: 100px; margin: 0 auto 2rem;
  display: flex; align-items: center; justify-content: center;
}
.memorial-modal-halo-wrapper .memorial-halo-ring-1 { width: 100px; height: 100px; }
.memorial-modal-halo-wrapper .memorial-halo-ring-2 { width: 88px; height: 88px; }

.memorial-modal-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  border: 2px solid rgba(220,190,120,0.8);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: #1a1815; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); z-index: 2;
}
.memorial-modal-eternal .memorial-modal-avatar {
  border-color: #fff8e6; box-shadow: 0 0 20px rgba(255,245,220,0.4), inset 0 0 10px rgba(0,0,0,0.5);
}
.memorial-modal-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.memorial-modal-avatar-placeholder { font-size: 2.2rem; color: #fff8e6; text-shadow: 0 0 15px rgba(255,245,220,0.5); }

.memorial-modal-name {
  font-family: 'Cinzel', serif; font-size: 1.8rem; font-weight: 600; color: #fff8e6;
  letter-spacing: 0.15em; margin-bottom: 0.5rem; text-shadow: 0 2px 10px rgba(255,245,220,0.3);
}
.memorial-modal-title { font-family: 'IM Fell English', serif; font-style: italic; font-size: 1.1rem; color: rgba(220,190,120,0.9); }
.memorial-modal-eternal .memorial-modal-title { color: rgba(255,245,220,0.9); }

.memorial-modal-divider { margin: 1.5rem auto; color: rgba(220,190,120,0.6); font-size: 1.2rem; }
.memorial-modal-eternal .memorial-modal-divider { color: rgba(255,245,220,0.8); text-shadow: 0 0 10px rgba(255,245,220,0.5); }

.memorial-modal-story {
  font-family: 'Kaiti', 'STKaiti', serif; font-size: 1.1rem; line-height: 1.8;
  color: #f0eada; margin-bottom: 2rem; text-align: justify; letter-spacing: 1px;
}
.memorial-modal-date {
  font-family: 'Cinzel', serif; font-size: 0.85rem; color: rgba(255,255,255,0.4);
  letter-spacing: 0.2em; margin-bottom: 1.5rem;
}
.memorial-modal-footer {
  font-family: 'Cinzel', serif; font-size: 0.75rem; color: rgba(255,255,255,0.3); letter-spacing: 0.15em; margin-top: 1rem;
}

/* ── 响应式 ── */
@media (max-width: 768px) {
  .memorial-hero { min-height: 50vh; padding: 5rem 1.5rem 2rem; }
  .memorial-hero-title { letter-spacing: 0.15em; }
  .memorial-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .memorial-body { padding: 2rem 1.2rem; }
  .memorial-modal { padding: 0; min-width: unset; width: 95%; }
  .memorial-card-inner { padding: 2rem 1.2rem 1.5rem; }
}
