/* =========================================================
   长岛海洋品牌 · 高端文档站样式体系
   主色：深海军蓝 #0B3D66 ｜ 沙金暖金 #C9A34A ｜ 贝壳白 #FAF7F2
   ========================================================= */

:root {
  --navy-deep: #0B3D66;
  --navy-dark: #082C4A;
  --navy-mid: #145689;
  --navy-light: #2A7CB5;
  --gold-deep: #A88734;
  --gold: #C9A34A;
  --gold-light: #E0C878;
  --gold-pale: #F5EBD0;
  --cream: #FAF7F2;
  --cream-warm: #F6F0E5;
  --cream-cool: #F2ECE2;
  --ink: #1A2A3A;
  --ink-soft: #3D4F5F;
  --ink-mute: #6B7A88;
  --line: #E6DED1;
  --line-soft: #EFEAE0;
  --shadow-sm: 0 2px 8px rgba(11, 61, 102, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 61, 102, 0.10);
  --shadow-lg: 0 16px 48px rgba(11, 61, 102, 0.14);
  --shadow-gold: 0 8px 24px rgba(201, 163, 74, 0.22);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --font-serif: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, Consolas, monospace;
  --content-width: 780px;
  --toc-width: 260px;
  --container-pad: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.85;
  font-size: 16px;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(201, 163, 74, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(11, 61, 102, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #FBF9F5 0%, #FAF7F2 50%, #F7F2E9 100%);
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.04 0 0 0 0 0.16 0 0 0 0 0.26 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  opacity: 0.6;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.noise {
  position: relative;
}

.noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.25;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ========== 滚动进度条 ========== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-light));
  z-index: 9999;
  transition: width 0.08s linear;
  box-shadow: 0 1px 4px rgba(201, 163, 74, 0.4);
}

/* ========== 回到顶部按钮 ========== */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md), 0 0 0 4px rgba(201, 163, 74, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(201, 163, 74, 0.2);
}

/* ========== 封面 Hero ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px var(--container-pad) 60px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201, 163, 74, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -15%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(11, 61, 102, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 880px;
  width: 100%;
  text-align: center;
  z-index: 2;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--navy-deep);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-brand.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-brand::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(201, 163, 74, 0.6);
}

.hero-title-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(48px, 12vw, 120px);
  line-height: 1;
  color: var(--navy-deep);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
}

.hero-title-en.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-title-cn {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: 0.04em;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.hero-title-cn.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px 0 40px;
  opacity: 0;
  transform: scaleX(0.6);
  transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.45s;
}

.hero-divider.animate-in {
  opacity: 1;
  transform: scaleX(1);
}

.hero-line {
  width: 120px;
  max-width: 20vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-line.left {
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero-line.right {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-dots span:nth-child(2) {
  width: 8px;
  height: 8px;
  background: var(--navy-deep);
}

.hero-subtitle {
  font-size: clamp(15px, 2.4vw, 18px);
  color: var(--ink-soft);
  line-height: 1.9;
  max-width: 620px;
  margin: 0 auto 36px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.hero-subtitle.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  font-size: 13px;
  color: var(--ink-mute);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.75s;
}

.hero-meta.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-gold);
}

.version-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
}

.hero-company {
  color: var(--navy-deep);
  font-weight: 500;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.8s ease 1s;
}

.hero-scroll.animate-in {
  opacity: 1;
  animation: scrollBounce 2.2s ease-in-out infinite;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--gold), transparent);
}

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

/* ========== 页面布局 ========== */
.page-layout {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-pad) 120px;
  gap: 48px;
  position: relative;
}

.content-main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

/* ========== TOC 侧边栏（桌面端） ========== */
.toc-sidebar {
  position: sticky;
  top: 40px;
  width: var(--toc-width);
  flex-shrink: 0;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  display: none;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.toc-sidebar::-webkit-scrollbar {
  width: 4px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

.toc-title {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.toc-list {
  list-style: none;
}

.toc-list li {
  margin-bottom: 4px;
}

.toc-list a {
  display: block;
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 10px;
  border-left: 2px solid transparent;
  transition: all 0.22s ease;
  line-height: 1.5;
}

.toc-list a:hover {
  color: var(--navy-deep);
  background: rgba(201, 163, 74, 0.07);
  border-left-color: var(--gold);
}

.toc-list a.active {
  color: var(--navy-deep);
  background: linear-gradient(90deg, rgba(201, 163, 74, 0.14), rgba(201, 163, 74, 0.04));
  border-left-color: var(--gold);
  font-weight: 600;
}

.toc-list .toc-h3 a {
  padding-left: 32px;
  font-size: 12.5px;
  color: var(--ink-mute);
}

/* ========== TOC 移动端浮动按钮 + 抽屉 ========== */
.toc-mobile-btn {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg), 0 0 0 5px rgba(201, 163, 74, 0.18);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-mobile-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 20px 56px rgba(11, 61, 102, 0.3), 0 0 0 5px rgba(201, 163, 74, 0.26);
}

.toc-mobile-btn::before {
  content: '';
  width: 18px;
  height: 14px;
  background:
    linear-gradient(var(--gold), var(--gold)) 0 0/100% 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 6px/70% 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 12px/100% 2px no-repeat;
}

.toc-drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 46, 0.55);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}

.toc-drawer-mask.open {
  opacity: 1;
  visibility: visible;
}

.toc-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 80vh;
  background: var(--cream);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  z-index: 999;
  transform: translateY(105%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px 20px 36px;
  box-shadow: 0 -20px 60px rgba(11, 61, 102, 0.25);
  overflow-y: auto;
}

.toc-drawer.open {
  transform: translateY(0);
}

.toc-drawer-handle {
  width: 48px;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin: 0 auto 20px;
}

.toc-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.toc-drawer-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-deep);
}

.toc-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--cream-warm);
  color: var(--ink-soft);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.toc-drawer-close:hover {
  background: var(--gold-pale);
  color: var(--navy-deep);
}

/* ========== H2 章节编号 ========== */
.section-wrap {
  padding-top: 80px;
  margin-bottom: 20px;
}

.section-wrap:first-of-type {
  padding-top: 40px;
}

