:root {
  /* === 宣纸色阶 === */
  --paper:          #efe5d0;
  --paper-warm:     #ead9b8;
  --paper-deep:     #d8caa6;

  /* === 文字色（墨色阶） === */
  --ink-full:       #1a1814;
  --ink-medium:     #3d3530;
  --ink-light:      #6b5a3e;
  --ink-faint:      #a89e85;

  /* === 强调色 === */
  --cinnobar:       #a23b2c;
  --cinnobar-deep:  #7a2a20;
  --indigo:         #3a5a7c;
  --ochre:          #a36840;
  --teng-oil:       #c89858;
  --aloes:          #9a7d4a;

  /* === 深色块 === */
  --panel-ink:      #2a1f12;
  --panel-ochre:    #4a2f1a;
  --panel-indigo:   #1f2d3e;

  /* === 字体 === */
  --font-display:  'Noto Serif SC', serif;
  --font-deco:     'ZCOOL XiaoWei', serif;
  --font-brush:    'Ma Shan Zheng', cursive;
  --font-mono:     'JetBrains Mono', monospace;
  --font-body:     'Noto Serif SC', serif;

  /* === 缓动 === */
  --ease-brush:    cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink-full);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 宣纸颗粒纹理 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(168, 158, 133, 0.10) 1.2px, transparent 1.2px),
    radial-gradient(circle at 70% 60%, rgba(107, 90, 62, 0.06) 1px, transparent 1px);
  background-size: 60px 60px, 80px 80px;
  pointer-events: none;
  z-index: 0;
}

/* 四角晕染 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at top left, transparent 35%, rgba(184, 158, 105, 0.3) 100%),
    radial-gradient(ellipse at bottom right, transparent 35%, rgba(184, 158, 105, 0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ============ 公共 nav ============ */
.top-nav {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 56px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink-faint);
}
.brand { display: flex; align-items: baseline; gap: 16px; }
.brand-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--cinnobar);
  color: var(--paper);
  font-family: var(--font-brush);
  font-size: 24px;
  border-radius: 4px;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.brand-tag {
  font-family: var(--font-deco);
  font-size: 14px;
  color: var(--ink-light);
  letter-spacing: 0.25em;
  margin-left: 8px;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--font-display);
  font-size: 15px;
}
.nav-links a {
  color: var(--ink-medium);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.3s var(--ease-brush);
}
.nav-links a:hover { color: var(--cinnobar); border-bottom-color: var(--cinnobar); }
.nav-links a.active { color: var(--ink-full); border-bottom-color: var(--ink-full); }

/* 移动端 nav 收起 */
.nav-toggle { display: none; }
@media (max-width: 768px) {
  .top-nav { padding: 24px 24px 16px; flex-wrap: wrap; }
  .brand-tag { display: none; }
  .nav-links { width: 100%; justify-content: space-around; gap: 8px; font-size: 14px; padding-top: 12px; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  z-index: 2;
  padding: 64px 56px 80px;
  text-align: center;
  overflow: hidden;
  max-width: 1320px;
  margin: 0 auto;
}
.hero-watermark {
  position: absolute;
  font-family: var(--font-brush);
  font-size: clamp(400px, 60vw, 800px);
  color: var(--cinnobar);
  opacity: 0.06;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  z-index: 0;
  pointer-events: none;
  line-height: 1;
  user-select: none;
}
.hero-inner { position: relative; z-index: 2; }
.hero-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-light);
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(96px, 16vw, 220px);
  font-weight: 700;
  letter-spacing: 0.4em;
  line-height: 1;
  color: var(--ink-full);
  margin-bottom: 24px;
  padding-left: 0.4em;
}
.hero-title .accent { color: var(--cinnobar); }
.hero-period {
  font-family: var(--font-deco);
  font-size: clamp(18px, 2vw, 24px);
  color: var(--cinnobar);
  letter-spacing: 0.3em;
  margin-bottom: 16px;
}
.hero-sub {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-light);
  font-weight: 300;
  letter-spacing: 0.2em;
  line-height: 1.9;
}

/* ============ Section 通用 ============ */
.section {
  padding: 96px 56px;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 32px;
  margin-bottom: 56px;
}
.section-num-big {
  font-family: var(--font-brush);
  font-size: clamp(80px, 10vw, 140px);
  color: var(--cinnobar);
  line-height: 0.9;
}
.section-title-block {
  flex: 1;
  border-left: 1px solid var(--ink-faint);
  padding-left: 32px;
  padding-top: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.section-desc {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-light);
  font-weight: 300;
  letter-spacing: 0.15em;
}

/* ============ Footer ============ */
.footer {
  margin: 96px auto 0;
  max-width: 1320px;
  padding: 32px 56px;
  border-top: 1px solid var(--ink-faint);
  color: var(--ink-light);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
}
.footer .accent { color: var(--cinnobar); }

/* ============ 图例 ============ */
.legend {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--ink-faint);
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-light);
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}
.legend-dot.l1 { background: var(--paper); border: 1px solid var(--ink-faint); }
.legend-dot.l2 { background: var(--ochre); }
.legend-dot.l3 { background: var(--cinnobar); }
.legend-dot.l4 { background: var(--teng-oil); box-shadow: 0 0 8px var(--teng-oil); }

/* ============ 卷轴印章主区 ============ */
.scroll-section {
  padding: 64px 56px 96px;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.scroll-section-head {
  display: flex;
  align-items: baseline;
  gap: 32px;
  margin-bottom: 56px;
}
.scroll-section-num {
  font-family: var(--font-brush);
  font-size: clamp(80px, 10vw, 140px);
  color: var(--cinnobar);
  line-height: 0.9;
}
.scroll-section-title-block {
  flex: 1;
  border-left: 1px solid var(--ink-faint);
  padding-left: 32px;
  padding-top: 8px;
}
.scroll-section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.scroll-section-desc {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-light);
  font-weight: 300;
  letter-spacing: 0.15em;
}

/* 卷轴外框 */
.scroll-frame {
  position: relative;
  background: var(--paper-warm);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(26, 24, 20, 0.10);
}

/* 卷轴左右木轴 */
.scroll-rod {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  background: linear-gradient(180deg, var(--panel-ink) 0%, #1a1208 50%, var(--panel-ink) 100%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-rod.left { left: 0; }
.scroll-rod.right { right: 0; }
.scroll-rod-cap {
  position: absolute;
  width: 44px;
  height: 44px;
  background: var(--cinnobar);
  border-radius: 50%;
  border: 3px solid var(--panel-ink);
  box-shadow: 0 0 0 2px var(--cinnobar);
}
.scroll-rod-cap.top { top: -22px; }
.scroll-rod-cap.bottom { bottom: -22px; }

/* 卷心 - 横向滚动区 */
.scroll-inner {
  margin: 0 32px;
  padding: 80px 64px 100px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--cinnobar) transparent;
  position: relative;
}
.scroll-inner::-webkit-scrollbar { height: 6px; }
.scroll-inner::-webkit-scrollbar-thumb { background: var(--cinnobar); border-radius: 3px; }
.scroll-inner::-webkit-scrollbar-track { background: rgba(107, 90, 62, 0.1); border-radius: 3px; }

.scroll-inner::before {
  content: '足 迹';
  position: absolute;
  top: 24px;
  right: 80px;
  font-family: var(--font-brush);
  font-size: 80px;
  color: var(--cinnobar);
  opacity: 0.06;
  line-height: 1;
  pointer-events: none;
  letter-spacing: 0.3em;
}
.scroll-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(168, 158, 133, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.5;
}

/* 主脊柱 */
.spine {
  position: absolute;
  left: 64px;
  right: 64px;
  top: 50%;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--cinnobar) 5%,
    var(--cinnobar) 95%,
    transparent 100%);
  opacity: 0.5;
  z-index: 1;
}

