/* ============================================
   新文明团队 · 古风官网样式
   宣纸米黄 · 墨色正文 · 朱红印章 · 山水祥云
   ============================================ */

:root {
  /* 宣纸色系（浅色） */
  --paper: #F5ECD7;
  --paper-deep: #EBDFC3;
  --paper-dark: #D9C9A3;
  --paper-light: #FAF3E0;
  
  /* 墨色系（浅色） */
  --ink: #2A241E;
  --ink-soft: #3D352C;
  --ink-light: #5C4F42;
  --ink-faint: #8A7B68;
  
  /* 朱红印章 */
  --seal: #B83A2A;
  --seal-dark: #8E2A1E;
  --seal-light: #D45742;
  
  /* 赭石 / 石青 / 翠玉 */
  --ochre: #A65D2F;
  --azure: #3A6B8C;
  --jade: #5B8C6A;
  
  /* 边框与分隔 */
  --line: rgba(42, 36, 30, 0.15);
  --line-strong: rgba(42, 36, 30, 0.3);
  
  /* 字体 */
  --font-brush: 'Ma Shan Zheng', 'ZCOOL KuaiLe', 'STKaiti', 'KaiTi', serif;
  --font-kai: 'ZCOOL XiaoWei', 'STKaiti', 'KaiTi', '楷体', serif;
  --font-song: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  --font-cursive: 'Long Cang', 'STXingkai', cursive;
  --font-body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-serif-body: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'SimSun', '宋体', serif;
  
  /* 主题过渡（默认关闭，切换时再启用） */
  --theme-transition: none;
}

/* 深色模式：夜卷 / 古墨风格 */
:root[data-theme="dark"] {
  --paper: #1C1916;
  --paper-deep: #26221D;
  --paper-dark: #332D27;
  --paper-light: #2B2621;
  
  --ink: #E8DFCF;
  --ink-soft: #D4C9B5;
  --ink-light: #B8AB94;
  --ink-faint: #7A7060;
  
  --seal: #E05A48;
  --seal-dark: #C04535;
  --seal-light: #F07866;
  
  --ochre: #D4894F;
  --azure: #6FA3C4;
  --jade: #7BAE8B;
  
  --line: rgba(232, 223, 207, 0.12);
  --line-strong: rgba(232, 223, 207, 0.22);
}

/* 跟随系统：深色时应用夜卷配色 */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --paper: #1C1916;
    --paper-deep: #26221D;
    --paper-dark: #332D27;
    --paper-light: #2B2621;
    
    --ink: #E8DFCF;
    --ink-soft: #D4C9B5;
    --ink-light: #B8AB94;
    --ink-faint: #7A7060;
    
    --seal: #E05A48;
    --seal-dark: #C04535;
    --seal-light: #F07866;
    
    --ochre: #D4894F;
    --azure: #6FA3C4;
    --jade: #7BAE8B;
    
    --line: rgba(232, 223, 207, 0.12);
    --line-strong: rgba(232, 223, 207, 0.22);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.8;
  background: var(--paper);
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--theme-transition), color var(--theme-transition);
}

/* 宣纸纹理背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(ellipse at 20% 30%, rgba(166, 93, 47, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(58, 107, 140, 0.04) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.65 0 0 0 0 0.55 0 0 0 0 0.35 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* 顶部山水远景 */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, rgba(58, 107, 140, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

#root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ====== 导航栏 ====== */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, var(--paper), rgba(0,0,0,0));
  background-color: var(--paper);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 20px rgba(42, 36, 30, 0.06);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-brand > div {
  white-space: nowrap;
}

.nav-seal {
  width: 42px;
  height: 42px;
  background: var(--seal);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper-light);
  font-family: var(--font-brush);
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(184, 58, 42, 0.35);
  transform: rotate(-3deg);
  letter-spacing: 0;
}

.nav-brand-text {
  font-family: var(--font-brush);
  font-size: 24px;
  letter-spacing: 0.1em;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1.2;
}

