:root {
  --ink: #261717;
  --red: #ff0000;
  --pink: #ff1493;
  --bg: #140b0c;
  --panel: #241416;
  --edge: #3d2427;
  --line: rgba(255, 20, 147, 0.18);
  --text: #f7ecec;
  --muted: #cba8ac;
  --radius: 4px;
  --sans: "Quicksand", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --hand: "Caveat", "Quicksand", "PingFang SC", "Microsoft YaHei", cursive;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  color: var(--text);
  background: transparent;
  overflow-x: hidden;
}

@supports (overflow-x: clip) {
  body {
    overflow-x: clip;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: -25vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(30% 34% at 20% 26%, rgba(255, 0, 0, 0.55), transparent 64%),
    radial-gradient(28% 32% at 76% 20%, rgba(255, 20, 147, 0.55), transparent 62%),
    radial-gradient(40% 42% at 60% 80%, rgba(130, 18, 96, 0.55), transparent 68%),
    conic-gradient(from 200deg at 50% 55%, rgba(255, 0, 0, 0.22), rgba(255, 20, 147, 0.26), rgba(38, 23, 23, 0.9), rgba(255, 0, 0, 0.22));
  background-size: 200% 200%, 200% 200%, 200% 200%, 180% 180%;
  filter: blur(46px) saturate(1.3);
  opacity: 0.62;
  animation: aurora 12s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% {
    background-position: 0% 20%, 100% 0%, 50% 100%, 0% 0%;
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    background-position: 20% 0%, 80% 22%, 40% 80%, 100% 100%;
    transform: translate3d(0, -3%, 0) scale(1.06);
  }
}

@keyframes bandflow {
  to {
    background-position: 200% 0;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #ffb4d4;
  outline-offset: 2px;
}

/* 顶部导航 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(12px, 3vw, 34px);
  background: rgba(20, 11, 12, 0.84);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.topbar ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-L ul {
  justify-content: flex-start;
}

.nav-R ul {
  justify-content: flex-end;
}

.topbar li {
  display: flex;
}

.topbar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 11px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.25s ease, background 0.25s ease;
}

.topbar a:hover {
  color: #fff;
  background: rgba(255, 20, 147, 0.16);
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 5px 14px;
  border-radius: var(--radius);
  border: 2px solid rgba(255, 20, 147, 0.28);
  background: linear-gradient(120deg, rgba(255, 0, 0, 0.26), rgba(255, 20, 147, 0.26));
  text-decoration: none;
  font-family: var(--hand);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-text {
  background: linear-gradient(100deg, #ffffff, #ffc9dd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.pill {
  min-height: 44px;
  padding: 9px 18px !important;
  border-radius: 999px;
  background: linear-gradient(100deg, #ff2d55, var(--pink));
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pill:hover {
  background: linear-gradient(100deg, var(--pink), #ff6fb4) !important;
  color: #fff !important;
}

/* 首屏 */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 68vh;
  padding: clamp(56px, 10vh, 108px) clamp(16px, 5vw, 40px) clamp(72px, 12vh, 122px);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  background:
    radial-gradient(60% 80% at 15% 10%, rgba(255, 0, 0, 0.44), transparent 62%),
    radial-gradient(55% 70% at 88% 20%, rgba(255, 20, 147, 0.44), transparent 60%),
    conic-gradient(from 150deg at 50% 50%, #2b1216, #43121f, #1a0e11, #2b1216);
  background-size: 200% 200%, 200% 200%, 160% 160%;
  animation: aurora 11s ease-in-out infinite alternate;
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  mix-blend-mode: screen;
  filter: saturate(1.2);
}

.hero-copy {
  position: relative;
  max-width: 18em;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(2.3rem, 7.2vw, 4.6rem);
  line-height: 1.14;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 2px 34px rgba(0, 0, 0, 0.55);
}

.band {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: 1px;
  height: 12px;
  background: linear-gradient(90deg, var(--red), var(--pink), #ff5aa8, var(--red));
  background-size: 200% 100%;
  transform: skewY(-1.4deg);
  opacity: 0.92;
  animation: bandflow 9s linear infinite;
}

/* 主体 */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  align-items: start;
  gap: clamp(20px, 3vw, 46px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 60px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 70px);
}

.doc {
  min-width: 0;
  overflow-wrap: break-word;
}

.doc > article {
  padding: clamp(26px, 3.6vw, 44px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 104px;
}

.doc > article:first-child {
  border-top: 0;
  padding-top: 0;
}

.doc > article:last-child {
  padding-bottom: 0;
}

.doc h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0.02em;
  color: #fff;
}

.doc h2::before {
  content: "";
  display: block;
  width: 52px;
  height: 5px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--pink));
}