/* 节点容器 */
.seal-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 80px;
  min-width: max-content;
  padding: 0 64px;
  position: relative;
  z-index: 2;
}

/* ============ 印章节点 ============ */
.seal-node {
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.seal {
  width: 130px;
  height: 130px;
  background: var(--cinnobar);
  color: var(--paper);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.4s var(--ease-brush);
  cursor: pointer;
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 3px var(--cinnobar),
    inset 0 0 0 4px var(--paper-warm),
    inset 0 0 0 7px var(--cinnobar);
}
.seal:hover {
  transform: translateY(-6px) rotate(-2deg);
  box-shadow:
    inset 0 0 0 3px var(--cinnobar),
    inset 0 0 0 4px var(--paper-warm),
    inset 0 0 0 7px var(--cinnobar),
    0 16px 32px rgba(162, 59, 44, 0.3);
}

/* Level 配色 */
.seal.l1 {
  background: var(--paper);
  color: var(--ink-faint);
  box-shadow:
    inset 0 0 0 3px var(--ink-faint),
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 7px var(--ink-faint);
}
.seal.l1:hover {
  box-shadow:
    inset 0 0 0 3px var(--ink-faint),
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 7px var(--ink-faint),
    0 16px 32px rgba(168, 158, 133, 0.3);
}
.seal.l2 {
  background: var(--ochre);
  box-shadow:
    inset 0 0 0 3px var(--ochre),
    inset 0 0 0 4px var(--paper-warm),
    inset 0 0 0 7px var(--ochre);
}
.seal.l3 { background: var(--cinnobar); }
.seal.l4 {
  background: var(--teng-oil);
  color: var(--panel-ink);
  box-shadow:
    inset 0 0 0 3px var(--teng-oil),
    inset 0 0 0 4px var(--panel-ink),
    inset 0 0 0 7px var(--teng-oil),
    0 0 32px rgba(200, 152, 88, 0.4);
}
.seal.future {
  background: transparent;
  color: var(--ink-faint);
  border: 2px dashed var(--ink-faint);
  box-shadow: none;
}

.seal-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  opacity: 0.85;
  text-align: center;
}
.seal-name {
  font-family: var(--font-brush);
  font-size: 36px;
  line-height: 1;
  text-align: center;
  margin: 4px 0;
}
.seal-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-deco);
  font-size: 10px;
  letter-spacing: 0.1em;
}

/* ============ 印章分刺（上下交替） ============ */
.seal-detail {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: linear-gradient(180deg, var(--cinnobar) 0%, transparent 100%);
  opacity: 0.4;
}
.seal-row .seal-node:nth-child(odd) .seal-detail {
  top: 100%;
  height: 60px;
}
.seal-row .seal-node:nth-child(odd) .seal-detail-text {
  position: absolute;
  top: calc(100% + 72px);
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  text-align: center;
}
.seal-row .seal-node:nth-child(even) .seal-detail {
  bottom: 100%;
  height: 60px;
  background: linear-gradient(0deg, var(--cinnobar) 0%, transparent 100%);
}
.seal-row .seal-node:nth-child(even) .seal-detail-text {
  position: absolute;
  bottom: calc(100% + 72px);
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  text-align: center;
}

.seal-detail-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-full);
  line-height: 1.5;
  margin-bottom: 6px;
}
.seal-detail-evidence {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.1em;
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.3em;
  z-index: 5;
  background: var(--paper-warm);
  padding: 6px 16px;
  border-radius: 12px;
  border: 1px solid var(--ink-faint);
  opacity: 0.7;
}

/* ============ 移动端印章方阵（768px 以下） ============ */
.seal-grid-mobile {
  display: none;
  background: var(--paper-warm);
  padding: 32px;
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  border: 1px solid var(--ink-faint);
}
.seal-grid-mobile .seal {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  padding: 12px;
}
.seal-grid-mobile .seal-name {
  font-size: 28px;
}

@media (max-width: 768px) {
  .scroll-frame { display: none; }
  .seal-grid-mobile { display: grid; }
  .scroll-section { padding: 56px 24px; }
  .hero { padding: 40px 24px 56px; }
  .section { padding: 56px 24px; }
  .section-head { flex-direction: column; gap: 16px; align-items: flex-start; }
  .section-title-block { border-left: none; padding-left: 0; }
  .legend { flex-wrap: wrap; gap: 16px; }
  .footer { padding: 24px; flex-direction: column; gap: 8px; }
  .top-nav { padding: 24px 24px 16px; flex-wrap: wrap; }
  .brand-tag { display: none; }
  .nav-links { width: 100%; justify-content: space-around; gap: 8px; font-size: 14px; padding-top: 12px; }
}