.nav-brand-sub {
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.3em;
  font-family: var(--font-body);
  margin-top: 2px;
  font-weight: 400;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.nav-link {
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link:hover {
  color: var(--seal);
}

.nav-link.active {
  color: var(--seal);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--seal);
  border-radius: 1px;
}

.nav-tools {
  position: relative;
}

.nav-tools-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--paper-light);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(42, 36, 30, 0.12);
  padding: 8px 0;
  z-index: 200;
  margin-top: 4px;
}

.nav-tools-menu a,
.nav-tools-menu .menu-item {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-tools-menu a:hover,
.nav-tools-menu .menu-item:hover {
  background: var(--paper-deep);
  color: var(--seal);
  padding-left: 22px;
}

/* 移动端汉堡菜单 */
.nav-hamburger {
  display: none;
  height: 36px;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper-light);
  transition: all 0.3s;
  user-select: none;
}

.nav-hamburger:hover {
  border-color: var(--seal);
  background: rgba(184, 58, 42, 0.04);
}

.hamburger-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.15em;
  line-height: 1;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 20px;
  height: 16px;
  position: relative;
}

.hamburger-icon span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s;
  position: relative;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--paper-light);
  border-bottom: 1px solid var(--line);
  padding: 16px;
  z-index: 99;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
}

.nav-mobile.open { display: block; }

.nav-mobile .nav-link {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.nav-mobile .nav-section-title {
  padding: 12px 16px 6px;
  font-family: var(--font-brush);
  color: var(--seal);
  font-size: 14px;
  letter-spacing: 0.15em;
}

/* ====== 主容器 ====== */
.main-wrap {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ====== 通用章节 ====== */
.section {
  padding: 64px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.section-eyebrow {
  font-family: var(--font-kai);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--seal);
  margin-bottom: 12px;
  text-indent: 0.4em;
}

.section-title {
  font-family: var(--font-brush);
  font-size: 42px;
  color: var(--ink);
  letter-spacing: 0.15em;
  line-height: 1.3;
  margin-bottom: 16px;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-light);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 400;
}

/* 祥云分隔符 */
.cloud-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

.cloud-divider::before,
.cloud-divider::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-strong), transparent);
}

.cloud-divider .cloud-icon {
  color: var(--seal);
  font-size: 20px;
  opacity: 0.7;
}

/* ====== Hero 区 ====== */
.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(166, 93, 47, 0.08), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(58, 107, 140, 0.06), transparent 70%);
  pointer-events: none;
}

.hero-vertical-text {
  position: absolute;
  right: 40px;
  top: 80px;
  writing-mode: vertical-rl;
  font-family: var(--font-brush);
  font-size: 18px;
  color: var(--ink-faint);
  letter-spacing: 0.4em;
  opacity: 0.5;
  pointer-events: none;
}

.hero-vertical-text.left {
  right: auto;
  left: 40px;
}

.hero-title {
  font-family: var(--font-brush);
  font-size: clamp(36px, 10vw, 96px);
  color: var(--ink);
  letter-spacing: 0.2em;
  line-height: 1.2;
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
  text-shadow: 2px 2px 0 rgba(184, 58, 42, 0.1);
  padding: 0 8px;
  word-break: keep-all;
}

.hero-title .seal-mark {
  display: inline-block;
  font-family: var(--font-brush);
  font-size: 0.35em;
  background: var(--seal);
  color: var(--paper-light);
  padding: 8px 12px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 16px;
  transform: rotate(5deg);
  letter-spacing: 0.1em;
  box-shadow: 0 3px 12px rgba(184, 58, 42, 0.3);
}

.hero-subtitle {
  font-family: var(--font-kai);
  font-size: clamp(14px, 4vw, 20px);
  color: var(--ink-light);
  letter-spacing: 0.25em;
  margin-bottom: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 16px;
}