.doc h3 {
  margin: 26px 0 8px;
  font-size: 1.16rem;
  font-weight: 600;
  color: #ffd9e6;
}

.subtitle {
  margin: 0 0 16px;
  font-size: 1rem;
  letter-spacing: 0.16em;
  color: var(--pink);
}

.doc p {
  margin: 0 0 16px;
}

.doc ul,
.doc ol {
  margin: 0 0 18px;
  padding-left: 1.35em;
}

.doc li {
  margin: 6px 0;
}

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

.doc a {
  color: #ff8fc2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc a:hover {
  color: #fff;
}

.doc strong {
  color: #fff;
}

.doc img {
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: 4px solid var(--edge);
  border-radius: var(--radius);
}

.doc blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--pink);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 20, 147, 0.08);
  color: #ffe2ee;
}

.doc code {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.95em;
}

.doc table {
  display: block;
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  overflow-x: auto;
}

.doc th,
.doc td {
  padding: 9px 12px;
  border: 1px solid var(--edge);
  text-align: left;
}

.doc th {
  background: rgba(255, 20, 147, 0.12);
  color: #fff;
}

/* 侧栏 */
.rail {
  position: sticky;
  top: 96px;
  padding: 16px;
  border: 4px solid var(--edge);
  border-radius: var(--radius);
  background: rgba(36, 20, 22, 0.78);
  backdrop-filter: blur(10px);
}

.rail h2 {
  margin: 0 0 4px;
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #fff;
}

.rail .subtitle {
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}

.rail-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  border-radius: 3px;
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.rail-list a:hover,
.rail-list a.is-on {
  color: #fff;
  background: rgba(255, 20, 147, 0.16);
  border-left-color: var(--pink);
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: clamp(28px, 5vw, 56px);
  padding: clamp(28px, 5vw, 46px) clamp(16px, 4vw, 40px) 26px;
  border-top: 4px solid var(--edge);
  background: linear-gradient(180deg, rgba(255, 0, 0, 0.12), rgba(255, 20, 147, 0.06) 46%, transparent);
}

.foot .cta {
  flex: 1 0 100%;
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--hand);
  font-size: clamp(1.7rem, 4.6vw, 2.8rem);
  line-height: 1.25;
}

.foot .cta a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: #fff;
  text-decoration: none;
  border-bottom: 4px solid var(--pink);
  transition: color 0.24s ease, border-color 0.24s ease;
}

.foot .cta a:hover {
  color: #ffb4d4;
  border-color: var(--red);
}

.foot-brand {
  margin: 0;
  font-family: var(--hand);
  font-size: 21px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.foot small {
  margin-left: auto;
  font-size: 16px;
  color: #9d7c80;
}

/* 滚动揭示 */
.will-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.will-reveal.is-in {
  opacity: 1;
  transform: none;
}

.doc > article.will-reveal li {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.doc > article.is-in li {
  opacity: 1;
  transform: none;
}

.doc > article.is-in li:nth-child(1) { transition-delay: 0.04s; }
.doc > article.is-in li:nth-child(2) { transition-delay: 0.09s; }
.doc > article.is-in li:nth-child(3) { transition-delay: 0.14s; }
.doc > article.is-in li:nth-child(4) { transition-delay: 0.19s; }
.doc > article.is-in li:nth-child(5) { transition-delay: 0.24s; }
.doc > article.is-in li:nth-child(6) { transition-delay: 0.29s; }
.doc > article.is-in li:nth-child(7) { transition-delay: 0.34s; }

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 26px;
  }

  .rail {
    position: static;
    order: 2;
  }

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

@media (max-width: 820px) {
  .topbar {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 10px 12px;
  }

  .brand {
    order: -1;
    justify-self: center;
    font-size: 23px;
  }

  .topbar ul {
    flex-wrap: wrap;
    gap: 0 4px;
    justify-content: center;
  }

  .topbar a {
    padding: 10px 9px;
  }

  .hero {
    min-height: 56vh;
    padding: 46px 16px 70px;
    clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
  }

  .foot .cta {
    font-size: 1.6rem;
  }

  .foot small {
    flex: 1 0 100%;
    margin-left: 0;
  }
}

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

  body::before,
  .hero,
  .band {
    animation: none;
  }

  .will-reveal,
  .doc > article.will-reveal li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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