@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital@1&display=swap');

:root{
  --ink:#261717;
  --verm:#ff0000;
  --rose:#ff1493;
  --paper:#120a0b;
  --fg:#fff3f5;
  --dim:#cfb8bd;
  --line:rgba(255,243,245,.16);
  --line-2:rgba(255,243,245,.32);
  --r:18px;
}

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

html{
  background:var(--paper);
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
  scrollbar-color:var(--rose) var(--paper);
}

body{
  margin:0;
  position:relative;
  min-height:100%;
  color:var(--fg);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.68;
  padding-bottom:100px;
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:-30% -20%;
  z-index:-1;
  pointer-events:none;
  background-image:
    repeating-linear-gradient(0deg,rgba(255,243,245,.05) 0 1px,transparent 1px 68px),
    repeating-linear-gradient(90deg,rgba(255,243,245,.05) 0 1px,transparent 1px 68px),
    radial-gradient(46% 42% at 12% 8%,rgba(255,0,0,.5),transparent 62%),
    radial-gradient(38% 36% at 88% 20%,rgba(255,20,147,.45),transparent 66%),
    radial-gradient(62% 55% at 45% 96%,rgba(255,20,147,.26),transparent 74%),
    conic-gradient(from 210deg at 62% 48%,#1b0d11,#2c1019,#150a0d,#1b0d11);
  background-size:auto,auto,180% 180%,180% 180%,200% 200%,200% 200%;
  background-repeat:repeat,repeat,no-repeat,no-repeat,no-repeat,no-repeat;
  filter:saturate(1.2);
  animation:aurora 11s ease-in-out infinite alternate;
}

@keyframes aurora{
  0%{background-position:0 0,0 0,0% 20%,100% 12%,50% 100%,0 0}
  50%{background-position:0 0,0 0,26% 56%,72% 42%,42% 74%,0 0}
  100%{background-position:0 0,0 0,56% 14%,32% 72%,68% 46%,0 0}
}

img{max-width:100%}
a{color:var(--fg)}

:focus-visible{outline:2px solid var(--rose);outline-offset:3px;border-radius:6px}

/* 底部固定条 */
.dok{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:30;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px));
  background:rgba(14,8,9,.86);
  backdrop-filter:blur(16px) saturate(1.4);
  -webkit-backdrop-filter:blur(16px) saturate(1.4);
  border-top:1px solid var(--line);
}