.hero-quote {
  font-family: var(--font-serif-body);
  font-size: clamp(14px, 3.5vw, 17px);
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 auto 32px;
  line-height: 1.9;
  font-style: normal;
  position: relative;
  padding: 0 36px;
}

.hero-quote::before,
.hero-quote::after {
  font-family: var(--font-brush);
  font-size: 28px;
  color: var(--seal);
  opacity: 0.4;
  position: absolute;
}

.hero-quote::before {
  content: '「';
  left: 0;
  top: -5px;
}

.hero-quote::after {
  content: '」';
  right: 0;
  bottom: -10px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ====== 按钮 ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 2px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:hover {
  color: var(--seal);
  border-color: var(--seal);
  background: rgba(184, 58, 42, 0.04);
}

.btn-primary {
  background: var(--seal);
  color: var(--paper-light);
  border-color: var(--seal);
}

.btn-primary:hover {
  background: var(--seal-dark);
  border-color: var(--seal-dark);
  color: var(--paper-light);
  box-shadow: 0 4px 20px rgba(184, 58, 42, 0.3);
}

.btn-seal {
  background: var(--seal);
  color: var(--paper-light);
  border: none;
  font-family: var(--font-brush);
  font-size: 18px;
  padding: 14px 32px;
  letter-spacing: 0.2em;
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(184, 58, 42, 0.3);
  white-space: nowrap;
}

.btn:disabled, .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-seal:hover {
  background: var(--seal-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(184, 58, 42, 0.4);
}

/* ====== 卡片网格 ====== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }

.gu-card {
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px 28px;
  position: relative;
  transition: all 0.35s;
  cursor: pointer;
  overflow: hidden;
}

.gu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--seal), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.gu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(42, 36, 30, 0.1);
  border-color: var(--seal);
}

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

.card-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-brush);
  font-size: 14px;
  color: var(--seal);
  opacity: 0.6;
}

.card-kicker {
  font-family: var(--font-kai);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--seal);
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--font-brush);
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}

.card-desc {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.8;
  font-family: var(--font-body);
}

/* ====== 竹简时间线 ====== */
.bamboo-timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.bamboo-item {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  position: relative;
}

.bamboo-year {
  flex-shrink: 0;
  width: 120px;
  font-family: var(--font-brush);
  font-size: 22px;
  color: var(--seal);
  text-align: right;
  padding-top: 4px;
  letter-spacing: 0.1em;
  position: relative;
}

.bamboo-year::after {
  content: '';
  position: absolute;
  right: -18px;
  top: 14px;
  width: 12px;
  height: 12px;
  background: var(--seal);
  border-radius: 50%;
  border: 3px solid var(--paper);
  z-index: 2;
}

.bamboo-content {
  flex: 1;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-left: 4px solid var(--seal);
  padding: 20px 28px;
  border-radius: 0 4px 4px 0;
  position: relative;
}

.bamboo-content h4 {
  font-family: var(--font-brush);
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}

.bamboo-content p {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.8;
  font-family: var(--font-body);
}

.bamboo-timeline::before {
  content: '';
  position: absolute;
  left: 135px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(to bottom, var(--seal), var(--ochre), var(--azure));
  opacity: 0.3;
}

/* ====== 卷轴样式 ====== */
.scroll-container {
  position: relative;
  background: var(--paper-light);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 48px 56px;
  margin: 32px 0;
  box-shadow: 0 8px 32px rgba(42, 36, 30, 0.08);
}

.scroll-container::before,
.scroll-container::after {
  content: '';
  position: absolute;
  left: -8px;
  right: -8px;
  height: 24px;
  background: linear-gradient(to right, var(--ochre), var(--seal-dark), var(--ochre));
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(42, 36, 30, 0.2);
}

.scroll-container::before {
  top: -16px;
}

.scroll-container::after {
  bottom: -16px;
}

/* 竖排文字 */
.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-kai);
  letter-spacing: 0.3em;
  line-height: 2;
}

