:root {
  --pink: #ff0080;
  --magenta: #ff00ff;
  --ink: #26171f;
  --text: #fbeef6;
  --muted: #d0b7c9;
  --line: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.06);
  --bar: 56px;
  --r: 18px;
}

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

html {
  background: #1a0f16;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Libre Baskerville", "Songti SC", "Source Han Serif SC", Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(45% 40% at 18% 18%, rgba(255, 0, 128, 0.75), transparent 62%),
    radial-gradient(42% 46% at 82% 14%, rgba(255, 0, 255, 0.6), transparent 64%),
    radial-gradient(64% 52% at 62% 92%, rgba(112, 24, 176, 0.62), transparent 72%),
    conic-gradient(from 210deg at 50% 50%, #ff0080, #ff00ff, #5f1780, #ff0080);
  filter: blur(72px) saturate(135%);
  opacity: 0.6;
  animation: drift 34s linear infinite;
}

@keyframes drift {
  0% {
    transform: rotate(0deg) scale(1.04);
  }
  50% {
    transform: rotate(180deg) scale(1.14);
  }
  100% {
    transform: rotate(360deg) scale(1.04);
  }
}

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

a {
  color: #ffb9dd;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 128, 0.45);
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: #fff;
  border-color: var(--magenta);
}

:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
}

body.menu-open {
  overflow: hidden;
}

/* 顶栏 */
.bar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--bar);
  padding: 0 16px;
  background: rgba(30, 17, 25, 0.6);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(140deg, rgba(255, 0, 128, 0.55), rgba(255, 0, 255, 0.18));
  color: #fff;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(255, 0, 128, 0.28);
}

.mark span {
  transform: translateY(1px);
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.burger:hover {
  border-color: rgba(255, 0, 255, 0.6);
  color: #fff;
}

.burger-lines,
.burger-lines::before,
.burger-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ff0080, #ff00ff);
  content: "";
  position: relative;
}

.burger-lines::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.burger-lines::after {
  position: absolute;
  top: 6px;
  left: 0;
}

/* 锚点条 */
.dock {
  position: sticky;
  top: var(--bar);
  z-index: 60;
  overflow-x: auto;
  overflow-y: hidden;
  background: linear-gradient(180deg, rgba(26, 15, 22, 0.9), rgba(26, 15, 22, 0.62));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.dock::-webkit-scrollbar {
  display: none;
}

.dock-list {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 12px;
  list-style: none;
  min-height: 48px;
}

.dock-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 16px;
  white-space: nowrap;
}

.dock-list a:hover {
  color: #fff;
  border-color: rgba(255, 0, 255, 0.5);
  background: rgba(255, 0, 255, 0.16);
}

/* 全屏遮罩菜单 */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: calc(var(--bar) + 24px) 20px 40px;
  overflow-y: auto;
  background: rgba(19, 10, 16, 0.86);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.sheet[data-open] {
  opacity: 1;
  visibility: visible;
}

.sheet-nav ol {
  counter-reset: s;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sheet-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #fff;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-size: 22px;
  letter-spacing: 0.03em;
}

.sheet-nav a::before {
  counter-increment: s;
  content: counter(s, decimal-leading-zero);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.1em;
}

.sheet-nav a:hover {
  border-color: rgba(255, 0, 255, 0.45);
  background: rgba(255, 0, 255, 0.14);
}

/* 主体网格 */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 16px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 30px;
  align-items: start;
}

.stage {
  min-width: 0;
  display: grid;
  gap: 22px;
}

main [id],
.prose > article {
  scroll-margin-top: calc(var(--bar) + 66px);
}

/* 首屏 */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  min-height: 45vh;
  padding: 26px 22px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(150deg, rgba(255, 0, 128, 0.22), rgba(255, 0, 255, 0.08) 55%, rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

.hero-ghost {
  position: absolute;
  right: -4px;
  bottom: 4px;
  z-index: -1;
  margin: 0;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-size: clamp(46px, 11.5vw, 108px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 255, 0.32);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.hero h1 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-size: clamp(33px, 5.6vw, 52px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, #ffffff, #ffb9dd 45%, #ff00ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero .lead {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 17px;
}

.hero-mark {
  flex: 0 0 auto;
  width: 104px;
  margin: 0;
}

.hero-mark img {
  display: block;
  width: 100%;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 32px rgba(255, 0, 128, 0.3);
}

/* 正文 */
.prose {
  display: grid;
  gap: 22px;
}

.prose > article {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  animation: rise 0.6s ease both;
}

.prose > article:nth-child(2) { animation-delay: 0.05s; }
.prose > article:nth-child(3) { animation-delay: 0.1s; }
.prose > article:nth-child(4) { animation-delay: 0.15s; }
.prose > article:nth-child(5) { animation-delay: 0.2s; }
.prose > article:nth-child(6) { animation-delay: 0.25s; }
.prose > article:nth-child(7) { animation-delay: 0.3s; }

.prose > article:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 0, 255, 0.45);
  box-shadow: 0 20px 44px rgba(255, 0, 128, 0.2);
}

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

.prose h2 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-size: clamp(24px, 3.4vw, 31px);
  font-weight: 600;
  line-height: 1.26;
  color: #fff;
}

.prose h3 {
  margin: 22px 0 8px;
  font-size: 20px;
  line-height: 1.4;
  color: #fff;
}

.prose p {
  margin: 0 0 14px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose p.subtitle,
.prose p.subhead,
.prose p.desc,
.prose p.lead {
  margin: 0 0 16px;
  color: #ffb9dd;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
}

.prose li {
  margin: 0.42em 0;
}

.prose strong,
.prose b {
  color: #fff;
}

.prose img {
  border-radius: 14px;
  border: 1px solid var(--line);
}

.prose blockquote {
  margin: 0 0 14px;
  padding: 10px 16px;
  border-left: 2px solid var(--magenta);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 0, 255, 0.08);
  color: var(--muted);
}

.prose hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
}

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

.prose code {
  font-size: 15px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

/* 侧栏 */
.rail {
  position: sticky;
  top: calc(var(--bar) + 62px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}

.rail-title {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-size: 21px;
  font-weight: 600;
  color: #fff;
}

.rail .subtitle {
  margin: 0 0 12px;
  color: #ffb9dd;
  font-size: 16px;
  letter-spacing: 0.02em;
}

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

.rail-list li {
  counter-increment: r;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 16px;
}

.rail-list a::before {
  content: counter(r, decimal-leading-zero);
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.rail-list a:hover {
  color: #fff;
  border-color: rgba(255, 0, 255, 0.4);
  background: rgba(255, 0, 255, 0.14);
}

/* 页脚 */
.foot {
  margin-top: 46px;
  padding: 38px 16px 44px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 0, 128, 0.14), rgba(255, 0, 255, 0.04));
}

.foot p {
  margin: 0 0 12px;
}

.foot-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 34px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--pink), var(--magenta));
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.1em;
  box-shadow: 0 14px 34px rgba(255, 0, 128, 0.36);
}

.foot-cta a:hover {
  color: #fff;
  box-shadow: 0 16px 40px rgba(255, 0, 255, 0.45);
}

.foot small {
  display: block;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0.04em;
}

@media (max-width: 980px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .rail {
    position: static;
  }

  .hero {
    min-height: 42vh;
  }

  .hero-mark {
    width: 76px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding: 22px 16px 24px;
    gap: 12px;
  }

  .prose > article {
    padding: 20px 16px;
  }

  .foot-cta a {
    width: 100%;
    max-width: 320px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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