/* ========================================
   一字一世界 · 水墨丹青古典美学样式
   ======================================== */

/* CSS 变量：色彩系统 */
:root {
  /* 主色 */
  --ink-black: #1c1814;          /* 墨色 */
  --ink-deep: #2b2620;           /* 深墨 */
  --ink-soft: #4a4238;           /* 淡墨 */

  /* 背景色 */
  --paper: #f0e6d2;              /* 宣纸色 */
  --paper-light: #f7efde;        /* 浅宣纸 */
  --paper-dark: #e6d9bc;         /* 深宣纸 */
  --paper-aged: #ddd0b0;         /* 旧纸色 */

  /* 强调色 */
  --seal-red: #a8201a;           /* 印章红 */
  --seal-deep: #7d1612;          /* 深印红 */
  --vermillion: #c84030;         /* 朱砂 */

  /* 辅助色 */
  --jade: #5a7d6a;               /* 青瓷绿 */
  --jade-deep: #3d5c47;          /* 深青瓷 */
  --gold: #b8860b;               /* 古金 */
  --gold-soft: #c9a961;          /* 柔金 */

  /* 字体 */
  --font-title: 'Ma Shan Zheng', 'KaiTi', 'STKaiti', '楷体', serif;
  --font-deco: 'ZCOOL XiaoWei', 'KaiTi', serif;
  --font-body: 'Noto Serif SC', 'SimSun', '宋体', serif;
  --font-cursive: 'Long Cang', 'KaiTi', cursive;

  /* 阴影 */
  --shadow-soft: 0 4px 24px rgba(28, 24, 20, 0.08);
  --shadow-card: 0 8px 40px rgba(28, 24, 20, 0.12);
}

/* 重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  color: var(--ink-black);
  line-height: 1.8;
  overflow-x: hidden;
  /* 宣纸纹理 */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(184, 134, 11, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(168, 32, 26, 0.03) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.85' numOctaves='3' /%3E%3CfeColorMatrix values='0 0 0 0 0.7 0 0 0 0 0.6 0 0 0 0 0.4 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ========================================
   顶部导航
   ======================================== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(240, 230, 210, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(168, 32, 26, 0.12);
  transition: all 0.4s ease;
}

.top-nav.scrolled {
  background: rgba(240, 230, 210, 0.95);
  box-shadow: 0 2px 20px rgba(28, 24, 20, 0.06);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--seal-red);
  color: var(--paper-light);
  font-family: var(--font-title);
  font-size: 22px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(168, 32, 26, 0.3);
}

.logo-text {
  font-family: var(--font-deco);
  font-size: 20px;
  color: var(--ink-deep);
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--seal-red);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links a:hover {
  color: var(--seal-red);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink-deep);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* 移动端遮罩层（桌面端隐藏） */
.nav-overlay {
  display: none;
}

/* ========================================
   英雄区
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: contrast(1.1) sepia(0.15);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(240, 230, 210, 0.4) 70%, rgba(240, 230, 210, 0.8) 100%),
    linear-gradient(to bottom, rgba(240, 230, 210, 0.2) 0%, transparent 30%, transparent 70%, rgba(240, 230, 210, 0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.hero-vertical-title {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.vchar {
  font-family: var(--font-title);
  font-size: clamp(56px, 9vw, 120px);
  color: var(--ink-black);
  text-shadow: 2px 2px 8px rgba(240, 230, 210, 0.6);
  opacity: 0;
  animation: inkDrop 1.2s ease forwards;
  line-height: 1;
  letter-spacing: 4px;
}

.vchar:nth-child(3) {
  color: var(--seal-red);
}

@keyframes inkDrop {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(1.2);
    filter: blur(8px);
  }
  60% {
    opacity: 0.8;
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.hero-subtitle {
  margin-bottom: 60px;
}

.subtitle-line {
  font-family: var(--font-deco);
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--ink-soft);
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.subtitle-en {
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 300;
}

.reveal {
  opacity: 0;
  animation: fadeUp 1.5s ease forwards;
}

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

.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 4px;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--ink-soft), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(to bottom, transparent, var(--seal-red));
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -30px; }
  100% { top: 60px; }
}

/* 装饰印章 */
.hero-seal {
  position: absolute;
  top: 120px;
  right: 8%;
  z-index: 2;
  opacity: 0.85;
}