/* ====== 印章 ====== */
.seal-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--seal);
  color: var(--paper-light);
  font-family: var(--font-brush);
  font-size: 22px;
  letter-spacing: 0.05em;
  border-radius: 6px;
  transform: rotate(-5deg);
  box-shadow: 0 4px 16px rgba(184, 58, 42, 0.35);
  text-align: center;
  line-height: 1.2;
  padding: 8px;
  position: relative;
}

.seal-stamp::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(250, 243, 224, 0.4);
  border-radius: 3px;
}

.seal-stamp.small {
  width: 56px;
  height: 56px;
  font-size: 16px;
}

.seal-stamp.large {
  width: 120px;
  height: 120px;
  font-size: 32px;
}

/* ====== 表单 ====== */
.gu-form {
  max-width: 720px;
  margin: 0 auto;
}

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

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.form-label .required {
  color: var(--seal);
  margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper-light);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  transition: all 0.25s;
  line-height: 1.7;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--seal);
  box-shadow: 0 0 0 3px rgba(184, 58, 42, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ====== 工具页面通用 ====== */
.tool-container {
  max-width: 1080px;
  margin: 0 auto;
}

.tool-panel {
  background: var(--paper-light);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
}

.tool-panel-title {
  font-family: var(--font-brush);
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tool-panel-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--seal);
  border-radius: 2px;
}

/* ====== 页脚 ====== */
footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
  margin-top: 64px;
  background: linear-gradient(to bottom, transparent, var(--paper-deep));
  font-family: var(--font-body);
}

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

footer .footer-brand {
  font-family: var(--font-brush);
  font-size: 20px;
  color: var(--ink-light);
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}

footer .footer-meta {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  line-height: 1.8;
}

/* ====== 通知书样式 ====== */
.notice-paper {
  background: var(--paper-light);
  border: 2px solid var(--seal);
  padding: 64px 72px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 16px 48px rgba(42, 36, 30, 0.15);
}

.notice-paper::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line-strong);
  pointer-events: none;
}

.notice-title {
  font-family: var(--font-brush);
  font-size: 36px;
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.3em;
  margin-bottom: 36px;
  position: relative;
}

.notice-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--seal);
  margin: 16px auto 0;
}

.notice-body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.notice-body p {
  margin-bottom: 14px;
  text-indent: 2em;
}

.notice-body .no-indent {
  text-indent: 0;
}

.notice-body h4 {
  font-family: var(--font-brush);
  font-size: 17px;
  color: var(--seal);
  margin: 24px 0 12px;
  letter-spacing: 0.15em;
}

.notice-body ol {
  padding-left: 2em;
  margin-bottom: 12px;
}

.notice-body ol li {
  margin-bottom: 6px;
}

.notice-seal-area {
  text-align: right;
  margin-top: 48px;
}

.notice-signer {
  font-family: var(--font-brush);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}

.notice-date {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-light);
}

.notice-seal {
  position: absolute;
  bottom: 80px;
  right: 72px;
  opacity: 0.85;
}

/* 数字密钥样式 */
.id-key {
  font-family: var(--font-brush);
  font-size: 22px;
  color: var(--seal);
  letter-spacing: 0.15em;
  padding: 8px 20px;
  background: rgba(184, 58, 42, 0.08);
  border: 1px dashed var(--seal);
  border-radius: 3px;
  display: inline-block;
  margin: 8px 0;
}

/* ====== 使命卡片 ====== */
.mission-card .seal-num {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .mission-card {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 24px 20px !important;
  }
  .mission-card .seal-num {
    width: 60px;
    height: 60px;
    font-size: 28px !important;
    transform: rotate(-3deg);
  }
  .call-banner {
    padding: 40px 20px !important;
  }
  /* 工具页适配 */
  .cj-stages-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 6px !important;
  }
  .cj-stages-grid > div {
    padding: 12px 4px !important;
  }
  .holo-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .sf-parts-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .sf-result-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    justify-items: center;
  }
  .sf-result-grid > div:first-child {
    max-width: 180px;
  }
  .sf-topo-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .sf-topo-grid > div {
    padding: 10px 8px !important;
  }
  .sf-explain {
    column-count: 1 !important;
    line-height: 1.8 !important;
  }
  /* 基因链横向滚动容器 */
  .gene-chain-wrap {
    padding: 20px 12px !important;
  }
  /* 申请表单移动端 */
  .gu-form .tool-panel {
    padding: 24px 20px !important;
  }
}

