:root {
  --ink: #261717;
  --red: #ff0000;
  --vio: #8b00ff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass2: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.22);
  --line-soft: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 44px -22px rgba(0, 0, 0, 0.8);
  --r: 4px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  color: #f2e7e6;
  font-family: Cabin, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  overflow-x: clip;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(38vw 38vw at 10% 6%, rgba(255, 0, 0, 0.6), transparent 62%),
    radial-gradient(44vw 44vw at 92% 20%, rgba(139, 0, 255, 0.58), transparent 64%),
    radial-gradient(50vw 50vw at 58% 94%, rgba(255, 0, 0, 0.24), transparent 68%),
    radial-gradient(30vw 30vw at 78% 62%, rgba(139, 0, 255, 0.22), transparent 70%);
  filter: blur(30px);
  transform: scale(1.18);
  animation: drift 24s ease-in-out infinite alternate;
}

body::after {
  background: linear-gradient(180deg, rgba(38, 23, 23, 0.2), rgba(38, 23, 23, 0.55) 40%, rgba(38, 23, 23, 0.92));
  z-index: -1;
}

@keyframes drift {
  0% { transform: scale(1.18) translate3d(0, 0, 0); }
  100% { transform: scale(1.26) translate3d(-2.5%, 2%, 0); }
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: #ffb4b4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
}

a:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(255, 0, 0, 0.8);
  outline-offset: 2px;
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  overflow-x: clip;
}

a[hidden] {
  display: none !important;
}

/* ---------- 左侧固定栏 ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  max-width: 100%;
  padding: 9px 14px 10px;
  background: rgba(38, 23, 23, 0.66);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-height: 40px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.markText {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--red);
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.finder {
  flex: 1 1 96px;
  min-width: 88px;
  max-width: 100%;
  margin: 0;
}

.finder input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.finder input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

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

.railNav p {
  display: flex;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0 0 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.railNav p::-webkit-scrollbar {
  display: none;
}

.railNav a {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px 8px 27px;
  font-size: 16px;
  color: #f5eae9;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.railNav a::before {
  content: "";
  position: absolute;
  left: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--vio));
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

.railNav a:hover,
.railNav a.on {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--line);
  transform: translateX(2px);
  color: #fff;
}

/* ---------- 主体 ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 100%;
  padding: 14px 14px 34px;
}

.stage > * {
  min-width: 0;
  max-width: 100%;
}

/* ---------- 侧栏目录 ---------- */
.toc {
  max-width: 100%;
  padding: 13px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.tocTitle {
  margin: 0 0 9px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fff;
}

.tocTitle span {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid;
  border-image: linear-gradient(90deg, var(--red), var(--vio)) 1;
}

.tocList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.tocList a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 16px;
  color: #ecdfdd;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r);
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.tocList a:hover,
.tocList a.on {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--line);
}

/* ---------- 正文文档 ---------- */
.doc {
  min-width: 0;
  max-width: 100%;
}

.doc p,
.doc li,
.doc h1,
.doc h2,
.doc h3,
.doc td,
.doc th,
.doc blockquote {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
  min-height: 45vh;
  margin: 0 0 16px;
  padding: 46px 18px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r) var(--r) 72px var(--r);
  background:
    linear-gradient(155deg, rgba(255, 0, 0, 0.5), rgba(139, 0, 255, 0.42) 58%, rgba(38, 23, 23, 0.72)),
    rgba(38, 23, 23, 0.4);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.heroPic {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(38, 23, 23, 0.15), rgba(38, 23, 23, 0.86));
}

.ghost {
  position: absolute;
  top: -2px;
  left: 8px;
  right: 8px;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  font-family: "Amatic SC", "PingFang SC", sans-serif;
  font-size: clamp(42px, 13vw, 150px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  text-overflow: clip;
}

.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(26px, 5.4vw, 56px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
}

/* ---------- 正文分节 ---------- */
.doc > article {
  scroll-margin-top: 120px;
  max-width: 100%;
  animation: rise 0.52s ease both;
}

.doc > article:nth-of-type(2) { animation-delay: 0.05s; }
.doc > article:nth-of-type(3) { animation-delay: 0.1s; }
.doc > article:nth-of-type(4) { animation-delay: 0.15s; }
.doc > article:nth-of-type(5) { animation-delay: 0.2s; }
.doc > article:nth-of-type(6) { animation-delay: 0.25s; }
.doc > article:nth-of-type(7) { animation-delay: 0.3s; }
.doc > article:nth-of-type(8) { animation-delay: 0.35s; }

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

.doc > article:not(.hero) {
  margin: 0 0 16px;
  padding: 22px 18px;
  background: var(--glass2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.doc > article:not(.hero):hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-2px);
}

.doc h2 {
  margin: 0 0 14px;
  font-size: clamp(21px, 3.6vw, 30px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
  color: #fff;
}

.doc h2 span {
  position: relative;
  display: inline-block;
  padding-left: 17px;
}

.doc h2 span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(var(--red), var(--vio));
}

.doc h3 {
  margin: 20px 0 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fff;
}

.doc h3 span {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 0, 0, 0.55);
}