/* ============ Modal ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 20, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s var(--ease-brush);
  pointer-events: none;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--paper-warm);
  border: 1px solid var(--cinnobar);
  border-radius: 4px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 0;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.4s var(--ease-brush);
  box-shadow: 0 24px 60px rgba(26, 24, 20, 0.3);
}
.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.modal-card.l1::before { background: var(--ink-faint); }
.modal-card.l2::before { background: var(--ochre); }
.modal-card.l3::before { background: var(--cinnobar); }
.modal-card.l4::before { background: var(--teng-oil); box-shadow: 0 0 12px var(--teng-oil); }

.modal-header {
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--ink-faint);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.modal-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-light);
  letter-spacing: 0.2em;
}
.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--ink-light);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--cinnobar); }

.modal-body {
  padding: 24px 32px 32px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-full);
  margin-bottom: 8px;
}
.modal-level {
  font-family: var(--font-deco);
  font-size: 13px;
  letter-spacing: 0.15em;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-faint);
}
.modal-level.l1 { color: var(--ink-faint); }
.modal-level.l2 { color: var(--ochre); }
.modal-level.l3 { color: var(--cinnobar); }
.modal-level.l4 { color: var(--teng-oil); }

.modal-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
  margin-top: 16px;
}
.modal-desc {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-medium);
  line-height: 1.8;
  margin-bottom: 16px;
}
.modal-evidences {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}
.modal-evidences li {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-medium);
  padding: 4px 0 4px 20px;
  position: relative;
}
.modal-evidences li::before {
  content: '·';
  position: absolute;
  left: 8px;
  color: var(--cinnobar);
  font-weight: 700;
}
.modal-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.modal-related a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cinnobar);
  text-decoration: none;
  border: 1px solid var(--cinnobar);
  padding: 4px 10px;
  letter-spacing: 0.1em;
  transition: all 0.3s var(--ease-brush);
}
.modal-related a:hover {
  background: var(--cinnobar);
  color: var(--paper);
}

/* ============ 掌握度色阶 ============ */
.mastery-section {
  background: var(--paper);
}
.mastery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.swatch {
  background: var(--paper-warm);
  padding: 36px 28px;
  border: 1px solid rgba(107, 90, 62, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-brush);
}
.swatch:hover {
  transform: translateY(-4px);
  border-color: var(--cinnobar);
  box-shadow: 0 12px 24px rgba(26, 24, 20, 0.08);
}
.swatch::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.swatch.l1::before { background: var(--ink-faint); }
.swatch.l2::before { background: var(--ink-light); }
.swatch.l3::before { background: var(--cinnobar); }
.swatch.l4::before { background: var(--teng-oil); box-shadow: 0 0 12px var(--teng-oil); }
.swatch-num {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: var(--font-brush);
  font-size: 56px;
  color: var(--cinnobar);
  opacity: 0.08;
  line-height: 1;
}
.swatch-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-bottom: 20px;
  margin-top: 24px;
}
.swatch.l1 .swatch-dot { background: var(--ink-faint); }
.swatch.l2 .swatch-dot { background: var(--ink-light); }
.swatch.l3 .swatch-dot { background: var(--cinnobar); box-shadow: 0 0 0 4px rgba(162, 59, 44, 0.12); }
.swatch.l4 .swatch-dot { background: var(--teng-oil); box-shadow: 0 0 16px rgba(200, 152, 88, 0.5); }
.swatch-cn {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}
.swatch-en {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}
.swatch-hex {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.swatch-desc {
  font-size: 13px;
  color: var(--ink-medium);
  line-height: 1.8;
}

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

/* ============ Home 页 ============ */
.home-intro {
  padding: 64px 56px;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.intro-card {
  background: var(--paper-warm);
  padding: 56px 64px;
  border: 1px solid var(--ink-faint);
  position: relative;
  overflow: hidden;
}
.intro-card::before {
  content: '序';
  position: absolute;
  top: 16px;
  right: 28px;
  font-family: var(--font-brush);
  font-size: 80px;
  color: var(--cinnobar);
  opacity: 0.1;
  line-height: 1;
}
.intro-num {
  font-family: var(--font-brush);
  font-size: 32px;
  color: var(--cinnobar);
  margin-bottom: 16px;
}
.intro-name {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--ink-full);
}
.intro-role {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink-medium);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}
.intro-direction {
  font-family: var(--font-deco);
  font-size: 14px;
  color: var(--cinnobar);
  letter-spacing: 0.2em;
  margin-bottom: 24px;
}
.intro-text {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink-medium);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 600px;
}
.intro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  border: 1px solid var(--ink-faint);
  padding: 4px 12px;
  letter-spacing: 0.15em;
}

/* ============ mini 卷轴 ============ */
.home-mini {
  padding: 64px 56px 96px;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.mini-scroll-frame {
  background: var(--paper-warm);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  padding: 48px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(26, 24, 20, 0.08);
}
.mini-scroll-frame::before {
  content: '';
  position: absolute;
  left: 64px;
  right: 64px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--cinnobar) 50%, transparent 100%);
  opacity: 0.4;
}
.mini-seal-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
  z-index: 2;
}
.mini-seal-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.mini-seal {
  width: 80px;
  height: 80px;
  background: var(--cinnobar);
  color: var(--paper);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 2px var(--cinnobar),
    inset 0 0 0 3px var(--paper-warm),
    inset 0 0 0 5px var(--cinnobar);
  transition: all 0.4s var(--ease-brush);
  margin-bottom: 16px;
}
.mini-seal:hover {
  transform: translateY(-4px) rotate(-2deg);
}
.mini-seal.l1 {
  background: var(--paper);
  color: var(--ink-faint);
  box-shadow: inset 0 0 0 2px var(--ink-faint), inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--ink-faint);
}
.mini-seal.l2 {
  background: var(--ochre);
  box-shadow: inset 0 0 0 2px var(--ochre), inset 0 0 0 3px var(--paper-warm), inset 0 0 0 5px var(--ochre);
}
.mini-seal.l4 {
  background: var(--teng-oil);
  color: var(--panel-ink);
  box-shadow: inset 0 0 0 2px var(--teng-oil), inset 0 0 0 3px var(--panel-ink), inset 0 0 0 5px var(--teng-oil), 0 0 16px rgba(200, 152, 88, 0.4);
}
.mini-seal.future {
  background: transparent;
  color: var(--ink-faint);
  border: 1.5px dashed var(--ink-faint);
  box-shadow: none;
}
.mini-seal-date {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  opacity: 0.85;
  text-align: center;
}
.mini-seal-name {
  font-family: var(--font-brush);
  font-size: 22px;
  line-height: 1;
  text-align: center;
}
.mini-seal-meta {
  font-family: var(--font-deco);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-align: center;
}
.mini-seal-label {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-medium);
  letter-spacing: 0.1em;
  line-height: 1.4;
}
.mini-seal-label .date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-light);
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 4px;
}

.home-cta {
  text-align: center;
  margin-top: 40px;
}
.cta-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-full);
  text-decoration: none;
  padding: 12px 32px;
  border: 1px solid var(--cinnobar);
  letter-spacing: 0.15em;
  transition: all 0.4s var(--ease-brush);
  position: relative;
  overflow: hidden;
}
.cta-link:hover {
  background: var(--cinnobar);
  color: var(--paper);
}

@media (max-width: 768px) {
  .home-intro, .home-mini { padding: 32px 24px; }
  .intro-card { padding: 32px 24px; }
  .mini-seal-row { flex-wrap: wrap; gap: 24px; }
  .mini-seal-node { flex: 0 0 calc(50% - 12px); }
}

/* ============ Work 页 ============ */
.work-section {
  padding: 64px 56px 96px;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.project-card {
  background: var(--paper-warm);
  padding: 36px 32px;
  border: 1px solid rgba(107, 90, 62, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-brush);
  text-decoration: none;
  color: inherit;
  display: block;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--cinnobar);
  box-shadow: 0 12px 24px rgba(26, 24, 20, 0.08);
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.project-card.cat-project { /* 朱砂 */
  --card-accent: var(--cinnobar);
}
.project-card.cat-project::before { background: var(--cinnobar); }
.project-card.cat-tool { /* 赭石 */
  --card-accent: var(--ochre);
}
.project-card.cat-tool::before { background: var(--ochre); }
.project-card.cat-research { /* 石青 */
  --card-accent: var(--indigo);
}
.project-card.cat-research::before { background: var(--indigo); }

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.project-year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.2em;
}
.project-arrow {
  font-size: 18px;
  color: var(--ink-faint);
  transition: all 0.4s var(--ease-brush);
}
.project-card:hover .project-arrow {
  color: var(--card-accent);
  transform: translateX(4px);
}
.project-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-full);
  margin-bottom: 8px;
}
.project-tagline {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-medium);
  line-height: 1.6;
  margin-bottom: 20px;
}
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--ink-faint);
}
.stack-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-light);
  border: 1px solid var(--ink-faint);
  padding: 2px 8px;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .work-section { padding: 56px 24px; }
  .work-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ============ Contact 页 ============ */