@media (max-width: 480px) {
  .mission-card {
    padding: 20px 16px !important;
    gap: 16px !important;
  }
  .mission-card .seal-num {
    width: 52px;
    height: 52px;
    font-size: 24px !important;
  }
  .call-banner {
    padding: 32px 16px !important;
  }
}

/* ====== 响应式 ====== */
@media (max-width: 1280px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { padding: 0 24px; }
}

@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
  .hero-vertical-text { display: none; }
  .nav-brand-text { font-size: 20px; }
  .nav-brand-sub { font-size: 10px; letter-spacing: 0.2em; }
  .nav-seal { width: 36px; height: 36px; font-size: 19px; }
}

@media (max-width: 768px) {
  .nav-inner { padding: 0 16px; height: 64px; gap: 10px; }
  .main-wrap { padding: 0 16px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 32px; }
  .hero { padding: 60px 0 48px; }
  .card-grid, .card-grid.two, .card-grid.four { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .scroll-container { padding: 32px 24px; }
  .notice-paper { padding: 40px 24px; }
  .notice-seal { right: 24px; bottom: 60px; }
  .notice-title { font-size: 28px; }
  .bamboo-item { flex-direction: column; gap: 8px; }
  .bamboo-year { width: auto; text-align: left; padding-left: 24px; }
  .bamboo-year::after { left: 0; right: auto; }
  .bamboo-timeline::before { left: 5px; }
  .tool-panel { padding: 20px; }
  .nav-mobile { top: 64px; max-height: calc(100vh - 64px); }
  .nav-brand-text { font-size: 18px; letter-spacing: 0.05em; }
  .nav-brand-sub { font-size: 9px; letter-spacing: 0.15em; }
  .nav-seal { width: 32px; height: 32px; font-size: 17px; }
  .hero-title { letter-spacing: 0.15em; }
  .hero-subtitle { letter-spacing: 0.15em; font-size: 14px; }
  .section-title { font-size: clamp(26px, 7vw, 32px); letter-spacing: 0.15em; }
  .notice-title { font-size: clamp(22px, 6vw, 28px); letter-spacing: 0.2em; }
  .btn { padding: 10px 20px; font-size: 13px; min-height: 44px; }
  .form-input, .form-textarea, .form-select { padding: 12px 14px; font-size: 16px; min-height: 44px; }
  .form-label { font-size: 13px; }
}

@media (max-width: 480px) {
  .hero { padding: 48px 0 40px; }
  .hero-title { font-size: clamp(32px, 12vw, 44px); letter-spacing: 0.12em; }
  .hero-subtitle { font-size: 13px; letter-spacing: 0.12em; padding: 0 8px; }
  .hero-quote { padding: 0 28px; line-height: 1.8; margin-bottom: 24px; }
  .hero-quote::before, .hero-quote::after { font-size: 22px; }
  .hero-actions { gap: 10px; flex-wrap: wrap; justify-content: center; }
  .hero-actions .btn { flex: 0 0 auto; min-width: auto; }
  .section { padding: 40px 0; }
  .section-title { font-size: clamp(24px, 7vw, 28px); letter-spacing: 0.12em; }
  .section-subtitle { font-size: 14px; line-height: 1.7; }
  .section-eyebrow { font-size: 11px; letter-spacing: 0.3em; }
  .notice-paper { padding: 28px 20px; }
  .notice-title { font-size: clamp(20px, 6vw, 24px); letter-spacing: 0.15em; margin-bottom: 24px; }
  .notice-body { font-size: 14px; line-height: 1.8; }
  .notice-seal { right: 16px; bottom: 48px; width: 80px; height: 80px; font-size: 24px; }
  .notice-seal-area { margin-top: 32px; }
  .tool-panel { padding: 16px; }
  .tool-panel-title { font-size: 18px; letter-spacing: 0.1em; margin-bottom: 16px; }
  .card-desc { font-size: 13px; line-height: 1.7; }
  .card-title { font-size: 20px; }
  .nav-inner { height: 60px; }
  .nav-mobile { top: 60px; max-height: calc(100vh - 60px); }
  .nav-brand-text { font-size: 16px; }
  .nav-brand-sub { font-size: 8px; display: none; }
  .nav-seal { width: 30px; height: 30px; font-size: 16px; }
  /* 480px以下工具页强化适配 */
  .cj-stages-grid {
    gap: 4px !important;
  }
  .cj-stages-grid > div {
    padding: 10px 2px !important;
  }
  .cj-stages-grid > div > div:nth-child(2) {
    font-size: 10px !important;
  }
  .sf-topo-grid {
    grid-template-columns: 1fr !important;
  }
  .gene-chain-wrap {
    padding: 16px 8px !important;
  }
}

/* ====== 动画 ====== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sealPress {
  0% { transform: rotate(-5deg) scale(1.5); opacity: 0; }
  60% { transform: rotate(-5deg) scale(0.95); opacity: 0.9; }
  100% { transform: rotate(-5deg) scale(1); opacity: 1; }
}

@keyframes inkSpread {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes scrollUnroll {
  from { max-height: 0; opacity: 0; }
  to { max-height: 2000px; opacity: 1; }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.seal-animate {
  animation: sealPress 0.8s ease-out;
}

.ink-spread {
  animation: inkSpread 0.5s ease-out;
}

/* 字符演变动画 */
.char-evolve {
  transition: all 0.4s ease;
}

.char-evolve:hover {
  transform: scale(1.1);
}

/* SVG 古风装饰 */
.ink-splash {
  position: absolute;
  opacity: 0.08;
  pointer-events: none;
}

/* ====== 申请相关 ====== */
.dup-warning {
  background: #fff7e6;
  border: 1px solid #f5c78a;
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 24px;
  color: #8a5a0f;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.8;
}

.apply-success-guide {
  background: #f0f9eb;
  border: 1px solid #b7e0a0;
  border-radius: 4px;
  padding: 16px 20px;
  margin-top: 28px;
  color: #3d701f;
  font-family: var(--font-body);
  text-align: center;
}

/* ====== 申请记录页 ====== */
.records-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  font-family: var(--font-body);
  font-size: 14px;
}