.chapter-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-soft);
}

.chapter-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(72px, 14vw, 128px);
  line-height: 1;
  color: transparent;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  padding-right: 28px;
  border-right: 2px solid var(--gold);
  letter-spacing: -0.04em;
}

.chapter-title-wrap {
  min-width: 0;
}

.chapter-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
  margin-bottom: 10px;
}

h2.chapter-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(26px, 4.5vw, 38px);
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: 0.01em;
  margin: 0;
}

/* ========== H3 小标题 ========== */
h3.sub-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(19px, 3vw, 23px);
  line-height: 1.45;
  color: var(--ink);
  margin: 40px 0 20px;
  padding-left: 22px;
  position: relative;
}

h3.sub-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy-deep);
  box-shadow: 0 0 0 3px rgba(201, 163, 74, 0.25);
}

h3.sub-title .en-sub {
  display: block;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
  margin-bottom: 6px;
  font-family: var(--font-sans);
}

/* ========== 段落正文 ========== */
.content-main p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 72ch;
  text-align: justify;
}

.content-main p + p {
  margin-top: 0;
}

.content-main p.drop-cap::first-letter,
.content-main .chapter-content p:first-of-type::first-letter {
  font-family: var(--font-serif);
  font-weight: 700;
  float: left;
  font-size: 4.4em;
  line-height: 0.9;
  padding: 0.08em 0.1em 0 0;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========== 列表 ========== */
.content-main ul,
.content-main ol {
  max-width: 72ch;
  margin: 0 0 24px;
  padding-left: 28px;
}

.content-main ul li,
.content-main ol li {
  margin-bottom: 10px;
  line-height: 1.8;
  color: var(--ink);
  font-size: 16px;
}

.content-main ul li::marker {
  color: var(--gold);
  font-size: 1.1em;
}

.content-main ol li::marker {
  color: var(--navy-deep);
  font-weight: 700;
  font-family: var(--font-serif);
}

/* ========== blockquote 引用 ========== */
blockquote {
  position: relative;
  max-width: 72ch;
  margin: 36px 0;
  padding: 28px 28px 28px 40px;
  background: linear-gradient(135deg, var(--gold-pale) 0%, rgba(245, 235, 208, 0.5) 100%);
  border-left: 4px solid var(--navy-deep);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
}

blockquote::before {
  content: '\275D';
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1;
  color: rgba(201, 163, 74, 0.5);
  font-style: italic;
}

blockquote p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 0;
  font-style: italic;
}

blockquote footer {
  margin-top: 14px;
  font-size: 13px;
  color: var(--navy-deep);
  font-weight: 600;
  letter-spacing: 0.05em;
}

blockquote footer::before {
  content: '— ';
}

/* ========== 代码块 ========== */
pre, code {
  font-family: var(--font-mono);
}

code {
  font-size: 14px;
  padding: 2px 8px;
  background: rgba(11, 61, 102, 0.07);
  color: var(--navy-deep);
  border-radius: 6px;
  border: 1px solid rgba(11, 61, 102, 0.08);
  font-weight: 500;
}