.seal-box {
  width: 80px;
  height: 80px;
  background: var(--seal-red);
  color: var(--paper-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 24px;
  line-height: 1.1;
  border-radius: 6px;
  transform: rotate(-8deg);
  box-shadow: 0 4px 20px rgba(168, 32, 26, 0.4);
}

/* ========================================
   序言
   ======================================== */
.prologue {
  padding: 100px 24px;
  text-align: center;
  position: relative;
}

.prologue-container {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.prologue-brush {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--ink-soft), transparent);
  margin: 0 auto 40px;
}

.prologue-text {
  font-family: var(--font-deco);
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--ink-deep);
  line-height: 2.4;
  letter-spacing: 2px;
}

.reveal-word {
  opacity: 0;
  display: inline-block;
  animation: fadeUp 0.8s ease forwards;
}

/* ========================================
   板块通用
   ======================================== */
.module-section {
  padding: 100px 32px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

.module-section.alt-bg {
  background: linear-gradient(180deg, transparent, rgba(221, 208, 176, 0.3) 20%, rgba(221, 208, 176, 0.3) 80%, transparent);
  max-width: 100%;
  padding-left: 32px;
  padding-right: 32px;
}

.alt-bg > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
  position: relative;
}

.section-number {
  font-family: var(--font-title);
  font-size: 64px;
  color: var(--seal-red);
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(32px, 4vw, 44px);
  color: var(--ink-black);
  letter-spacing: 8px;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-seal {
  position: absolute;
  top: 10px;
  right: calc(50% - 140px);
  width: 36px;
  height: 36px;
  background: var(--seal-red);
  color: var(--paper-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 18px;
  border-radius: 4px;
  transform: rotate(6deg);
}

.section-desc {
  font-family: var(--font-deco);
  font-size: 16px;
  color: var(--ink-soft);
  letter-spacing: 3px;
  margin-top: 8px;
}

/* ========================================
   模块卡片
   ======================================== */
.module-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.module-content.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.module-content.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.module-card {
  position: relative;
  background: var(--paper-light);
  border: 1px solid rgba(168, 32, 26, 0.15);
  border-radius: 4px;
  padding: 40px 32px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
}

.module-card::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border: 1px solid rgba(168, 32, 26, 0.08);
  pointer-events: none;
  border-radius: 2px;
}

.module-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: var(--seal-red);
}

.module-card.main-module {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--paper-light), var(--paper-dark));
}

.module-card.wide-module {
  max-width: 900px;
  margin: 0 auto;
}

.card-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--seal-red), var(--seal-deep));
}

.card-body {
  position: relative;
  z-index: 2;
}

.card-icon {
  font-size: 40px;
  margin-bottom: 20px;
}

.card-body h3 {
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--ink-black);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.card-body p {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 2;
  margin-bottom: 24px;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-deep);
}

.feature-dot {
  width: 6px;
  height: 6px;
  background: var(--seal-red);
  border-radius: 50%;
  flex-shrink: 0;
}

.enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px;
  background: var(--ink-black);
  color: var(--paper-light);
  font-family: var(--font-deco);
  font-size: 16px;
  letter-spacing: 2px;
  border-radius: 2px;
  transition: all 0.3s ease;
  border: 1px solid var(--ink-black);
}

.enter-btn:hover {
  background: var(--seal-red);
  border-color: var(--seal-red);
  transform: translateX(4px);
}

.enter-btn .arrow {
  transition: transform 0.3s ease;
}

.enter-btn:hover .arrow {
  transform: translateX(4px);
}

.coming-soon {
  display: inline-block;
  padding: 6px 16px;
  background: transparent;
  border: 1px dashed var(--gold);
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 2px;
  border-radius: 2px;
}