.records-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: 0 0 4px 4px;
}

.record-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px 24px;
  transition: all 0.3s;
}

.record-card:hover {
  border-color: var(--seal-light);
  box-shadow: 0 2px 12px rgba(184, 58, 42, 0.08);
}

.record-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.record-name-area {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.record-name {
  font-family: var(--font-brush);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 0.1em;
}

.record-title {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-light);
}

.record-position {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(184, 58, 42, 0.08);
  color: var(--seal);
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-family: var(--font-body);
}

.record-id-key {
  font-family: "Courier New", monospace;
  font-size: 14px;
  color: var(--seal);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.record-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.record-detail-row {
  display: flex;
  gap: 12px;
}

.record-detail-label {
  flex-shrink: 0;
  color: var(--ink-light);
  width: 80px;
}

.record-detail-value {
  flex: 1;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.record-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.btn-sm {
  padding: 6px 16px !important;
  font-size: 12px !important;
  min-height: auto !important;
  letter-spacing: 0.1em !important;
}

.btn-danger {
  color: #c0392b !important;
  border-color: #e6b8b0 !important;
}

.btn-danger:hover {
  background: rgba(192, 57, 43, 0.06) !important;
  color: #a93225 !important;
  border-color: #c0392b !important;
}

.record-edit-title {
  font-family: var(--font-brush);
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.record-saved-tip {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #3d701f;
  color: #fff;
  padding: 10px 24px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-body);
}

.empty-icon {
  width: 72px;
  height: 72px;
  line-height: 72px;
  margin: 0 auto 20px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-brush);
  font-size: 32px;
  color: var(--ink-light);
  background: var(--paper);
}

.empty-title {
  font-family: var(--font-brush);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.empty-desc {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.8;
  margin-bottom: 24px;
}

/* 删除确认弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 20, 10, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: fadeIn 0.2s ease;
}

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

.modal-box {
  background: var(--paper-light);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  font-family: var(--font-body);
}

.modal-title {
  font-family: var(--font-brush);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  text-align: center;
}

.modal-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 640px) {
  .records-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .records-list { padding: 12px; }
  .record-card { padding: 16px; }
  .record-detail-label { width: 64px; font-size: 12px; }
  .modal-box { padding: 24px 20px; }
}

/* ============================================
   主题切换
   ============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--paper-light);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.25s;
  margin-left: 8px;
  flex-shrink: 0;
  position: relative;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.theme-toggle:hover {
  border-color: var(--seal);
  color: var(--seal);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.theme-toggle .theme-toggle-tooltip {
  display: none;
}

/* 移动端主题切换（汉堡菜单内） */
.nav-mobile-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 8px;
}

.nav-mobile-theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--paper-light);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.nav-mobile-theme-btn:hover {
  border-color: var(--seal);
  color: var(--seal);
}