.dok-mark{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:4px 4px;
  color:var(--fg);
  text-decoration:none;
  font-weight:800;
  font-size:16px;
  letter-spacing:.02em;
}
.dok-mark:hover .mark-txt{background-position:0 0}
.mark-img{width:28px;height:28px;border-radius:9px;object-fit:cover;border:1px solid var(--line-2)}
.mark-txt{
  background:linear-gradient(96deg,#fff,var(--rose) 55%,var(--verm));
  background-size:200% 100%;
  -webkit-background-clip:text;background-clip:text;color:transparent;
  transition:background-position .5s ease;
}

.dok-nav{
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
}
.dok-nav::-webkit-scrollbar{display:none}
.dok-nav p{display:flex;gap:2px;margin:0;white-space:nowrap}
.dok-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 11px;
  border-radius:999px;
  font-size:16px;
  color:var(--dim);
  text-decoration:none;
  transition:color .25s ease,background .25s ease;
}
.dok-nav a.is-on{color:#fff;background:linear-gradient(120deg,rgba(255,0,0,.5),rgba(255,20,147,.55))}

/* 主区 */
.stage{display:block}
.sheet{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:22px;
  max-width:1160px;
  margin:0 auto;
  padding:20px 16px 40px;
}

/* 侧栏 */
.rail{
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:10px 12px;
  background:linear-gradient(160deg,rgba(255,243,245,.07),rgba(255,243,245,.02));
  min-width:0;
}
.rail-title{
  margin:0 0 8px;
  font-size:16px;
  font-weight:700;
  letter-spacing:.16em;
  color:var(--rose);
}
.rail-title>span{color:#ffb3d4}
.rail p{
  display:flex;
  flex-direction:row;
  gap:6px;
  margin:0;
  overflow-x:auto;
  white-space:nowrap;
  scrollbar-width:none;
}
.rail p::-webkit-scrollbar{display:none}
.rail a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:16px;
  color:var(--dim);
  text-decoration:none;
  transition:color .25s ease,border-color .25s ease,background .25s ease;
}
.rail a.is-on{color:#fff;border-color:var(--rose);background:rgba(255,20,147,.16)}

/* 正文区 */
.hub{min-width:0}

.hero{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:12px;
  min-height:45vh;
  padding:26px 0 6px;
}
.badge{
  position:absolute;
  top:6px;left:0;
  margin:0;
  padding:5px 14px;
  border:1px solid var(--line-2);
  border-radius:999px;
  font-size:16px;
  line-height:1.4;
  letter-spacing:.08em;
  color:#ffd7e6;
  background:rgba(255,20,147,.14);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.hero h1{
  margin:0;
  font-family:'Playfair Display',Georgia,'Songti SC',serif;
  font-style:italic;
  font-weight:400;
  font-size:clamp(34px,7.2vw,64px);
  line-height:1.05;
  letter-spacing:-.01em;
  text-shadow:0 0 44px rgba(255,0,0,.35);
}
.dek{
  margin:0;
  max-width:52ch;
  font-size:18px;
  line-height:1.6;
  color:var(--dim);
}
.hero-fig{margin:14px 0 0}
.hero-img{
  display:block;
  width:100%;
  height:auto;
  border:1px solid var(--line);
  border-radius:var(--r);
}

/* 正文内容卡片 */
.hub>div{
  margin:0 0 20px;
  padding:22px 18px;
  border:1px solid var(--line);
  border-radius:var(--r);
  background:linear-gradient(160deg,rgba(255,243,245,.06),rgba(255,243,245,.015));
  scroll-margin-top:20px;
  transition:border-color .3s ease,transform .3s ease;
}
.hub>div:first-of-type{margin-top:18px}

.hub h2,.hub h3{
  font-family:'Playfair Display',Georgia,'Songti SC',serif;
  font-style:italic;
  font-weight:400;
  line-height:1.25;
  letter-spacing:-.01em;
  margin:0 0 12px;
}
.hub h2{font-size:clamp(23px,3.6vw,32px)}
.hub h3{font-size:clamp(19px,2.6vw,24px)}
.hub h2>span,.hub h3>span{
  background:linear-gradient(96deg,#fff 10%,#ffb3d4 55%,var(--rose));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hub p,.hub li{max-width:70ch}
.hub p{margin:0 0 14px}
.hub p:last-child{margin-bottom:0}
.hub ul,.hub ol{margin:0 0 14px;padding-left:1.25em}
.hub li{margin:0 0 8px}
.hub a{color:#ffb3d4;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.hub a:hover{color:#fff}
.hub strong{color:#fff}
.hub blockquote{
  margin:0 0 14px;
  padding:6px 0 6px 16px;
  border-left:2px solid var(--rose);
  color:var(--dim)
}
.hub code,.hub pre{
  font-family:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:15px;
}
.hub pre{overflow-x:auto;padding:14px;border:1px solid var(--line);border-radius:14px}

/* 页脚 */
.base{
  border-top:1px solid var(--line);
  background:linear-gradient(180deg,rgba(12,7,8,.2),rgba(8,4,5,.7));
  padding:38px 16px 26px;
  display:grid;
  gap:26px;
  max-width:1160px;
  margin:0 auto;
}
.cta{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
}
.cta-title{
  margin:0;
  font-family:'Playfair Display',Georgia,'Songti SC',serif;
  font-style:italic;
  font-weight:400;
  font-size:clamp(28px,6vw,52px);
  line-height:1.08;
  background:linear-gradient(96deg,var(--verm),var(--rose) 62%,#ffc0da);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.cta-title>span{display:inline-block}
.cta-btn{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:10px 22px;
  border:1px solid var(--rose);
  border-radius:999px;
  color:#fff;
  font-size:16px;
  font-weight:600;
  text-decoration:none;
  transition:transform .25s ease,background .25s ease,box-shadow .25s ease;
}
.cols{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:20px;
}
.cols dl{margin:0;min-width:0}
.cols dt{
  font-size:16px;
  letter-spacing:.16em;
  color:#ff9dc6;
  margin:0 0 6px;
}
.cols dd{
  margin:0;
  font-size:16px;
  line-height:1.5;
  color:var(--dim);
  overflow-wrap:anywhere;
}
.cols dd a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--dim);
  text-decoration:none;
  transition:color .25s ease;
}
.copy{
  margin:0;
  font-size:16px;
  color:#a8917f;
  border-top:1px solid var(--line);
  padding-top:14px;
}

/* 入场 */
@media (prefers-reduced-motion: no-preference){
  .js .reveal{opacity:0;transform:translateY(18px);transition:opacity .65s ease,transform .65s cubic-bezier(.22,.68,0,1)}
  .js .reveal.in{opacity:1;transform:none}
  .hub>div{animation:rise .7s cubic-bezier(.22,.68,0,1) backwards}
  .hub>div:nth-of-type(1){animation-delay:.06s}
  .hub>div:nth-of-type(2){animation-delay:.12s}
  .hub>div:nth-of-type(3){animation-delay:.18s}
  .hub>div:nth-of-type(4){animation-delay:.24s}
  .hub>div:nth-of-type(5){animation-delay:.3s}
  .hub>div:nth-of-type(6){animation-delay:.36s}
  .hub>div:nth-of-type(7){animation-delay:.42s}
  .hub>div:nth-of-type(n+8){animation-delay:.48s}
  @keyframes rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
}

@media (hover:hover){
  .dok-nav a:hover,.rail a:hover{color:#fff;background:rgba(255,20,147,.16)}
  .hub>div:hover{border-color:var(--line-2);transform:translateY(-2px)}
  .cta-btn:hover{transform:translateY(-2px);background:rgba(255,20,147,.18);box-shadow:0 10px 26px rgba(255,20,147,.24)}
}

@media (min-width:720px){
  .cols{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
}

@media (min-width:900px){
  body{padding-bottom:104px;font-size:17px}
  .dok{padding:10px 26px calc(10px + env(safe-area-inset-bottom,0px))}
  .dok-nav p{white-space:normal;flex-wrap:wrap;gap:4px}
  .dok-nav a{font-size:16px;padding:6px 13px}
  .sheet{
    grid-template-columns:230px minmax(0,1fr);
    gap:44px;
    padding:38px 24px 56px;
  }
  .rail{
    position:sticky;
    top:26px;
    align-self:start;
    padding:16px;
  }
  .rail-title{margin-bottom:10px}
  .rail p{flex-direction:column;overflow:visible;white-space:normal;gap:2px}
  .rail a{border:0;border-bottom:1px dashed var(--line);border-radius:0;padding:8px 2px}
  .rail a.is-on{background:none;color:#fff;border-bottom-color:var(--rose)}
  .hero{min-height:45vh;padding-top:34px}
  .badge{top:10px}
  .hub>div{padding:28px 26px;scroll-margin-top:28px}
  .base{padding:48px 24px 30px}
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  body::before{animation:none}
}

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