.contact-section {
  padding: 64px 56px 96px;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.contact-card {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  background: var(--paper-warm);
  padding: 48px;
  border: 1px solid var(--ink-faint);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '問';
  position: absolute;
  top: 16px;
  right: 32px;
  font-family: var(--font-brush);
  font-size: 100px;
  color: var(--cinnobar);
  opacity: 0.06;
  line-height: 1;
}
.contact-form {
  position: relative;
  z-index: 2;
}
.form-field {
  margin-bottom: 24px;
}
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-medium);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}
.form-field .required {
  color: var(--cinnobar);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--ink-faint);
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-full);
  transition: all 0.3s var(--ease-brush);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--cinnobar);
  box-shadow: 0 0 0 3px rgba(162, 59, 44, 0.15);
}
.form-field textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-display);
}
.submit-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--paper);
  background: var(--cinnobar);
  border: none;
  padding: 12px 32px;
  cursor: pointer;
  letter-spacing: 0.2em;
  border-radius: 2px;
  transition: all 0.3s var(--ease-brush);
}
.submit-btn:hover {
  background: var(--cinnobar-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(162, 59, 44, 0.3);
}
.submit-btn:disabled {
  background: var(--ink-faint);
  cursor: not-allowed;
  transform: none;
}
.form-status {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-medium);
}
.form-status.success { color: var(--indigo); }
.form-status.error { color: var(--cinnobar); }

.direct-contacts {
  position: relative;
  z-index: 2;
  padding-left: 32px;
  border-left: 1px solid var(--ink-faint);
}
.contact-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.direct-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--ink-faint);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s var(--ease-brush);
}
.direct-link:last-child { border-bottom: none; }
.direct-link:hover .direct-value {
  color: var(--cinnobar);
}
.direct-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-light);
  letter-spacing: 0.2em;
}
.direct-value {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-full);
  transition: color 0.3s var(--ease-brush);
}

@media (max-width: 768px) {
  .contact-section { padding: 56px 24px; }
  .contact-card { grid-template-columns: 1fr; padding: 32px 24px; gap: 32px; }
  .direct-contacts { padding-left: 0; border-left: none; border-top: 1px solid var(--ink-faint); padding-top: 24px; }
}

/* ============ 访客题印 ============ */
.direct-contacts-full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.direct-link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  background: var(--paper-warm);
  text-decoration: none;
  transition: border-color 0.3s var(--ease-brush), transform 0.3s var(--ease-brush);
}
.direct-link-card:hover {
  border-color: var(--cinnobar);
  transform: translateY(-2px);
}
.direct-link-card .direct-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.2em;
}
.direct-link-card .direct-value {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink-full);
}

/* 题印网格 */
.guestbook-section {
  padding: 96px 56px 56px;
  max-width: 1320px;
  margin: 0 auto;
}
.guestbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 56px;
}
.gb-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.15em;
}

/* 单字印章 + 留言卡 */
.guest-seal {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 20px 22px;
  background: var(--paper-warm);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  transition: transform 0.3s var(--ease-brush), border-color 0.3s var(--ease-brush);
}
.guest-seal:hover {
  transform: translateY(-2px);
  border-color: var(--cinnobar);
}
.guest-seal-char {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cinnobar);
  color: var(--paper);
  font-family: var(--font-brush);
  font-size: 32px;
  font-weight: 700;
  border-radius: 2px;
  box-shadow: 0 0 0 2px var(--paper-warm), 0 0 0 3px var(--cinnobar);
  align-self: flex-start;
}
.guest-seal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.guest-seal-content {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-full);
  line-height: 1.7;
  letter-spacing: 0.05em;
  word-break: break-word;
}
.guest-seal-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.guest-seal-name {
  color: var(--ink-medium);
  font-family: var(--font-display);
  font-size: 12px;
}
.guest-seal-date {
  color: var(--ink-faint);
}

/* 题印表单 */
.guestbook-form-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 48px;
  background: var(--paper-warm);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
}
.guestbook-form-title {
  font-family: var(--font-display);
  font-size: 18px;
  text-align: center;
  letter-spacing: 0.4em;
  color: var(--cinnobar);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-faint);
}
.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Tab 切换：題印 / 私笺 */
.gb-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--ink-faint);
}
.gb-tab {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-light);
  letter-spacing: 0.25em;
  border-bottom: 2px solid transparent;
  transition: color 0.3s var(--ease-brush), border-color 0.3s var(--ease-brush);
}
.gb-tab:hover { color: var(--ink-medium); }
.gb-tab.active {
  color: var(--cinnobar);
  border-bottom-color: var(--cinnobar);
}
.gb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.gb-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-light);
}
.gb-field .required {
  color: var(--cinnobar);
}
.gb-field input,
.gb-field textarea {
  background: var(--paper);
  border: 1px solid var(--ink-faint);
  border-radius: 2px;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-full);
  letter-spacing: 0.05em;
  resize: vertical;
  transition: border-color 0.2s var(--ease-brush);
}
.gb-field input:focus,
.gb-field textarea:focus {
  outline: none;
  border-color: var(--cinnobar);
}
.gb-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.gb-submit {
  margin-top: 8px;
  padding: 12px 24px;
  background: var(--cinnobar);
  color: var(--paper);
  border: none;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.4em;
  cursor: pointer;
  transition: background 0.2s var(--ease-brush);
}
.gb-submit:hover {
  background: var(--cinnobar-deep);
}
.gb-status {
  font-family: var(--font-display);
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.15em;
  min-height: 18px;
  color: var(--ink-light);
}
.gb-status.success { color: var(--cinnobar); }
.gb-status.error { color: var(--cinnobar-deep); }

/* 题印表单下方：直接写信链接 */
.gb-alt-contact {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.gb-alt-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-light);
}
.gb-alt-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--paper);
  border: 1px solid var(--ink-faint);
  border-radius: 24px;
  text-decoration: none;
  color: var(--ink-full);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: border-color 0.3s var(--ease-brush), background 0.3s var(--ease-brush), transform 0.3s var(--ease-brush);
}
.gb-alt-link:hover {
  border-color: var(--cinnobar);
  background: var(--paper-deep);
  transform: translateY(-1px);
}
.gb-alt-icon {
  font-size: 16px;
  color: var(--cinnobar);
}
.gb-alt-arrow {
  font-size: 12px;
  color: var(--ink-faint);
  transition: transform 0.3s var(--ease-brush), color 0.3s var(--ease-brush);
}
.gb-alt-link:hover .gb-alt-arrow {
  color: var(--cinnobar);
  transform: translate(2px, -2px);
}