.nav-mobile-theme-btn svg {
  width: 16px;
  height: 16px;
}

/* 主题切换时启用过渡 */
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 0.35s ease, color 0.35s ease,
              border-color 0.35s ease, box-shadow 0.35s ease !important;
}

/* ============================================
   深色模式补充：硬编码颜色修正
   ============================================ */
:root[data-theme="dark"] body::before {
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(224, 90, 72, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(111, 163, 196, 0.05) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.7 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.8;
}

:root[data-theme="dark"] body::after {
  background: linear-gradient(to bottom, rgba(111, 163, 196, 0.08), transparent);
}

:root[data-theme="dark"] .dup-warning {
  background: rgba(224, 90, 72, 0.1);
  border-color: rgba(224, 90, 72, 0.3);
}

:root[data-theme="dark"] .modal-overlay {
  background: rgba(10, 8, 6, 0.7);
}

:root[data-theme="dark"] .modal-box {
  background: var(--paper-light);
  border-color: var(--line-strong);
}

:root[data-theme="dark"] .saved-tip {
  background: rgba(123, 174, 139, 0.15);
  color: var(--jade);
  border-color: rgba(123, 174, 139, 0.3);
}

/* 跟随系统深色时的补充样式 */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] body::before {
    background-image:
      radial-gradient(ellipse at 20% 30%, rgba(224, 90, 72, 0.06) 0%, transparent 50%),
      radial-gradient(ellipse at 80% 70%, rgba(111, 163, 196, 0.05) 0%, transparent 50%),
      url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.7 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.8;
  }
  :root[data-theme="auto"] body::after {
    background: linear-gradient(to bottom, rgba(111, 163, 196, 0.08), transparent);
  }
  :root[data-theme="auto"] .dup-warning {
    background: rgba(224, 90, 72, 0.1);
    border-color: rgba(224, 90, 72, 0.3);
  }
  :root[data-theme="auto"] .modal-overlay {
    background: rgba(10, 8, 6, 0.7);
  }
  :root[data-theme="auto"] .modal-box {
    background: var(--paper-light);
    border-color: var(--line-strong);
  }
  :root[data-theme="auto"] .saved-tip {
    background: rgba(123, 174, 139, 0.15);
    color: var(--jade);
    border-color: rgba(123, 174, 139, 0.3);
  }
}