pre {
  max-width: 100%;
  margin: 32px 0;
  padding: 28px 24px;
  background: linear-gradient(135deg, #1A2332 0%, #0F1623 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

pre code {
  display: block;
  padding: 0;
  margin-top: 10px;
  background: none;
  border: none;
  color: #E8EDF3;
  font-size: 13.5px;
  line-height: 1.75;
  font-weight: 400;
  white-space: pre;
}

pre code .token-keyword { color: #C792EA; }
pre code .token-string { color: #C3E88D; }
pre code .token-number { color: #F78C6C; }
pre code .token-comment { color: #676E95; font-style: italic; }
pre code .token-function { color: #82AAFF; }
pre code .token-variable { color: #EEFFFF; }

/* ========== 表格 ========== */
.table-card {
  max-width: 100%;
  margin: 36px 0;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line-soft);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll::-webkit-scrollbar {
  height: 6px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

table thead {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
}

table thead th {
  padding: 18px 20px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border-bottom: none;
}

table thead th::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  margin-top: 6px;
  border-radius: 1px;
}

table tbody tr {
  transition: all 0.25s ease;
  border-bottom: 1px solid var(--line-soft);
}

table tbody tr:nth-child(even) {
  background: var(--cream-warm);
}

table tbody tr:hover {
  background: rgba(201, 163, 74, 0.09);
  box-shadow: inset 0 0 0 1px rgba(201, 163, 74, 0.25);
  transform: translateX(2px);
}

table tbody tr:last-child {
  border-bottom: none;
}

table tbody td {
  padding: 16px 20px;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.7;
  vertical-align: top;
}

@media (max-width: 767px) {
  .table-card {
    border-radius: var(--radius-md);
    margin: 28px -8px;
    max-width: calc(100% + 16px);
    width: calc(100% + 16px);
  }
}

/* ========== 对比表格 VS ========== */
.vs-table-wrap {
  max-width: 100%;
  margin: 40px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.vs-col {
  padding: 32px 28px;
}

.vs-col.vs-left {
  background: #F3F0EA;
}

.vs-col.vs-right {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy-dark) 100%);
  color: #fff;
}

.vs-badge {
  align-self: center;
  padding: 0 16px;
  z-index: 2;
  position: relative;
}

.vs-badge span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 700;
  font-style: italic;
  font-size: 15px;
  box-shadow: var(--shadow-gold), 0 0 0 6px var(--cream);
  position: relative;
}

.vs-col-title {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid currentColor;
}

.vs-left .vs-col-title {
  color: var(--ink-mute);
  border-color: var(--line);
}

.vs-right .vs-col-title {
  color: var(--gold);
  border-color: rgba(201, 163, 74, 0.4);
}

.vs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vs-list li {
  padding: 12px 0;
  font-size: 14.5px;
  line-height: 1.6;
  border-bottom: 1px dashed currentColor;
}

.vs-left .vs-list li {
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--ink-soft);
  opacity: 0.75;
}

.vs-right .vs-list li {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
  opacity: 1;
  font-weight: 500;
}

.vs-right .vs-list li::before {
  content: '\2726 ';
  color: var(--gold);
  margin-right: 4px;
}

.vs-list li:last-child {
  border-bottom: none;
}

@media (max-width: 767px) {
  .vs-table-wrap {
    grid-template-columns: 1fr;
  }
  .vs-badge {
    padding: 16px 0;
    order: -1;
    background: var(--cream);
  }
  .vs-badge span {
    box-shadow: var(--shadow-gold);
  }
}

/* ========== 数据指标卡片 ========== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
  max-width: 100%;
}

.metric-card {
  position: relative;
  padding: 28px 22px 24px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--line-soft);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.metric-card:nth-child(1)::before {
  background: linear-gradient(90deg, var(--navy-deep), var(--navy-light));
}

.metric-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
}

.metric-card:nth-child(3)::before {
  background: linear-gradient(90deg, #2E7D5B, #66BB6A);
}

.metric-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.metric-card:hover:nth-child(1) {
  box-shadow: 0 20px 56px rgba(11, 61, 102, 0.22);
}

.metric-card:hover:nth-child(2) {
  box-shadow: var(--shadow-gold);
}

.metric-card:hover:nth-child(3) {
  box-shadow: 0 20px 56px rgba(46, 125, 91, 0.22);
}

.metric-value {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.metric-card:nth-child(1) .metric-value {
  color: var(--navy-deep);
}

.metric-card:nth-child(2) .metric-value {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-card:nth-child(3) .metric-value {
  color: #2E7D5B;
}

.metric-unit {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  margin-left: 2px;
  opacity: 0.85;
}

.metric-label {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.metric-label strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 767px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ========== 流程图区 ========== */
.diagram-wrap {
  max-width: 100%;
  margin: 40px 0;
  padding: 40px 28px;
  background: linear-gradient(135deg, var(--gold-pale) 0%, rgba(245, 235, 208, 0.6) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(201, 163, 74, 0.2);
  box-shadow: var(--shadow-sm);
}

.diagram-caption {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed rgba(201, 163, 74, 0.4);
  font-size: 13px;
  color: var(--navy-deep);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.diagram-caption::before {
  content: '\2748 ';
  color: var(--gold);
}

.diagram-caption::after {
  content: ' \2748';
  color: var(--gold);
}

.mermaid {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

/* ========== 手机截图 Mockup ========== */
.phone-mockup {
  max-width: 320px;
  margin: 40px auto;
  position: relative;
}

.phone-frame {
  position: relative;
  background: linear-gradient(145deg, #F5F5F7, #E8E8EA);
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 30px 70px rgba(11, 61, 102, 0.22),
    0 8px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #1A1A1C;
  border-radius: 20px;
  z-index: 3;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.phone-side-btn {
  position: absolute;
  background: linear-gradient(90deg, #DDDDE0, #EFEFF1);
  border-radius: 2px;
}

.phone-side-btn.btn-left-1 { left: -2px; top: 100px; width: 3px; height: 32px; }
.phone-side-btn.btn-left-2 { left: -2px; top: 148px; width: 3px; height: 52px; }
.phone-side-btn.btn-left-3 { left: -2px; top: 212px; width: 3px; height: 52px; }
.phone-side-btn.btn-right { right: -2px; top: 160px; width: 3px; height: 80px; }

.phone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy-dark) 100%);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.phone-screen-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 56px 20px 32px;
  color: #fff;
}

.phone-screen-content .ps-header {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--gold-light);
}

.phone-screen-content .ps-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.phone-screen-content .ps-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.phone-screen-content .ps-card .ps-row {
  height: 10px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  margin-bottom: 10px;
}

.phone-screen-content .ps-card .ps-row.w-80 { width: 80%; }
.phone-screen-content .ps-card .ps-row.w-60 { width: 60%; }
.phone-screen-content .ps-card .ps-row.w-90 { width: 90%; background: var(--gold); opacity: 0.6; }
.phone-screen-content .ps-card .ps-row.w-40 { width: 40%; }

.phone-caption {
  text-align: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--ink-mute);
  line-height: 1.7;
}

.phone-caption strong {
  color: var(--navy-deep);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

/* ========== 章节末装饰分隔 ========== */
.section-divider {
  text-align: center;
  margin: 72px 0 16px;
  font-size: 20px;
  letter-spacing: 0.6em;
  color: var(--gold);
  opacity: 0.85;
  font-weight: 700;
}

.section-divider::before {
  content: '';
  display: block;
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 20px;
}

/* ========== 按钮 / 徽章 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-navy {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  color: #fff;
  box-shadow: 0 8px 24px rgba(11, 61, 102, 0.25);
}

.btn-navy:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(11, 61, 102, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  color: var(--navy-deep);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(201, 163, 74, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--navy-deep);
  border: 2px solid var(--navy-deep);
  padding: 10px 26px;
}

.btn-outline:hover {
  background: var(--navy-deep);
  color: #fff;
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.badge-navy { background: var(--navy-deep); color: #fff; }
.badge-gold { background: linear-gradient(135deg, var(--gold-deep), var(--gold)); color: var(--navy-deep); }
.badge-soft { background: rgba(11, 61, 102, 0.08); color: var(--navy-deep); }

/* ========== 图片懒加载 ========== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-loading {
  opacity: 0;
  transform: scale(0.98);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  filter: blur(4px);
}

.img-loading.img-loaded {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.content-image {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 32px 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.content-image img { width: 100%; display: block; }

.content-image figcaption {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--ink-mute);
  text-align: center;
  background: var(--cream-warm);
  border-top: 1px solid var(--line-soft);
}

/* ========== 首页卡片网格 ========== */
.docs-home {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--container-pad) 120px;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 16px;
}

.doc-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line-soft);
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.doc-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.doc-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.doc-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.doc-card:nth-child(1) .doc-cover::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.55) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(201, 163, 74, 0.65) 0%, transparent 60%),
    linear-gradient(135deg, #5B21B6 0%, #7C3AED 50%, #A855F7 100%);
}

.doc-card:nth-child(2) .doc-cover::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(20, 184, 166, 0.55) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(11, 61, 102, 0.6) 0%, transparent 60%),
    linear-gradient(135deg, #0F766E 0%, #0D9488 50%, #2DD4BF 100%);
}

.doc-card:nth-child(3) .doc-cover::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(249, 115, 22, 0.55) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(239, 68, 68, 0.5) 0%, transparent 60%),
    linear-gradient(135deg, #C2410C 0%, #EA580C 50%, #FB923C 100%);
}

.doc-cover-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 84px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.25));
  z-index: 2;
}

