:root{
  --pink:#ff0080;
  --mag:#ff00ff;
  --violet:#7b2bff;
  --ink:#26171f;
  --bg:#100a0e;
  --fg:#f7edf4;
  --dim:#cbb4c5;
  --card:rgba(38,23,31,.78);
  --r:28px;
  --serif:'Crimson Pro',Georgia,'Songti SC',serif;
  --sans:'Atkinson Hyperlegible','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
}
*{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:1.0625rem;
  line-height:1.72;
  color:var(--fg);
  background-color:transparent;
  background-image:
    linear-gradient(rgba(255,255,255,.032) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.032) 1px,transparent 1px);
  background-size:72px 72px;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
body::before{
  content:"";
  position:fixed;
  inset:-25%;
  z-index:-2;
  pointer-events:none;
  background:
    radial-gradient(38% 42% at 22% 24%,rgba(255,0,128,.62),transparent 68%),
    radial-gradient(34% 38% at 78% 18%,rgba(255,0,255,.48),transparent 70%),
    radial-gradient(46% 44% at 68% 78%,rgba(112,18,104,.60),transparent 72%),
    radial-gradient(40% 40% at 12% 84%,rgba(255,0,128,.38),transparent 70%);
  filter:blur(46px) saturate(150%);
  animation:drift 32s ease-in-out infinite alternate;
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(115deg,rgba(0,255,214,.10),rgba(255,0,255,.13) 38%,rgba(255,0,128,.10) 68%,rgba(123,43,255,.14));
  background-size:300% 300%;
  mix-blend-mode:screen;
  animation:irid 26s ease-in-out infinite;
}
@keyframes drift{
  0%{transform:translate3d(-3%,-2%,0) scale(1.04)}
  100%{transform:translate3d(3%,3%,0) scale(1.16)}
}
@keyframes irid{
  0%{background-position:0% 50%;filter:hue-rotate(0deg)}
  50%{background-position:100% 50%;filter:hue-rotate(34deg)}
  100%{background-position:0% 50%;filter:hue-rotate(0deg)}
}
a{color:#ff9ad4}
:focus-visible{outline:2px solid var(--mag);outline-offset:3px;border-radius:10px}
[id]{scroll-margin-top:96px}

/* 顶栏 */
.masthead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1rem clamp(1rem,4vw,2.6rem);
}
.mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:46px;
  min-height:46px;
  padding:.25rem;
  border-radius:15px;
  background:linear-gradient(140deg,var(--pink),var(--mag));
  color:#fff;
  text-decoration:none;
  font-family:var(--serif);
  font-size:1.25rem;
  font-weight:700;
  box-shadow:0 8px 26px rgba(255,0,128,.42);
  transition:transform .28s ease,box-shadow .28s ease;
}
.mark:hover{transform:rotate(-4deg) scale(1.05);box-shadow:0 10px 32px rgba(255,0,255,.55)}
.mark img{display:block;width:28px;height:28px;border-radius:9px}
.find{
  display:flex;
  align-items:center;
  gap:.3rem;
  flex:1;
  max-width:400px;
  min-width:0;
  padding:.28rem .3rem .28rem 1rem;
  border-radius:999px;
  background:rgba(38,23,31,.62);
  backdrop-filter:blur(10px);
}
.find input{
  flex:1;
  min-width:0;
  border:0;
  background:none;
  color:var(--fg);
  font:inherit;
  font-size:1rem;
  padding:.55rem 0;
}
.find input::placeholder{color:#a98ea0}
.find input:focus{outline:none}
.find button{
  display:grid;
  place-items:center;
  min-width:42px;
  min-height:42px;
  border:0;
  border-radius:999px;
  cursor:pointer;
  color:#fff;
  background:linear-gradient(140deg,var(--pink),var(--mag));
  transition:transform .2s ease;
}
.find button:hover{transform:scale(1.06)}

/* 粘性锚点条 */
.anchors{
  position:sticky;
  top:0;
  z-index:30;
  background:rgba(16,10,14,.74);
  backdrop-filter:blur(14px);
  box-shadow:0 1px 0 rgba(255,255,255,.09);
}
.anchor-track{
  display:flex;
  gap:.15rem;
  margin:0;
  padding:.4rem clamp(.6rem,3vw,2rem);
  list-style:none;
  overflow-x:auto;
  scrollbar-width:none;
}
.anchor-track::-webkit-scrollbar{display:none}
.anchor-track li{flex:0 0 auto}
.anchor-track a{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.78rem .9rem;
  border-radius:999px;
  color:var(--dim);
  font-size:1rem;
  text-decoration:none;
  white-space:nowrap;
  transition:color .2s ease,background .2s ease;
}
.anchor-track a::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:2px;
  transform:rotate(45deg);
  background:linear-gradient(135deg,var(--pink),var(--mag));
  opacity:.6;
  transition:opacity .2s ease,transform .2s ease;
}
.anchor-track a:hover,
.anchor-track a.on{color:#fff;background:rgba(255,0,128,.18)}
.anchor-track a:hover::before,
.anchor-track a.on::before{opacity:1;transform:rotate(45deg) scale(1.2)}

/* 首屏 */
.hero{
  min-height:100vh;
  min-height:100svh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:clamp(1.6rem,5vw,3rem);
  padding:clamp(2rem,7vw,5rem) clamp(1rem,5vw,3rem) clamp(2.4rem,7vw,4rem);
  text-align:center;
}
.hero-copy{max-width:22ch}
.hero-title{
  margin:0;
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(2.1rem,7.2vw,4.5rem);
  line-height:1.08;
  letter-spacing:.005em;
  background:linear-gradient(118deg,#ffffff 8%,#ffd9ee 42%,#ff8ad0 68%,#ffffff 96%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-wrap:balance;
}
.hero-figure{
  width:min(100%,860px);
  border-radius:var(--r);
  overflow:hidden;
  background:rgba(38,23,31,.6);
  box-shadow:0 26px 70px rgba(0,0,0,.42);
  will-change:transform;
}
.hero-figure img{display:block;width:100%;height:auto}

/* 主体骨架 */
.frame{
  display:grid;
  grid-template-columns:minmax(0,252px) minmax(0,1fr);
  align-items:start;
  gap:clamp(1.2rem,4vw,3rem);
  max-width:1240px;
  margin:0 auto;
  padding:0 clamp(1rem,5vw,3rem) 5rem;
}

/* 左栏 */
.rail{
  position:sticky;
  top:78px;
  padding:1.5rem 1.15rem;
  border-radius:var(--r);
  background:var(--card);
  backdrop-filter:blur(8px);
}
.rail small{
  display:block;
  margin-bottom:.45rem;
  font-size:.78rem;
  letter-spacing:.32em;
  color:var(--mag);
}
.rail h2{
  margin:0 0 1rem;
  font-family:var(--serif);
  font-size:1.4rem;
  font-weight:600;
  line-height:1.25;
}
.rail-list{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:r;
}
.rail-list li{counter-increment:r}
.rail-list a{
  display:flex;
  align-items:baseline;
  gap:.6rem;
  min-height:42px;
  padding:.55rem .5rem;
  border-radius:14px;
  color:var(--dim);
  font-size:1rem;
  line-height:1.4;
  text-decoration:none;
  transition:color .2s ease,background .2s ease,transform .2s ease;
}
.rail-list a::before{
  content:counter(r,decimal-leading-zero);
  font-family:var(--serif);
  font-size:.86rem;
  color:var(--pink);
  opacity:.85;
}
.rail-list a:hover{color:#fff;background:rgba(255,0,128,.15);transform:translateX(3px)}

/* 正文 */
.prose{min-width:0;max-width:72ch}
.prose section{
  margin-bottom:clamp(1.2rem,3vw,2rem);
  padding:clamp(1.4rem,4vw,2.6rem);
  border-radius:var(--r);
  background:var(--card);
  backdrop-filter:blur(4px);
  transition:box-shadow .4s ease;
}
.prose section.flash{box-shadow:0 0 0 3px rgba(255,0,128,.72)}
.prose section > small{
  display:block;
  margin-bottom:.55rem;
  font-size:.78rem;
  letter-spacing:.3em;
  color:var(--mag);
}
.prose h2{
  margin:0 0 1rem;
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(1.6rem,3.8vw,2.35rem);
  line-height:1.2;
}
.prose h3{
  margin:1.9rem 0 .6rem;
  font-family:var(--serif);
  font-weight:600;
  font-size:1.3rem;
  line-height:1.35;
  color:#ffd9ec;
}
.prose h4{margin:1.4rem 0 .5rem;font-size:1.05rem;color:#ffd9ec}
.prose p{margin:0 0 1.05rem}
.prose ul,.prose ol{margin:0 0 1.1rem;padding-left:1.35rem}
.prose li{margin:.4rem 0}
.prose a{color:#ff9ad4;text-underline-offset:3px}
.prose a:hover{color:#fff}
.prose strong{color:#fff}
.prose img{max-width:100%;height:auto;border-radius:18px;display:block;margin:1.2rem 0}
.prose blockquote{
  margin:1.4rem 0;
  padding:.9rem 1.2rem;
  border-radius:18px;
  background:rgba(255,0,128,.12);
  color:#ffe4f2;
}
.prose blockquote p:last-child{margin:0}
.prose table{width:100%;border-collapse:collapse;font-size:.98rem;margin:1.2rem 0}
.prose th,.prose td{padding:.65rem .55rem;text-align:left;border-bottom:1px solid rgba(255,255,255,.12)}
.prose th{color:#ffd9ec;font-weight:700}
.prose code{
  font-size:.93em;
  padding:.1em .38em;
  border-radius:6px;
  background:rgba(255,255,255,.12);
}
.prose pre{
  overflow-x:auto;
  padding:1rem;
  border-radius:16px;
  background:rgba(0,0,0,.42);
}
.prose pre code{background:none;padding:0}

/* 页脚 */
.foot{
  margin-top:2rem;
  padding:clamp(2rem,6vw,4rem) clamp(1rem,5vw,3rem) 2.6rem;
  background:linear-gradient(180deg,rgba(38,23,31,.42),rgba(16,10,14,.94));
  backdrop-filter:blur(8px);
  box-shadow:0 -1px 0 rgba(255,255,255,.08);
}
.foot-top{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:space-between;
  gap:2rem;
  max-width:1240px;
  margin:0 auto;
}
.foot-brand{flex:1 1 320px;min-width:0}
.foot-huge{
  margin:0;
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(2.4rem,10vw,5.4rem);
  line-height:1;
  word-break:break-word;
  background:linear-gradient(100deg,var(--pink),var(--mag) 45%,var(--violet));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.foot-nav{flex:1 1 300px;min-width:0}
.foot-nav dl{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,auto);
  gap:.1rem 1rem;
  align-items:center;
  margin:0;
}
.foot-nav dt{
  margin:0;
  font-size:1rem;
  color:var(--dim);
  overflow-wrap:anywhere;
}
.foot-nav dd{margin:0}
.foot-nav dd a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:.25rem .7rem;
  border-radius:999px;
  color:#ffa8d8;
  font-size:1rem;
  text-decoration:none;
  transition:background .2s ease,color .2s ease;
}
.foot-nav dd a:hover{background:rgba(255,0,128,.2);color:#fff}
.foot-copy{
  max-width:1240px;
  margin:2.4rem auto 0;
  text-align:center;
  font-size:.95rem;
  color:var(--dim);
}

/* 回到顶部 */
.totop{
  position:fixed;
  right:1rem;
  bottom:1rem;
  z-index:40;
  min-height:46px;
  padding:.6rem 1.05rem;
  border:0;
  border-radius:999px;
  cursor:pointer;
  font:inherit;
  font-size:.95rem;
  color:#fff;
  background:linear-gradient(140deg,var(--pink),var(--mag));
  box-shadow:0 10px 28px rgba(255,0,128,.45);
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .3s ease,transform .3s ease;
}
.totop.on{opacity:1;pointer-events:auto;transform:translateY(0)}

/* 响应式 */
@media (max-width:900px){
  .frame{grid-template-columns:minmax(0,1fr)}
  .rail{position:static}
  .prose{max-width:none}
}
@media (max-width:640px){
  .hero{min-height:auto;padding-top:2.2rem;padding-bottom:2.6rem}
  .hero-copy{max-width:none}
  .foot-nav dl{grid-template-columns:minmax(0,1fr) minmax(0,auto)}
  .foot-copy{margin-top:1.8rem}
}
@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}