/* 卡片背景大字 */
.card-bg-char {
  position: absolute;
  bottom: -20px;
  right: -10px;
  font-family: var(--font-title);
  font-size: 200px;
  color: var(--ink-black);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

/* 姓氏预览 */
.surname-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.surname-tag {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--seal-red);
  color: var(--seal-red);
  font-family: var(--font-title);
  font-size: 22px;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.surname-tag:hover {
  background: var(--seal-red);
  color: var(--paper-light);
  transform: scale(1.1);
}

.surname-more {
  color: var(--ink-soft);
  font-size: 20px;
  align-self: center;
  margin-left: 8px;
}

/* ========================================
   水墨分隔
   ======================================== */
.ink-divider {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
  color: var(--ink-soft);
}

.ink-divider svg {
  width: 100%;
  height: 40px;
}

/* ========================================
   未来展望
   ======================================== */
.future-content {
  max-width: 900px;
  margin: 0 auto;
}

.future-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.future-item {
  text-align: center;
  padding: 32px 12px;
  border: 1px solid rgba(168, 32, 26, 0.15);
  border-radius: 4px;
  background: var(--paper-light);
  transition: all 0.4s ease;
}

.future-item:hover {
  transform: translateY(-4px);
  border-color: var(--seal-red);
  box-shadow: var(--shadow-soft);
}

.future-char {
  font-family: var(--font-title);
  font-size: 48px;
  color: var(--seal-red);
  margin-bottom: 12px;
  line-height: 1;
}

.future-item p {
  font-family: var(--font-deco);
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}

/* ========================================
   页脚
   ======================================== */
.site-footer {
  background: var(--ink-black);
  padding: 80px 32px 40px;
  text-align: center;
  color: var(--paper-aged);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--seal-red), var(--gold), var(--seal-red), transparent);
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-seal {
  margin-bottom: 32px;
}

.footer-seal-box {
  display: inline-flex;
  flex-direction: column;
  width: 70px;
  height: 70px;
  background: var(--seal-red);
  color: var(--paper-light);
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 22px;
  line-height: 1.1;
  border-radius: 4px;
}

.footer-quote {
  font-family: var(--font-cursive);
  font-size: 22px;
  color: var(--paper-light);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.footer-quote-source {
  font-size: 13px;
  color: var(--gold-soft);
  margin-bottom: 32px;
}

.footer-divider {
  width: 60px;
  height: 1px;
  background: var(--gold-soft);
  margin: 0 auto 24px;
}

.footer-copy {
  font-size: 13px;
  color: var(--paper-aged);
  opacity: 0.7;
  letter-spacing: 1px;
}

/* ========================================
   浮动数字人
   ======================================== */
.digital-sage {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 90;
  cursor: pointer;
  animation: sageFloat 3s ease-in-out infinite;
}

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

.sage-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: visible;
  box-shadow: 0 8px 32px rgba(28, 24, 20, 0.3);
  border: 3px solid var(--paper-light);
  transition: all 0.3s ease;
}

.sage-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.sage-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--seal-red);
  animation: sagePulse 2s ease-out infinite;
}

@keyframes sagePulse {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

.digital-sage:hover .sage-avatar {
  transform: scale(1.08);
  border-color: var(--seal-red);
}

.sage-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 12px;
  background: var(--ink-black);
  color: var(--paper-light);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.sage-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 30px;
  border: 6px solid transparent;
  border-top-color: var(--ink-black);
}

.digital-sage:hover .sage-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   数字人对话弹窗
   ======================================== */
.sage-dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.sage-dialog.active {
  display: flex;
}

.dialog-mask {
  position: absolute;
  inset: 0;
  background: rgba(28, 24, 20, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

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

.dialog-panel {
  position: relative;
  width: 92%;
  max-width: 480px;
  background: var(--paper-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  animation: dialogIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(168, 32, 26, 0.2);
}

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

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--ink-soft);
  cursor: pointer;
  z-index: 5;
  transition: color 0.3s ease;
}

.dialog-close:hover { color: var(--seal-red); }

.dialog-sage-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, var(--ink-deep), var(--ink-black));
  color: var(--paper-light);
}