.doc-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.3) 100%);
  z-index: 1;
}

.doc-cover-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: var(--navy-deep);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.doc-body {
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.doc-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 12px;
  font-family: var(--font-sans);
}

.doc-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 20px;
  flex: 1;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.doc-meta .badge { font-size: 11px; }

.doc-footer {
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-stats {
  font-size: 12px;
  color: var(--ink-mute);
  font-weight: 500;
}

.doc-stats strong {
  color: var(--navy-deep);
  font-weight: 700;
}

.doc-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--navy-deep);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.doc-open:hover {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  transform: translateX(2px);
}

.doc-open::after {
  content: '\2192';
  transition: transform 0.25s ease;
}

.doc-open:hover::after {
  transform: translateX(4px);
}

/* ========== 首页底部 ========== */
.home-footer {
  max-width: 1180px;
  margin: 80px auto 0;
  padding: 40px 0 0;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.home-footer-brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--navy-deep);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.home-footer-company {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
  font-weight: 500;
}

.home-footer-copy {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
}

.home-footer-copy .fv {
  display: inline-block;
  margin: 0 6px;
  padding: 2px 10px;
  background: rgba(201, 163, 74, 0.15);
  color: var(--gold-deep);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 11px;
}

/* ========== 响应式断点 ========== */
@media (min-width: 768px) {
  .toc-sidebar { display: block; }
  .toc-mobile-btn { display: none; }
  .back-to-top { bottom: 32px; right: 32px; }
}