@media (max-width: 768px) {
  .guestbook-section { padding: 56px 24px; }
  .direct-contacts-full { grid-template-columns: 1fr; }
  .guestbook-grid { grid-template-columns: 1fr; }
  .guestbook-form-wrap { padding: 32px 24px; }
}

/* ============ 钤印成功弹窗 ============ */
.seal-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 20, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease-brush);
  cursor: pointer;
}
.seal-dialog-overlay.show {
  opacity: 1;
}
.seal-dialog-card {
  background: var(--paper-warm);
  border: 1px solid var(--cinnobar);
  border-radius: 6px;
  padding: 56px 80px 40px;
  text-align: center;
  position: relative;
  transform: translateY(20px) scale(0.92);
  opacity: 0;
  transition: transform 0.5s var(--ease-brush), opacity 0.4s var(--ease-brush);
  box-shadow: 0 24px 80px rgba(26, 24, 20, 0.4);
  max-width: 90vw;
}
.seal-dialog-overlay.show .seal-dialog-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.seal-dialog-stamp {
  width: 110px;
  height: 110px;
  margin: 0 auto 24px;
  background: var(--cinnobar);
  color: var(--paper);
  font-family: var(--font-brush);
  font-size: 64px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  box-shadow: 0 0 0 4px var(--paper-warm), 0 0 0 5px var(--cinnobar);
  transform: scale(0) rotate(-45deg);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.seal-dialog-stamp.stamp-in {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}
.seal-dialog-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5em;
  color: var(--cinnobar-deep);
  margin-bottom: 12px;
  padding-left: 0.5em;
}
.seal-dialog-sub {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-light);
  letter-spacing: 0.25em;
  margin-bottom: 24px;
}
.seal-dialog-divider {
  width: 40px;
  height: 1px;
  background: var(--ink-faint);
  margin: 0 auto 20px;
}
.seal-dialog-foot {
  font-family: var(--font-brush);
  font-size: 18px;
  color: var(--ink-light);
  letter-spacing: 0.5em;
  padding-left: 0.5em;
}
@media (max-width: 768px) {
  .seal-dialog-card { padding: 40px 32px 28px; }
  .seal-dialog-stamp { width: 88px; height: 88px; font-size: 48px; }
  .seal-dialog-title { font-size: 22px; }
}

/* 私笺弹窗：深朱砂差异色（区别于题印） */
.letter-dialog-card {
  border-color: var(--cinnobar-deep);
}
.letter-stamp {
  background: var(--cinnobar-deep);
  box-shadow: 0 0 0 4px var(--paper-warm), 0 0 0 5px var(--cinnobar-deep);
}
.letter-title {
  color: var(--cinnobar-deep);
}
.letter-foot {
  color: var(--cinnobar-deep);
}


/* ============ Battle 卷轴微调（底色统一，局部色卡） ============ */
.hero-battle .hero-watermark {
  color: var(--cinnobar-deep);
  opacity: 0.09;
}
.hero-battle .hero-period {
  color: var(--cinnobar-deep);
}
.hero-battle .hero-title .accent {
  color: var(--cinnobar-deep);
}

/* 思 · 茶褐（沉稳内省） */
.hero-reflection .hero-watermark {
  color: var(--ochre);
  opacity: 0.10;
}
.hero-reflection .hero-period,
.hero-reflection .hero-title .accent {
  color: var(--ochre);
}

/* 跡 · 赭石（行旅风尘） */
.hero-trace .hero-watermark {
  color: var(--ink-light);
  opacity: 0.10;
}
.hero-trace .hero-period,
.hero-trace .hero-title .accent {
  color: var(--ochre);
}

/* 言 · 朱砂（字字钤印） */
.hero-words .hero-watermark {
  color: var(--cinnobar);
  opacity: 0.10;
}
.hero-words .hero-period,
.hero-words .hero-title .accent {
  color: var(--cinnobar);
}

/* ============ 言页面 · 不规则方阵 ============ */
.words-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 120px;
  grid-auto-flow: dense;
  gap: 18px;
  padding: 0 64px 80px;
  position: relative;
  z-index: 2;
}
.word-card {
  background: var(--paper-warm);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.3s var(--ease-brush), border-color 0.3s var(--ease-brush), background 0.3s var(--ease-brush);
  position: relative;
  overflow: hidden;
}
.word-card:hover {
  transform: translateY(-2px);
  border-color: var(--cinnobar);
  background: var(--paper-deep);
}
.word-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.word-card-char {
  font-family: var(--font-brush);
  font-size: 18px;
  color: var(--cinnobar);
  opacity: 0.6;
}
.word-card-quote {
  font-family: var(--font-display);
  color: var(--ink-full);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.05em;
}
.word-card-sub {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-light);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.08em;
}
.word-card-title {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.2em;
  text-align: right;
}

/* 不规则 span：L4=big, L3=medium, L2=small */
.word-card.w-big {
  grid-column: span 6;
  grid-row: span 2;
}
.word-card.w-big .word-card-quote {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
}
.word-card.w-big .word-card-char {
  font-size: 24px;
}
.word-card.w-medium {
  grid-column: span 4;
  grid-row: span 1;
}
.word-card.w-medium .word-card-quote {
  font-size: clamp(18px, 1.6vw, 22px);
}
.word-card.w-small {
  grid-column: span 3;
  grid-row: span 1;
}
.word-card.w-small .word-card-quote {
  font-size: 15px;
}

/* L4 加藤黄金 accent（左上小角块） */
.word-card.l4::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 4px;
  background: var(--teng-oil);
}

@media (max-width: 768px) {
  .words-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    padding: 0 24px 56px;
    gap: 12px;
  }
  .word-card.w-big,
  .word-card.w-medium,
  .word-card.w-small {
    grid-column: span 2;
    grid-row: auto;
  }
  .word-card.w-big .word-card-quote { font-size: 22px; }
  .word-card.w-medium .word-card-quote { font-size: 17px; }
}

/* 战谱卷内分卷小标题（替代独立 section-head） */
.battle-subhead {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 48px 0 0;
  padding: 0 64px;
  position: relative;
  z-index: 2;
}
.battle-subhead-char {
  font-family: var(--font-brush);
  font-size: 32px;
  color: var(--cinnobar);
  line-height: 1;
  letter-spacing: 0;
}
.battle-subhead-text {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-light);
  letter-spacing: 0.25em;
  font-weight: 400;
  border-left: 1px solid var(--ink-faint);
  padding-left: 14px;
}
.battle-subhead-second {
  margin-top: 80px;
}

/* ============================================================ */
/* ============ v2 增量：4 类交互 + dark theme ================= */
/* ============================================================ */