.dialog-sage-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--gold-soft);
  object-fit: cover;
}

.dialog-sage-info h3 {
  font-family: var(--font-title);
  font-size: 22px;
  margin-bottom: 4px;
  letter-spacing: 2px;
}

.dialog-sage-info p {
  font-size: 12px;
  color: var(--gold-soft);
  letter-spacing: 1px;
}

.dialog-messages {
  padding: 24px;
  max-height: 320px;
  overflow-y: auto;
}

.message {
  margin-bottom: 16px;
}

.message-content {
  display: inline-block;
  padding: 14px 18px;
  background: var(--paper);
  border-radius: 12px 12px 12px 4px;
  font-size: 14px;
  color: var(--ink-deep);
  line-height: 1.8;
  max-width: 100%;
}

.sage-message .message-content {
  border-left: 3px solid var(--seal-red);
}

.coming-tag {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gold);
}

.dialog-quick {
  display: flex;
  gap: 8px;
  padding: 0 24px 16px;
  flex-wrap: wrap;
}

.quick-btn {
  padding: 6px 14px;
  background: var(--paper);
  border: 1px solid rgba(168, 32, 26, 0.3);
  color: var(--seal-red);
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.quick-btn:hover {
  background: var(--seal-red);
  color: var(--paper-light);
}

.dialog-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(168, 32, 26, 0.1);
}

.dialog-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid rgba(168, 32, 26, 0.2);
  background: var(--paper);
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--ink-deep);
}

.dialog-input:focus {
  outline: none;
  border-color: var(--seal-red);
}

.dialog-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dialog-send {
  padding: 10px 24px;
  background: var(--seal-red);
  color: var(--paper-light);
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: var(--font-body);
}

.dialog-send:hover:not(:disabled) {
  background: var(--seal-deep);
}

.dialog-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   响应式
   ======================================== */

/* 菜单展开时禁止 body 滚动 */
body.nav-menu-open {
  overflow: hidden;
}

/* === 平板 (≤900px) === */
@media (max-width: 900px) {
  /* 导航栏：切换为汉堡菜单 */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    display: flex;
    flex-direction: column;
    background: var(--paper-light);
    padding: 80px 24px 32px;
    gap: 8px;
    box-shadow: -8px 0 40px rgba(28, 24, 20, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 101;
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    border-bottom: 1px solid rgba(168, 32, 26, 0.08);
  }

  .nav-links a {
    display: block;
    padding: 16px 12px;
    font-size: 17px;
    letter-spacing: 2px;
  }

  .nav-links a::after { display: none; }

  .nav-toggle {
    display: flex;
    z-index: 102;
  }

  /* 汉堡 → X 动画 */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* 遮罩层 */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(28, 24, 20, 0.5);
    backdrop-filter: blur(2px);
    z-index: 100;
    animation: fadeIn 0.3s ease;
  }

  .nav-overlay.active {
    display: block;
  }

  /* 布局调整 */
  .module-content.grid-3,
  .module-content.grid-2 {
    grid-template-columns: 1fr;
  }

  .future-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section-seal {
    right: calc(50% - 110px);
  }

  .hero-seal {
    top: 90px;
    right: 5%;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }
}