@media (max-width: 767px) {
  :root { --container-pad: 20px; }
  body { font-size: 15.5px; }
  .hero { min-height: 92vh; padding: 60px var(--container-pad) 80px; }
  .hero-title-en { margin-bottom: 8px; }
  .hero-line { width: 60px; }
  .page-layout { display: block; padding: 0 var(--container-pad) 140px; }
  .section-wrap { padding-top: 56px; }
  .chapter-header { grid-template-columns: auto 1fr; gap: 18px; margin-bottom: 32px; padding-bottom: 22px; }
  .chapter-num { font-size: 72px; padding-right: 18px; }
  h2.chapter-title { font-size: 26px; }
  blockquote { padding: 22px 18px 22px 34px; margin: 28px -4px; }
  blockquote::before { top: 8px; left: 8px; font-size: 40px; }
  pre { margin: 28px -8px; padding: 24px 16px; border-radius: var(--radius-md); }
  .docs-grid { grid-template-columns: 1fr; gap: 20px; }
  .doc-card { border-radius: var(--radius-lg); }
  .section-divider { margin: 56px 0 12px; letter-spacing: 0.4em; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .page-layout { gap: 32px; }
  :root { --toc-width: 220px; }
}

@media (max-width: 480px) {
  :root { --container-pad: 16px; }
  .hero-brand { font-size: 11px; padding: 7px 18px; letter-spacing: 0.15em; }
  .chapter-num { font-size: 60px; }
  h2.chapter-title { font-size: 22px; }
  h3.sub-title { font-size: 18px; }
  .toc-mobile-btn { padding: 12px 24px; font-size: 13px; }
}

/* ========== 辅助类 ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: 48px; }
.mb-lg { margin-bottom: 48px; }
.text-gold { color: var(--gold-deep); }
.text-navy { color: var(--navy-deep); }
.font-serif { font-family: var(--font-serif); }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }

/* ---------- Mermaid CDN 加载失败降级提示 ---------- */
.mermaid-fallback {
  margin: 2rem auto;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, #FBF7EC 0%, #FAF7F2 100%);
  border: 1px solid rgba(201, 163, 74, 0.35);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(11, 61, 102, 0.06);
  max-width: 560px;
}
.mermaid-fallback .mf-title {
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #0B3D66;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}
.mermaid-fallback .mf-tip {
  font-size: 0.925rem;
  line-height: 1.7;
  color: #52616F;
}
@media (max-width: 480px) {
  .mermaid-fallback { padding: 1.125rem 1.25rem; border-radius: 12px; }
}

/* ================================================================
   V2 美化：流程图（杂志级双层容器 + 金线图注） + 手机截图（卡片化）
   ================================================================ */

/* ---------- 1. 流程/图表通用容器 ---------- */

.diagram-wrap {
  position: relative;
  max-width: 100%;
  margin: 56px auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* 外层：杂志渐变背板（金线包边 + 深蓝金噪点纸感底） */
.diagram-wrap.is-decorated {
  padding: 60px 32px 44px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(201,163,74,0.16) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(11,61,102,0.10) 0%, transparent 60%),
    linear-gradient(145deg, #FDF8EC 0%, #FBF2DA 45%, #F5E9C8 100%);
  border: 1px solid rgba(201, 163, 74, 0.28);
  box-shadow:
    0 30px 70px rgba(11, 61, 102, 0.13),
    0 10px 28px rgba(11, 61, 102, 0.07),
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(201,163,74,0.12);
  overflow: hidden;
}

/* 顶部工具栏：三圆点 + 图表编号 + 品牌名 */
.diagram-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(11,61,102,0.06) 0%, rgba(201,163,74,0.04) 60%, transparent 100%);
  border-bottom: 1px solid rgba(201, 163, 74, 0.25);
}

.dt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 2px rgba(0,0,0,0.10);
}
.dt-dot-red    { background: linear-gradient(145deg, #FF6B5B, #E5483B); }
.dt-dot-amber  { background: linear-gradient(145deg, #FFC352, #E89F1F); }
.dt-dot-green  { background: linear-gradient(145deg, #27C93F, #1BA42F); }

.dt-label {
  flex: 0 0 auto;
  margin-left: 8px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--navy-deep);
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.75), rgba(255,255,255,0.35));
  border: 1px solid rgba(201, 163, 74, 0.35);
}

.dt-brand {
  margin-left: auto;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  font-weight: 600;
  opacity: 0.9;
}

/* 内层画布：纯白圆角卡片（承载 mermaid SVG） */
.diagram-stage {
  position: relative;
  z-index: 2;
  margin: 18px auto 0;
  padding: 36px 28px 30px;
  background:
    linear-gradient(180deg, #FFFFFF 0%, #FFFCF4 100%);
  border-radius: 22px;
  border: 1px solid rgba(201, 163, 74, 0.22);
  box-shadow:
    0 12px 32px rgba(11, 61, 102, 0.08),
    inset 0 1px 0 rgba(255,255,255,1);
  overflow: visible;
  max-width: 100%;
}

/* 金线四角装饰 */
.diagram-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.diagram-corners .dc {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid var(--gold-deep);
  opacity: 0.55;
}
.dc-tl { top: 56px;    left: 16px;  border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.dc-tr { top: 56px;    right: 16px; border-left: 0;  border-bottom: 0; border-top-right-radius: 8px; }
.dc-bl { bottom: 76px; left: 16px;  border-right: 0; border-top: 0;    border-bottom-left-radius: 8px; }
.dc-br { bottom: 76px; right: 16px; border-left: 0;  border-top: 0;    border-bottom-right-radius: 8px; }

/* 图注：金线 + CHART 编号 chip + 文字（不用 emoji） */
.diagram-caption {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
  padding-top: 0;
  padding: 0 4px;
  border: none;
  font-size: 13.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--navy-deep);
  font-weight: 500;
  text-align: center;
}
.diagram-caption::before,
.diagram-caption::after { display: none; }

.dcap-line {
  flex: 1 1 auto;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-deep) 50%, transparent 100%);
  opacity: 0.55;
}

.dcap-chip {
  flex: 0 0 auto;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  padding: 5px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  color: var(--gold);
  box-shadow: 0 4px 12px rgba(11, 61, 102, 0.25);
}

.dcap-text {
  flex: 0 1 auto;
  max-width: 70%;
  font-weight: 600;
  color: var(--navy-deep);
  font-size: 14px;
  letter-spacing: 0.03em;
}

/* Mermaid SVG 级美化（覆盖 Mermaid 默认渲染） */
.diagram-wrap .mermaid,
.diagram-wrap pre.mermaid {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  position: relative;
  z-index: 1;
}
.diagram-wrap .mermaid svg,
.diagram-wrap pre.mermaid svg {
  max-width: 100%;
  height: auto !important;
  filter: drop-shadow(0 6px 16px rgba(11, 61, 102, 0.09));
}
/* 节点增强：渐变底 + 细描边 + 柔和阴影 */
.diagram-wrap svg .node rect,
.diagram-wrap svg .node polygon,
.diagram-wrap svg .node circle,
.diagram-wrap svg .node ellipse,
.diagram-wrap svg .actor {
  filter: drop-shadow(0 3px 6px rgba(11, 61, 102, 0.10));
  stroke-width: 1.4px;
}
.diagram-wrap svg .edgePath path,
.diagram-wrap svg .edgePath marker,
.diagram-wrap svg .messageLine0,
.diagram-wrap svg .messageLine1 {
  stroke-width: 1.75px !important;
  stroke-linecap: round;
}
.diagram-wrap svg .label,
.diagram-wrap svg .edgeLabel {
  font-weight: 500 !important;
}
/* 饼图标题位置微调 */
.diagram-wrap svg .pieTitle text {
  font-family: var(--font-serif) !important;
  font-style: italic;
  fill: var(--navy-deep) !important;
}

/* ---------- 2. 入场淡入上滑（流程图 + 截图卡片） ---------- */

.reveal-hidden {
  opacity: 0;
  transform: translateY(36px);
  filter: blur(3px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform, filter;
}
.reveal-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
/* 截图卡片按顺序错峰出现 */
.shot-grid .shot-card.reveal-in:nth-child(1) { transition-delay: 0.00s; }
.shot-grid .shot-card.reveal-in:nth-child(2) { transition-delay: 0.08s; }
.shot-grid .shot-card.reveal-in:nth-child(3) { transition-delay: 0.16s; }
.shot-grid .shot-card.reveal-in:nth-child(4) { transition-delay: 0.24s; }
.shot-grid .shot-card.reveal-in:nth-child(5) { transition-delay: 0.32s; }
.shot-grid .shot-card.reveal-in:nth-child(6) { transition-delay: 0.40s; }
.shot-grid .shot-card.reveal-in:nth-child(7) { transition-delay: 0.48s; }

/* ---------- 3. 7 业态截图网格 + 卡片（手机壳品牌色） ---------- */

/* 网格（响应式：桌面 3 列 / 平板 2 列 / 手机 1 列） */
.shot-grid,
.phone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 32px;
  margin: 56px auto 48px;
  padding: 0 8px;
  max-width: 100%;
}
@media (max-width: 960px) {
  .shot-grid, .phone-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
}
@media (max-width: 560px) {
  .shot-grid, .phone-grid { grid-template-columns: 1fr; gap: 52px; max-width: 360px; margin-inline: auto; }
}

/* 单个卡片：手机壳 + 下方玻璃态标签卡 */
.shot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

/* === 手机壳（整体 带品牌色光晕外投影） === */
.shot-phone {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  perspective: 1400px;
}

/* 光晕背景（每个业态不同色） */
.shot-phone::before {
  content: '';
  position: absolute;
  inset: -18px -26px -30px;
  border-radius: 60px;
  filter: blur(24px);
  opacity: 0.35;
  z-index: 0;
  background: radial-gradient(ellipse 70% 65% at 50% 40%, var(--brand-glow, rgba(11,61,102,0.35)) 0%, transparent 70%);
  transition: opacity 0.5s ease;
}

/* 7 业态品牌色变量 */
.shot-card[data-brand="dining"]      { --brand:#B24138; --brand-glow:rgba(178,65,56,0.45); --brand-soft:rgba(178,65,56,0.10); }
.shot-card[data-brand="homestay"]    { --brand:#3B8568; --brand-glow:rgba(59,133,104,0.45); --brand-soft:rgba(59,133,104,0.10); }
.shot-card[data-brand="fishery"]     { --brand:#1F6F99; --brand-glow:rgba(31,111,153,0.45); --brand-soft:rgba(31,111,153,0.10); }
.shot-card[data-brand="ticketing"]   { --brand:#0EA5A1; --brand-glow:rgba(14,165,161,0.45); --brand-soft:rgba(14,165,161,0.10); }
.shot-card[data-brand="fleet"]       { --brand:#C5761A; --brand-glow:rgba(197,118,26,0.45); --brand-soft:rgba(197,118,26,0.10); }
.shot-card[data-brand="retail"]      { --brand:#B4417E; --brand-glow:rgba(180,65,126,0.45); --brand-soft:rgba(180,65,126,0.10); }
.shot-card[data-brand="distributor"] { --brand:#5849B8; --brand-glow:rgba(88,73,184,0.45); --brand-soft:rgba(88,73,184,0.10); }

/* 手机壳外框（仿 iPhone Pro 钛金属银） */
.sp-frame {
  position: relative;
  z-index: 2;
  background:
    linear-gradient(160deg, #F7F7F9 0%, #E3E3E7 45%, #D4D4D9 100%);
  border-radius: 48px;
  padding: 13px;
  box-shadow:
    0 30px 70px rgba(11, 61, 102, 0.22),
    0 14px 30px rgba(11, 61, 102, 0.11),
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(0,0,0,0.08),
    inset 0 0 0 0.5px rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.5);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 屏幕裁切层 */
.sp-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.18),
    inset 0 0 0 6px #0a0a0c;
}

/* 屏幕内图片：顶对齐铺满，保留状态栏位置 */
.sp-screen > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: #fff;
  transform: translateZ(0);
}

/* === 刘海（动态岛） === */
.sp-notch {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 116px;
  height: 34px;
  background: #0B0B0D;
  border-radius: 22px;
  z-index: 5;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(255,255,255,0.02);
}

/* === 屏幕顶部状态栏（9:41 / 信号 / Wi-Fi / 电池） === */
.sp-statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  padding: 14px 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: -apple-system, "SF Pro Display", "PingFang SC", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  z-index: 6;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0.04) 55%, transparent 100%);
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  pointer-events: none;
}
.sp-statusbar .sb-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sp-statusbar .sb-battery {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.sp-statusbar .sb-batt-outer {
  position: relative;
  width: 26px;
  height: 12px;
  border: 1.2px solid rgba(255,255,255,0.9);
  border-radius: 3px;
  padding: 1px;
}
.sp-statusbar .sb-batt-inner {
  width: 85%;
  height: 100%;
  background: #fff;
  border-radius: 1.5px;
}
.sp-statusbar .sb-batt-nub {
  width: 1.6px;
  height: 5px;
  background: rgba(255,255,255,0.9);
  border-radius: 0 1px 1px 0;
  margin-right: 2px;
}

/* 当截图本身是浅色主题时状态栏变黑（可选修饰类 dark-bar） */
.sp-statusbar.is-dark {
  color: #0B3D66;
  text-shadow: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.04) 55%, transparent 100%);
}
.sp-statusbar.is-dark .sb-batt-outer { border-color: #0B3D66; }
.sp-statusbar.is-dark .sb-batt-inner { background: #0B3D66; }
.sp-statusbar.is-dark .sb-batt-nub   { background: #0B3D66; }

/* === 底部 Home Indicator === */
.sp-home {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 138px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 2px rgba(0,0,0,0.35);
  z-index: 6;
  pointer-events: none;
}
.sp-home.is-dark {
  background: rgba(11, 61, 102, 0.85);
  box-shadow: 0 1px 2px rgba(255,255,255,0.35);
}

/* === 机身边键 === */
.sp-side {
  position: absolute;
  background: linear-gradient(90deg, #C9C9CE, #DDDDDF);
  border-radius: 2px 0 0 2px;
  z-index: 1;
  box-shadow: -1px 0 2px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.4);
}
.sp-side.s-left   { left: -2.5px;  }
.sp-side.s-right  { right: -2.5px; background: linear-gradient(270deg, #C9C9CE, #DDDDDF); border-radius: 0 2px 2px 0; }
.sp-side.s-btn-1  { top: 96px;  width: 3px; height: 34px; }
.sp-side.s-btn-2  { top: 144px; width: 3px; height: 54px; }
.sp-side.s-btn-3  { top: 208px; width: 3px; height: 54px; }
.sp-side.s-btn-pw { top: 160px; width: 3px; height: 82px; }

/* === Hover 交互：手机 3D 倾斜 + 光晕增强 + 阴影加深 === */
.shot-card:hover .sp-frame {
  transform: translateY(-6px) rotateX(3deg) rotateY(-4deg);
  box-shadow:
    0 50px 100px rgba(11, 61, 102, 0.28),
    0 22px 50px rgba(11, 61, 102, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(0,0,0,0.08);
}
.shot-card:hover .shot-phone::before {
  opacity: 0.65;
  transform: scale(1.05);
  transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.22,1,0.36,1);
}

/* === 屏幕玻璃高光（斜角光带） === */
.sp-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgba(255,255,255,0.00) 30%,
    rgba(255,255,255,0.14) 42%,
    rgba(255,255,255,0.08) 46%,
    rgba(255,255,255,0.00) 58%
  );
  mix-blend-mode: screen;
}

/* === 卡片：玻璃态标签卡（品牌色 3px 条 + 业态名 + 小标签） === */
.shot-caption {
  position: relative;
  z-index: 2;
  margin: 22px 6px 0;
  padding: 20px 22px 18px;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.85), rgba(255,255,255,0.6));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow:
    0 18px 40px rgba(11, 61, 102, 0.10),
    0 4px 12px rgba(11, 61, 102, 0.05),
    inset 0 1px 0 rgba(255,255,255,1);
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.45s cubic-bezier(0.22,1,0.36,1);
}
.shot-caption::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, var(--brand, var(--navy-deep)), color-mix(in srgb, var(--brand, var(--navy-deep)) 60%, var(--gold)));
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}
.shot-card:hover .shot-caption {
  transform: translateY(-2px);
  box-shadow:
    0 28px 50px rgba(11, 61, 102, 0.13),
    0 8px 16px rgba(11, 61, 102, 0.07),
    inset 0 1px 0 rgba(255,255,255,1);
}

.shot-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-deep);
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-bottom: 6px;
}
.shot-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.65;
  letter-spacing: 0.02em;
}