/* === Dark theme token override（沉香墨夜·提亮版） === */
html[data-theme="dark"] {
  --paper:          #25201a;
  --paper-warm:     #2e2820;
  --paper-deep:     #3a3328;
  --ink-full:       #f8edd3;
  --ink-medium:     #e8d6a8;
  --ink-light:      #b8a785;
  --ink-faint:      #806e52;
  --cinnobar:       #ee6a55;
  --cinnobar-deep:  #c84a38;
  --indigo:         #7ea0c4;
  --ochre:          #d8a868;
  --teng-oil:       #ffc878;
  --aloes:          #b89868;
  --panel-ink:      #15110a;
  --panel-indigo:   #1f2632;
}
html[data-theme="dark"] body::after {
  background:
    radial-gradient(ellipse at top left, transparent 30%, rgba(238, 106, 85, 0.18) 100%),
    radial-gradient(ellipse at bottom right, transparent 30%, rgba(255, 200, 120, 0.14) 100%);
}
html[data-theme="dark"] body {
  transition: background 0.6s var(--ease-brush), color 0.6s var(--ease-brush);
}
body {
  transition: background 0.6s var(--ease-brush), color 0.6s var(--ease-brush);
}

/* === 暗主题 glow 光晕（朱砂亮起来） === */
html[data-theme="dark"] .hero-title .accent,
html[data-theme="dark"] .hero-period,
html[data-theme="dark"] .section-num-big,
html[data-theme="dark"] .intro-num,
html[data-theme="dark"] .scroll-section-num,
html[data-theme="dark"] .battle-subhead-char,
html[data-theme="dark"] .stat-num,
html[data-theme="dark"] .brand-seal {
  text-shadow:
    0 0 24px rgba(238, 106, 85, 0.55),
    0 0 60px rgba(238, 106, 85, 0.25);
}
html[data-theme="dark"] .seal,
html[data-theme="dark"] .mini-seal,
html[data-theme="dark"] .lightbox-seal,
html[data-theme="dark"] .guest-seal-char,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .brand-seal {
  box-shadow:
    inset 0 0 0 3px var(--cinnobar),
    inset 0 0 0 4px var(--paper-warm),
    inset 0 0 0 7px var(--cinnobar),
    0 0 28px rgba(238, 106, 85, 0.35);
}
html[data-theme="dark"] .seal:hover,
html[data-theme="dark"] .mini-seal-node:hover .mini-seal {
  box-shadow:
    inset 0 0 0 3px var(--cinnobar),
    inset 0 0 0 4px var(--paper-warm),
    inset 0 0 0 7px var(--cinnobar),
    0 0 48px rgba(238, 106, 85, 0.6);
}
html[data-theme="dark"] .seal.l4,
html[data-theme="dark"] .mini-seal.l4,
html[data-theme="dark"] .lightbox-seal.l4,
html[data-theme="dark"] .swatch.l4::before {
  box-shadow:
    inset 0 0 0 3px var(--teng-oil),
    inset 0 0 0 4px var(--panel-ink),
    inset 0 0 0 7px var(--teng-oil),
    0 0 32px rgba(255, 200, 120, 0.5);
}
html[data-theme="dark"] .cta-link,
html[data-theme="dark"] .submit-btn,
html[data-theme="dark"] .gb-submit,
html[data-theme="dark"] .lb-btn:hover:not(:disabled) {
  box-shadow: 0 0 24px rgba(238, 106, 85, 0.35);
}
html[data-theme="dark"] .nav-action:hover,
html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a.active {
  text-shadow: 0 0 12px rgba(238, 106, 85, 0.5);
}
html[data-theme="dark"] #cursor-glow {
  background: radial-gradient(circle,
    rgba(238, 106, 85, 0.32) 0%,
    rgba(238, 106, 85, 0.12) 35%,
    transparent 70%);
  width: 380px;
  height: 380px;
}
html[data-theme="dark"] .hero-watermark {
  opacity: 0.14;
  text-shadow: 0 0 80px rgba(238, 106, 85, 0.3);
}
html[data-theme="dark"] .spine,
html[data-theme="dark"] .mini-scroll-frame::before {
  background: linear-gradient(90deg, transparent 0%, var(--cinnobar) 50%, transparent 100%);
  opacity: 0.7;
  height: 2px;
}
html[data-theme="dark"] .scroll-rod {
  background: linear-gradient(180deg, var(--panel-ink) 0%, #2a1f12 50%, var(--panel-ink) 100%);
  box-shadow: inset 0 0 16px rgba(238, 106, 85, 0.2);
}
html[data-theme="dark"] .scroll-rod-cap {
  box-shadow:
    0 0 0 2px var(--cinnobar),
    0 0 24px rgba(238, 106, 85, 0.5);
}
html[data-theme="dark"] .word-card.l4::before,
html[data-theme="dark"] .swatch.l4::before {
  box-shadow: 0 0 16px rgba(255, 200, 120, 0.6);
}

/* === 墨点散落 Canvas === */
#ink-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* === 鼠标朱砂晕染 === */
#cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(162, 59, 44, 0.18) 0%, rgba(162, 59, 44, 0.06) 35%, transparent 70%);
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  transition: opacity 0.4s ease;
  opacity: 0;
}
html[data-theme="dark"] #cursor-glow {
  background: radial-gradient(circle, rgba(212, 89, 74, 0.22) 0%, rgba(212, 89, 74, 0.08) 35%, transparent 70%);
  mix-blend-mode: screen;
}
body.cursor-active #cursor-glow { opacity: 1; }
@media (hover: none) { #cursor-glow { display: none; } }

/* === Nav 右侧动作区 === */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-action {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-medium);
  transition: all 0.3s var(--ease-brush);
  padding: 0;
}
.nav-action:hover {
  border-color: var(--cinnobar);
  color: var(--cinnobar);
  transform: rotate(-8deg);
}
.nav-action svg { width: 16px; height: 16px; }

/* === 主题切换印章 === */
.theme-toggle {
  width: 38px;
  height: 38px;
  background: var(--cinnobar);
  color: var(--paper);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-brush);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 0 0 2px var(--cinnobar),
    inset 0 0 0 3px var(--paper-warm),
    inset 0 0 0 5px var(--cinnobar);
  transition: transform 0.4s var(--ease-brush);
  padding: 0;
}
.theme-toggle:hover { transform: rotate(-180deg) scale(1.05); }
.theme-toggle .glyph { line-height: 1; }
html[data-theme="paper"] .theme-toggle .glyph.dark,
html[data-theme="dark"] .theme-toggle .glyph.light { display: none; }
html:not([data-theme]) .theme-toggle .glyph.dark { display: none; }

/* === 主题切换 wipe 过渡 === */
.theme-wipe {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  clip-path: circle(0% at var(--wipe-x, 50%) var(--wipe-y, 50%));
  transition: clip-path 0.9s var(--ease-brush);
  background: var(--cinnobar);
}
.theme-wipe.active {
  clip-path: circle(150% at var(--wipe-x, 50%) var(--wipe-y, 50%));
}