/* === 手机 (≤600px) === */
@media (max-width: 600px) {
  .module-section { padding: 60px 20px; }
  .prologue { padding: 60px 20px; }
  .future-grid { grid-template-columns: repeat(2, 1fr); }
  .card-bg-char { font-size: 140px; }
  .digital-sage { bottom: 20px; right: 20px; }
  .sage-avatar { width: 60px; height: 60px; }
  .nav-inner { padding: 12px 20px; }
  .hero-vertical-title { gap: 4px; }

  /* 英雄区 */
  .hero-content { padding: 0 16px; }
  .hero-vertical-title { margin-bottom: 28px; }
  .hero-subtitle { margin-bottom: 40px; }
  .hero-seal { top: 80px; right: 4%; }
  .seal-box { width: 64px; height: 64px; font-size: 20px; }

  /* 章节标题 */
  .section-header { margin-bottom: 40px; }
  .section-number { font-size: 48px; }
  .section-title { letter-spacing: 4px; }

  /* 序言 */
  .prologue-brush { height: 40px; margin-bottom: 28px; }

  /* 卡片 */
  .card-body h3 { font-size: 24px; }
  .card-body p { font-size: 14px; }
  .card-icon { font-size: 32px; margin-bottom: 14px; }

  /* 未来展望 */
  .future-item { padding: 20px 8px; }
  .future-char { font-size: 36px; }
  .future-item p { font-size: 13px; }

  /* 页脚 */
  .site-footer { padding: 60px 20px 32px; }
  .footer-quote { font-size: 18px; }
  .footer-seal-box { width: 56px; height: 56px; font-size: 18px; }

  /* 数字人对话弹窗：小屏全屏化 */
  .sage-dialog.active { align-items: stretch; }
  .dialog-panel {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }
  .dialog-sage-header { padding: 16px; }
  .dialog-sage-img { width: 48px; height: 48px; }
  .dialog-sage-info h3 { font-size: 18px; }
  .dialog-sage-info p { font-size: 11px; }
  .dialog-messages {
    flex: 1;
    padding: 16px;
    max-height: none;
    overflow-y: auto;
  }
  .message-content { font-size: 13px; padding: 12px 14px; }
  .dialog-quick { padding: 0 16px 12px; }
  .quick-btn { font-size: 12px; padding: 5px 12px; }
  .dialog-input-area { padding: 12px 16px 16px; }
  .dialog-input { font-size: 13px; padding: 8px 12px; }
  .dialog-send { padding: 8px 18px; font-size: 13px; }

  /* logo */
  .logo-seal { width: 32px; height: 32px; font-size: 18px; }
  .logo-text { font-size: 17px; letter-spacing: 1px; }
}

/* === 小手机 (≤480px) === */
@media (max-width: 480px) {
  .module-section { padding: 48px 16px; }
  .prologue { padding: 48px 16px; }

  /* 英雄区：缩小竖排标题 */
  .hero-vertical-title { gap: 2px; margin-bottom: 24px; }
  .hero-subtitle { margin-bottom: 32px; }
  .subtitle-line { letter-spacing: 2px; margin-bottom: 8px; }
  .subtitle-en { font-size: 12px; letter-spacing: 2px; }

  /* 章节标题进一步缩小 */
  .section-number { font-size: 40px; }
  .section-title { letter-spacing: 2px; }

  /* 卡片 */
  .module-card { padding: 24px 20px; }
  .card-bg-char { font-size: 100px; }

  /* 未来展望：单列 */
  .future-grid { grid-template-columns: 1fr; }
  .future-item { padding: 16px 8px; }

  /* 数字人更小 */
  .digital-sage { bottom: 16px; right: 16px; }
  .sage-avatar { width: 52px; height: 52px; border-width: 2px; }

  /* 导航栏：侧边抽屉更窄 */
  .nav-links { width: 240px; padding: 72px 20px 24px; }
  .nav-links a { font-size: 16px; padding: 14px 10px; }

  .nav-inner { padding: 10px 16px; }
  .logo-text { display: none; }
  .logo-seal { width: 30px; height: 30px; font-size: 17px; }

  /* 页脚 */
  .footer-quote { font-size: 16px; letter-spacing: 1px; }
  .footer-quote-source { font-size: 12px; }
}

/* === 超小屏 (≤375px) === */
@media (max-width: 375px) {
  .hero-content { padding: 0 12px; }
  .module-section { padding: 40px 12px; }
  .module-card { padding: 20px 16px; }
  .card-body h3 { font-size: 20px; }
  .enter-btn { padding: 10px 24px; font-size: 14px; }
  .digital-sage { bottom: 12px; right: 12px; }
  .sage-avatar { width: 48px; height: 48px; }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--paper-dark); }
::-webkit-scrollbar-thumb { background: var(--seal-red); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--seal-deep); }