/* 业态品牌色小圆形 chip（在 shot-name 前） */
.brand-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand, var(--navy-deep));
  box-shadow:
    0 0 0 3px var(--brand-soft, rgba(11,61,102,0.10)),
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 1px 2px rgba(0,0,0,0.12);
}

/* 标签小 chip（shot-sub 内部可选装饰） */
.brand-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brand, var(--navy-deep));
  background: var(--brand-soft, rgba(11,61,102,0.08));
  border: 1px solid rgba(255,255,255,0.7);
}

/* === 旧 phone-mockup / phone-frame / phone-label 兼容（保留但做同风格升级） === */
.phone-mockup {
  max-width: 300px;
  margin: 0 auto;
  position: relative;
}
.phone-grid .phone-mockup {
  display: block;
}
.phone-frame {
  position: relative;
  background: linear-gradient(160deg, #F7F7F9 0%, #E3E3E7 45%, #D4D4D9 100%);
  border-radius: 48px;
  padding: 13px;
  box-shadow:
    0 30px 70px rgba(11, 61, 102, 0.22),
    0 14px 30px rgba(11, 61, 102, 0.11),
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.5);
}
.phone-frame::before {
  top: 16px;
  width: 116px;
  height: 34px;
  background: #0B0B0D;
  border-radius: 22px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.06);
}
/* 旧框架里的 img 也套上屏幕裁切 */
.phone-frame::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(13px + 10px);
  transform: translateX(-50%);
  width: 138px;
  height: 5px;
  border-radius: 3px;
  background: rgba(10, 10, 12, 0.6);
  z-index: 5;
  pointer-events: none;
}
.phone-frame > img {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top center;
  border-radius: 36px;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.18),
    inset 0 0 0 6px #0a0a0c;
}
/* 旧手机屏玻璃高光覆盖 */
.phone-mockup::after {
  content: '';
  position: absolute;
  top: 13px; left: 13px; right: 13px; bottom: 13px;
  z-index: 4;
  pointer-events: none;
  border-radius: 36px;
  background: linear-gradient(
    125deg,
    rgba(255,255,255,0.00) 30%,
    rgba(255,255,255,0.14) 42%,
    rgba(255,255,255,0.08) 46%,
    rgba(255,255,255,0.00) 58%
  );
  mix-blend-mode: screen;
}
.phone-label,
.phone-caption {
  position: relative;
  margin: 22px 6px 0;
  padding: 16px 20px 15px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.88), rgba(255,255,255,0.6));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.9);
  border-top: none;
  box-shadow:
    0 18px 40px rgba(11, 61, 102, 0.10),
    0 4px 12px rgba(11, 61, 102, 0.05),
    inset 0 1px 0 rgba(255,255,255,1);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--navy-deep);
  overflow: hidden;
}
.phone-label::before,
.phone-caption::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, var(--navy-deep), var(--gold));
}
.phone-side-btn {
  display: none;
}
/* =========================================================
   移动端强化适配（平板 / 手机）
   - 断点：≤960px 平板、≤768px 大屏手机、≤480px 小屏手机
   - 目标：消除横向滚动、Hero/标题字号自适应、截图网格单列、
          流程图 SVG 缩放适配内屏、目录缩进收紧、段落间距合理
   ========================================================= */