/* === 搜索栏 === */
.search-bar {
  max-height: 0;
  overflow: hidden;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 56px;
  transition: max-height 0.5s var(--ease-brush), padding 0.5s var(--ease-brush);
  position: relative;
  z-index: 5;
}
.search-bar.open {
  max-height: 320px;
  padding: 20px 56px;
}
.search-input-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.search-input {
  width: 100%;
  padding: 14px 20px 14px 56px;
  background: var(--paper-warm);
  border: 1px solid var(--cinnobar);
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink-full);
  outline: none;
  letter-spacing: 0.05em;
  box-shadow: 0 0 0 3px rgba(162, 59, 44, 0.12);
  transition: background 0.4s var(--ease-brush), color 0.4s var(--ease-brush);
}
.search-input::placeholder { color: var(--ink-faint); }
.search-icon-left {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cinnobar);
}
.search-shortcut {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  border: 1px solid var(--ink-faint);
  padding: 2px 8px;
  border-radius: 2px;
  pointer-events: none;
}
.search-results {
  max-width: 640px;
  margin: 12px auto 0;
  background: var(--paper-warm);
  border: 1px solid var(--ink-faint);
  border-radius: 2px;
  display: none;
  max-height: 240px;
  overflow-y: auto;
}
.search-results.show { display: block; }
.search-result-item {
  padding: 12px 20px;
  border-bottom: 1px dashed var(--ink-faint);
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 16px;
  transition: background 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.search-result-item:hover { background: var(--paper-deep); }
.search-result-item:last-child { border-bottom: none; }
.search-result-page {
  font-family: var(--font-brush);
  font-size: 18px;
  color: var(--cinnobar);
  width: 24px;
  flex: 0 0 24px;
  line-height: 1;
}
.search-result-title {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-full);
  flex: 1;
  line-height: 1.5;
}
.search-result-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
}
.search-result-title mark {
  background: rgba(200, 152, 88, 0.4);
  color: inherit;
  padding: 0 2px;
}
.search-empty {
  padding: 24px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
}

/* === Home 统计三栏 === */
.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 32px;
  margin-top: 16px;
  border-top: 1px dashed var(--ink-faint);
}
.stat-block {
  text-align: center;
  cursor: default;
  transition: transform 0.4s var(--ease-brush);
}
.stat-block:hover { transform: translateY(-3px); }
.stat-num {
  font-family: var(--font-brush);
  font-size: clamp(48px, 5vw, 64px);
  color: var(--cinnobar);
  line-height: 1;
  margin-bottom: 8px;
  font-weight: 700;
}
.stat-label {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink-light);
  letter-spacing: 0.25em;
}
@media (max-width: 480px) {
  .intro-stats { gap: 12px; }
  .stat-num { font-size: 36px; }
  .stat-label { font-size: 10px; letter-spacing: 0.15em; }
}

/* === Lightbox === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s var(--ease-brush);
  pointer-events: none;
}
.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-card {
  background: var(--paper-warm);
  border: 1px solid var(--cinnobar);
  border-radius: 4px;
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 48px 56px;
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.5s var(--ease-brush);
  box-shadow: 0 24px 80px rgba(26, 24, 20, 0.45);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.lightbox-overlay.active .lightbox-card {
  transform: translateY(0) scale(1);
}
.lightbox-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-faint);
}
.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-light);
  letter-spacing: 0.2em;
}
.lightbox-counter .current {
  color: var(--cinnobar);
  font-size: 18px;
  font-weight: 700;
}
.lightbox-close {
  background: none;
  border: 1px solid var(--ink-faint);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-medium);
  font-family: var(--font-display);
  font-size: 16px;
  transition: all 0.3s var(--ease-brush);
  padding: 0;
  line-height: 1;
}
.lightbox-close:hover {
  border-color: var(--cinnobar);
  color: var(--cinnobar);
  transform: rotate(90deg);
}
.lightbox-body {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: start;
}
.lightbox-seal {
  width: 120px;
  height: 120px;
  background: var(--cinnobar);
  color: var(--paper);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 3px var(--cinnobar),
    inset 0 0 0 4px var(--paper-warm),
    inset 0 0 0 7px var(--cinnobar);
}
.lightbox-seal.l1 {
  background: var(--paper);
  color: var(--ink-faint);
  box-shadow: inset 0 0 0 3px var(--ink-faint), inset 0 0 0 4px var(--paper), inset 0 0 0 7px var(--ink-faint);
}
.lightbox-seal.l2 {
  background: var(--ochre);
  box-shadow: inset 0 0 0 3px var(--ochre), inset 0 0 0 4px var(--paper-warm), inset 0 0 0 7px var(--ochre);
}
.lightbox-seal.l4 {
  background: var(--teng-oil);
  color: var(--panel-ink);
  box-shadow:
    inset 0 0 0 3px var(--teng-oil),
    inset 0 0 0 4px var(--panel-ink),
    inset 0 0 0 7px var(--teng-oil);
}
.lightbox-seal-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.85;
  text-align: center;
}
.lightbox-seal-name {
  font-family: var(--font-brush);
  font-size: 36px;
  line-height: 1;
  text-align: center;
  margin: 4px 0;
}
.lightbox-seal-meta {
  font-family: var(--font-deco);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-align: center;
  display: flex;
  justify-content: space-between;
}
.lightbox-content h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-full);
  margin-bottom: 8px;
  line-height: 1.3;
}
.lightbox-content .level-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  padding: 4px 12px;
  border: 1px solid var(--cinnobar);
  color: var(--cinnobar);
  margin-bottom: 16px;
}
.lightbox-content p {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-medium);
  margin-bottom: 16px;
}
.lightbox-content ul {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}
.lightbox-content ul li {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-medium);
  padding: 6px 0 6px 20px;
  position: relative;
  line-height: 1.7;
}
.lightbox-content ul li::before {
  content: '·';
  position: absolute;
  left: 8px;
  color: var(--cinnobar);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  top: 8px;
}
.lightbox-content .section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-light);
  letter-spacing: 0.25em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.lightbox-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-faint);
}
.lb-btn {
  background: none;
  border: 1px solid var(--ink-faint);
  color: var(--ink-medium);
  padding: 8px 20px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.15em;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s var(--ease-brush);
}
.lb-btn:hover:not(:disabled) {
  border-color: var(--cinnobar);
  color: var(--cinnobar);
}
.lb-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .lightbox-card { padding: 28px 24px; }
  .lightbox-body { grid-template-columns: 1fr; gap: 16px; }
  .lightbox-seal { width: 88px; height: 88px; align-self: center; }
  .lightbox-seal-name { font-size: 28px; }
  .lightbox-content h3 { font-size: 22px; }
}

/* === Hero/section 在 canvas 之上 === */
html[data-theme] .hero,
html[data-theme] .home-intro,
html[data-theme] .home-mini,
html[data-theme] .work-section,
html[data-theme] .scroll-section,
html[data-theme] .contact-section,
html[data-theme] .guestbook-section,
html[data-theme] .section,
html[data-theme] .top-nav,
html[data-theme] .footer,
html[data-theme] .search-bar {
  position: relative;
  z-index: 3;
}