.doc p {
  margin: 0 0 0.95em;
  color: rgba(255, 255, 255, 0.87);
}

.doc p:last-child,
.doc ul:last-child,
.doc ol:last-child {
  margin-bottom: 0;
}

.doc ul,
.doc ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
  color: rgba(255, 255, 255, 0.87);
}

.doc li {
  margin-bottom: 0.4em;
}

.doc li::marker {
  color: var(--red);
}

.doc strong {
  color: #fff;
}

.doc img {
  height: auto;
  border-radius: var(--r);
  border: 1px solid var(--line);
}

.doc table {
  width: 100%;
  max-width: 100%;
  margin: 0 0 1em;
  border-collapse: collapse;
  font-size: 16px;
  table-layout: fixed;
}

.doc th,
.doc td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.doc pre {
  max-width: 100%;
  margin: 0 0 1em;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: rgba(0, 0, 0, 0.25);
}

.doc blockquote {
  margin: 0 0 1em;
  padding: 10px 14px;
  border-left: 3px solid var(--vio);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0 var(--r) var(--r) 0;
}

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  max-width: 100%;
  padding: 20px 16px 30px;
  border-top: 1px solid var(--line);
  background: rgba(38, 23, 23, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.footCta {
  margin: 0;
}

.footCta a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 9px 24px;
  font-family: "Amatic SC", "PingFang SC", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--r);
  background: linear-gradient(120deg, rgba(255, 0, 0, 0.55), rgba(139, 0, 255, 0.5));
  box-shadow: 0 12px 30px -16px rgba(255, 0, 0, 0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.footCta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -16px rgba(139, 0, 255, 0.95);
}

.footCopy {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.06em;
}

/* ---------- 回顶 ---------- */
.toTop {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(8px);
}

.toTop.on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.toTop a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(38, 23, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------- 窄屏微调 ---------- */
@media (max-width: 420px) {
  .rail {
    gap: 6px 10px;
    padding: 8px 11px 9px;
  }

  .mark {
    font-size: 17px;
    letter-spacing: 0.04em;
  }

  .stage {
    padding: 11px 11px 30px;
  }

  .hero {
    padding: 40px 13px 20px;
    border-radius: var(--r) var(--r) 54px var(--r);
  }

  .ghost {
    left: 6px;
    right: 6px;
  }

  .doc > article:not(.hero) {
    padding: 18px 13px;
  }

  .foot {
    padding: 18px 13px 28px;
  }
}

/* ---------- 桌面 ---------- */
@media (min-width: 960px) {
  body {
    padding-left: 274px;
  }

  .rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 274px;
    max-width: 274px;
    flex-direction: column;
    align-items: stretch;
    align-content: flex-start;
    gap: 16px;
    padding: 26px 22px;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: rgba(38, 23, 23, 0.5);
  }

  .mark {
    font-size: 24px;
    letter-spacing: 0.1em;
  }

  .finder {
    flex: 0 0 auto;
    min-width: 0;
  }

  .railNav {
    flex: 1 1 auto;
  }

  .railNav p {
    flex-direction: column;
    overflow: visible;
    padding-bottom: 0;
  }

  .railNav a:hover,
  .railNav a.on {
    transform: translateX(4px);
  }

  .stage {
    grid-template-columns: 234px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    padding: 30px 34px 56px;
  }

  .toc {
    position: sticky;
    top: 30px;
    padding: 16px 14px;
  }

  .tocList {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .tocList a {
    border-left: 2px solid transparent;
    border-radius: 0 var(--r) var(--r) 0;
  }

  .tocList a:hover,
  .tocList a.on {
    border-left-color: var(--red);
  }

  .hero {
    min-height: 45vh;
    padding: 56px 40px 34px;
    border-radius: var(--r) var(--r) 96px var(--r);
  }

  .ghost {
    left: 10px;
    right: auto;
    max-width: 96%;
  }

  .doc > article {
    scroll-margin-top: 30px;
  }

  .doc > article:not(.hero) {
    padding: 30px 34px;
  }

  .foot {
    padding: 26px 34px 34px;
  }

  .toTop {
    right: 24px;
    bottom: 24px;
  }
}

@media (min-width: 1280px) {
  .hero {
    padding: 64px 52px 40px;
  }

  .doc > article:not(.hero) {
    padding: 34px 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
}
</final>
</final>

button[aria-expanded]{min-width:44px;min-height:44px}