/* -------- 全局：任何情况禁止横向溢出 -------- */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
img,
svg,
video,
iframe,
table {
  max-width: 100% !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
h1, h2, h3, h4, h5, h6, p, li, figcaption, blockquote, td, th {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
/* 流程图里的 svg 强制在屏宽内，避免横向溢出 */
.diagram-stage svg,
.mermaid-block svg,
.diagram-wrap svg {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  overflow: visible;
}
.diagram-stage,
.diagram-wrap,
.mermaid-block {
  overflow: hidden;
}

/* -------- 断点 1：≤960px 平板 -------- */
@media (max-width: 960px) {
  .doc-main,
  .doc-body,
  .doc-section,
  main,
  .content-area,
  .hero-wrap,
  .doc-header {
    padding-left: 28px !important;
    padding-right: 28px !important;
    max-width: 100% !important;
  }
  .hero-title,
  .doc-hero h1,
  h1.hero-title {
    font-size: 40px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em !important;
  }
  .hero-sub,
  .doc-hero p,
  .doc-header .subtitle {
    font-size: 15px !important;
  }
  h1 { font-size: 30px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  p, li, td, th, figcaption { font-size: 15px; line-height: 1.8; }

  .shot-grid,
  .business-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 22px !important;
  }
}

/* -------- 断点 2：≤768px 大屏手机 -------- */
@media (max-width: 768px) {
  /* 外层容器边距收紧到屏幕安全的 20px */
  .doc-main,
  .doc-body,
  .doc-section,
  main,
  .content-area,
  .hero-wrap,
  .doc-header,
  .toc-wrap,
  .doc-toc,
  section,
  article {
    padding-left: 20px !important;
    padding-right: 20px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Hero / 封面字号阶梯下降 */
  .hero-title,
  .doc-hero h1,
  h1.hero-title,
  .doc-header h1 {
    font-size: 30px !important;
    line-height: 1.22 !important;
    margin-bottom: 12px !important;
  }
  .hero-sub,
  .doc-hero > p,
  .doc-header .subtitle,
  .doc-header .meta,
  .hero-meta {
    font-size: 13.5px !important;
    line-height: 1.7 !important;
  }
  h1 { font-size: 26px; line-height: 1.3; }
  h2 { font-size: 20px; line-height: 1.4; margin-top: 32px; }
  h3 { font-size: 17px; }
  p, li, td, th, figcaption, blockquote { font-size: 14.5px; line-height: 1.85; }

  /* 目录收紧 */
  .doc-toc ol,
  .toc-wrap ol,
  .toc-wrap ul {
    padding-left: 18px !important;
    gap: 8px !important;
  }
  .doc-toc li,
  .toc-wrap li {
    font-size: 14px;
  }
  .doc-toc a,
  .toc-wrap a {
    padding: 6px 0;
  }

  /* 截图网格 → 单列，居中；每张卡片宽度不超过屏宽 */
  .shot-grid,
  .business-grid {
    grid-template-columns: 1fr !important;
    gap: 42px 0 !important;
    max-width: 420px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 8px !important;
  }
  .shot-card {
    justify-self: center;
    width: 100%;
    max-width: 360px;
  }
  /* 手机壳在手机屏上缩放到 88%，避免看起来太大 */
  .shot-phone {
    transform: scale(0.88);
    transform-origin: top center;
    margin-bottom: -16%;
  }
  .shot-phone::before { inset: -14px -22px -26px !important; }
  .shot-caption {
    margin-top: 4px !important;
    padding: 14px 16px 12px !important;
    border-radius: 16px !important;
  }
  .shot-name { font-size: 15px !important; }
  .shot-sub { font-size: 13px !important; }

  /* 流程图装饰：手机上进一步收紧 padding，工具栏缩小 */
  .diagram-wrap.is-decorated {
    margin: 30px auto !important;
    padding: 48px 14px 26px !important;
    border-radius: 20px !important;
  }
  .diagram-stage {
    padding: 18px 10px 14px !important;
    border-radius: 16px !important;
    margin-top: 12px !important;
  }
  .diagram-toolbar { height: 38px; padding: 0 12px; gap: 6px; }
  .dt-dot { width: 9px; height: 9px; }
  .dt-label { font-size: 10.5px; padding: 3px 10px; letter-spacing: 0.05em; }
  .dt-brand { font-size: 9.5px; letter-spacing: 0.16em; }
  .diagram-corners .dc { width: 18px; height: 18px; border-width: 1.5px; }
  .dc-tl { top: 44px; left: 8px; } .dc-tr { top: 44px; right: 8px; }
  .dc-bl { bottom: 60px; left: 8px; } .dc-br { bottom: 60px; right: 8px; }
  .diagram-caption {
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 2px;
    margin-top: 20px;
    justify-content: center;
  }
  .dcap-line { max-width: 50px; }
  .dcap-chip {
    font-size: 11px;
    padding: 3px 11px;
  }
  .dcap-text {
    max-width: 100%;
    width: 100%;
    text-align: center;
    font-size: 13px !important;
    line-height: 1.6 !important;
  }

  /* 表格在手机上横向滚动但不撑破容器 */
  .table-wrap,
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    width: max-content;
    min-width: 100%;
  }

  /* 长代码块 / 预文本横向滚动 */
  pre, code {
    white-space: pre-wrap;
    word-break: break-word;
  }
}

/* -------- 断点 3：≤480px 小屏手机 -------- */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
  .doc-main,
  .doc-body,
  .doc-section,
  main,
  .content-area,
  .hero-wrap,
  .doc-header,
  section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .hero-title,
  .doc-hero h1,
  h1.hero-title,
  .doc-header h1 {
    font-size: 25px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.005em !important;
  }
  .hero-sub,
  .doc-hero > p,
  .doc-header .subtitle,
  .doc-header .meta,
  .hero-meta {
    font-size: 12.5px !important;
    line-height: 1.75 !important;
  }
  h1 { font-size: 22px; line-height: 1.35; }
  h2 { font-size: 18px; line-height: 1.45; margin-top: 28px; }
  h3 { font-size: 15.5px; }
  p, li, td, th, figcaption, blockquote { font-size: 14px; line-height: 1.9; }

  /* 截图网格：单列更紧凑 */
  .shot-grid,
  .business-grid {
    grid-template-columns: 1fr !important;
    gap: 36px 0 !important;
    padding: 0 !important;
  }
  .shot-card {
    max-width: 100%;
  }
  .shot-phone {
    transform: scale(0.82);
    transform-origin: top center;
    margin-bottom: -22%;
  }
  .shot-caption {
    margin-top: 0 !important;
    padding: 12px 14px 11px !important;
    border-radius: 14px !important;
  }
  .shot-name { font-size: 14.5px !important; }
  .shot-sub { font-size: 12.5px !important; }

  /* 流程图装饰：极限小屏 */
  .diagram-wrap.is-decorated {
    margin: 26px auto !important;
    padding: 42px 10px 22px !important;
    border-radius: 18px !important;
  }
  .diagram-stage {
    padding: 14px 8px 12px !important;
    border-radius: 14px !important;
    margin-top: 10px !important;
  }
  .diagram-toolbar { height: 34px; padding: 0 10px; gap: 5px; }
  .dt-dot { width: 8px; height: 8px; }
  .dt-label { font-size: 10px; padding: 2px 9px; }
  .dt-brand { font-size: 9px; letter-spacing: 0.14em; }
  .diagram-corners .dc { width: 16px; height: 16px; border-width: 1.4px; }
  .dc-tl { top: 38px; left: 6px; } .dc-tr { top: 38px; right: 6px; }
  .dc-bl { bottom: 56px; left: 6px; } .dc-br { bottom: 56px; right: 6px; }
  .diagram-caption {
    margin-top: 18px;
    gap: 6px;
  }
  .dcap-line { max-width: 40px; height: 1px; }
  .dcap-chip {
    font-size: 10.5px;
    padding: 2.5px 10px;
  }
  .dcap-text {
    font-size: 12.5px !important;
    line-height: 1.65 !important;
  }

  /* 按钮、chip、tag 在小屏上缩小一点 */
  .btn,
  .chip,
  .tag {
    font-size: 12px !important;
    padding: 8px 14px !important;
    border-radius: 999px !important;
  }

  /* 分隔金线缩短 */
  .divider-line,
  .dcap-line,
  .doc-divider {
    max-width: 60px !important;
  }
}

/* -------- 兼容 iPhone 刘海 / 灵动岛的安全区 -------- */
@supports (padding: max(0px)) {
  .doc-header,
  .doc-footer,
  .doc-main,
  .hero-section {
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
  }
}