/* === 顶 nav 移动端兼容 === */
@media (max-width: 768px) {
  .top-nav { flex-wrap: wrap; gap: 12px; padding: 24px 24px 16px; }
  .nav-right { gap: 12px; }
  .nav-links { width: 100%; justify-content: space-around; gap: 8px; font-size: 14px; padding-top: 12px; order: 3; }
  .nav-action, .theme-toggle { width: 32px; height: 32px; }
  .search-bar { padding: 0 24px; }
  .search-bar.open { padding: 16px 24px; max-height: 280px; }
}

/* ============================================================ */
/* ============ v3 增量：五页五形态 ============================ */
/* ============================================================ */

/* === 学页：思维导图树（根在左 · 向右生长 · 递归包含） === */
.tree-vertical {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 24px 16px 32px;
  display: flex;
  align-items: center;
  overflow-x: auto;
}
.tree-root {
  position: relative;
  flex-shrink: 0;
  display: inline-block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--cinnobar);
  letter-spacing: 0.4em;
  padding: 10px 20px;
  border: 2px solid var(--cinnobar);
  border-radius: 2px;
  background: var(--paper-warm);
  box-shadow: 0 0 0 4px var(--paper-warm);
}
/* 根 → 子节点列竖线的横线 */
.tree-root::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  width: 20px;
  height: 2px;
  background: var(--cinnobar);
  opacity: 0.4;
}
/* 每层子节点：右侧垂直堆叠 + 左侧竖线（脊柱） */
.tree-children {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  margin-left: 20px;
  padding-left: 20px;
  flex-shrink: 0;
}
.tree-children::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cinnobar);
  opacity: 0.3;
  pointer-events: none;
}
/* 分支 = 节点标签 + 其子节点列 并排（向右生长） */
.tree-branch,
.tree-leaf {
  position: relative;
}
.tree-branch {
  display: flex;
  align-items: center;
}
/* 节点标签 → 子节点竖线的横线（标签在上、日期范围在下，收窄节点宽度） */
.tree-node {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 14px;
  background: var(--paper-warm);
  border: 1px solid rgba(162, 59, 44, 0.4);
  border-radius: 2px;
}
.tree-node::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  width: 20px;
  height: 2px;
  background: var(--cinnobar);
  opacity: 0.4;
}
/* 竖线 → 节点的横线 */
.tree-branch::before,
.tree-leaf::before {
  content: '';
  position: absolute;
  left: -20px;
  width: 20px;
  height: 2px;
  background: var(--cinnobar);
  opacity: 0.4;
  pointer-events: none;
}
.tree-branch::before { top: 50%; }
.tree-leaf::before { top: 65px; }

.tree-node-label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--cinnobar);
  letter-spacing: 0.3em;
}
.tree-node-range {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.12em;
}

.tree-seal {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
/* 印章右侧信息列：说明 + 证据标签（限宽，标题/标签换行，避免撑爆整树） */
.tree-seal-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 200px;
}
.tree-seal-detail {
  text-align: left;
}
.tree-seal-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-full);
  line-height: 1.5;
  margin-bottom: 4px;
}
.tree-seal-evidence {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.1em;
}
/* 印章右侧：输出物证据标签（胶囊框 · 不收缩 · 超出换行不截断） */
.tree-leaf-extras {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tree-leaf-extras li {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mid);
  letter-spacing: 0.04em;
  padding: 3px 12px;
  border: 1px solid rgba(162, 59, 44, 0.25);
  border-radius: 999px;
  background: rgba(162, 59, 44, 0.06);
  white-space: nowrap;
}

/* === 战页：沙场横卷（.scroll-frame 上叠加） === */
.battle-frame {
  border-color: rgba(162, 59, 44, 0.3);
}
.battle-frame .scroll-rod {
  background: linear-gradient(180deg, #4a3020 0%, #1a1208 50%, #4a3020 100%);
}
.battle-frame .scroll-rod-cap {
  background: #5a3a2a;
  border-color: #3a2010;
  box-shadow: 0 0 0 2px #5a3a2a;
}
/* 军阵点阵 */
.battle-frame .scroll-inner::after {
  background-image: radial-gradient(circle, rgba(162, 59, 44, 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
}
/* 戰陣水印 */
.battle-frame .scroll-inner::before {
  content: '戰 陣';
  font-size: 140px;
  opacity: 0.04;
}
/* 脊柱改赭铁色 */
.battle-frame .spine {
  background: linear-gradient(90deg, transparent 0%, var(--ochre) 5%, var(--ochre) 95%, transparent 100%);
}

/* === 跡页：山水行迹（.scroll-frame 上叠加） === */
.trace-frame {
  border-color: rgba(58, 90, 124, 0.25);
}
.trace-frame .scroll-rod {
  background: linear-gradient(180deg, #3a5a7c 0%, #1a2a3c 50%, #3a5a7c 100%);
}
.trace-frame .scroll-rod-cap {
  background: var(--indigo);
  border-color: #1a2a3c;
  box-shadow: 0 0 0 2px var(--indigo);
}
/* 山水笔触肌理 */
.trace-frame .scroll-inner::after {
  background-image:
    radial-gradient(ellipse at 30% 60%, rgba(58, 90, 124, 0.08) 40%, transparent 40%),
    radial-gradient(ellipse at 70% 40%, rgba(58, 90, 124, 0.06) 35%, transparent 35%);
  background-size: 200px 160px, 180px 140px;
  opacity: 0.7;
}
/* 山水行水印 */
.trace-frame .scroll-inner::before {
  content: '山 水 行';
  font-size: 100px;
  color: var(--indigo);
  opacity: 0.05;
  letter-spacing: 0.5em;
}
/* 脊柱改石青色蜿蜒 */
.trace-frame .spine {
  background: linear-gradient(90deg, transparent 0%, var(--indigo) 10%, var(--indigo) 90%, transparent 100%);
  opacity: 0.35;
}

/* === 学/战/跡 移动端 === */
@media (max-width: 768px) {
  /* 学页树：向右生长，移动端窄屏可横向滑动 */
  .tree-vertical { padding: 12px 0 20px; }
  .tree-root { font-size: 20px; padding: 8px 16px; }
  .tree-root::after, .tree-node::after { width: 18px; }
  .tree-children { margin-left: 18px; padding-left: 16px; gap: 12px; }
  .tree-branch::before, .tree-leaf::before { left: -16px; width: 16px; }
  .tree-node { padding: 6px 14px; }
  .tree-seal { gap: 12px; }
  .tree-leaf-extras li { font-size: 10px; }
  /* 树已替代移动端方阵 */
  .seal-grid-mobile { display: none; }
}
