/* 蜜汁樱桃 · 夜色书卷 */
:root{
  --void:#000000;
  --coal:#121212;
  --slate:#171717;
  --line:#1e1e1e;
  --txt:#e9e6e1;
  --body:#d7d2ca;
  --dim:#a09b93;
  --mute:#6d6a65;
  --gold:#e8c98a;
  --blue:#7fa6d8;
  --radius:18px;
  --ui:system-ui,-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --serif:"Libre Baskerville",Georgia,"Songti SC","Noto Serif SC",serif;
  --display:"Cormorant Garamond","Songti SC",Georgia,serif;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;color-scheme:dark}
body{
  margin:0;
  background:var(--void);
  color:var(--txt);
  font-family:var(--serif);
  font-size:17px;
  line-height:1.85;
  letter-spacing:.012em;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:6px}
::selection{background:rgba(232,201,138,.28);color:#fff}

/* 顶栏 */
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  padding:14px clamp(16px,4vw,44px);
  border-bottom:1px solid #131313;
  background:linear-gradient(180deg,#050505,#000);
}
.brand{
  font-family:var(--display);
  font-size:1.55rem;
  font-weight:600;
  letter-spacing:.2em;
  color:#fff;
  text-decoration:none;
  padding:10px 4px 10px 0;
  text-shadow:0 0 16px rgba(232,201,138,.22);
}
.brand:hover{text-shadow:0 0 26px rgba(232,201,138,.5)}
.topnav ul{list-style:none;display:flex;flex-wrap:wrap;gap:1px;margin:0;padding:0}
.topnav a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:10px 12px;
  font-family:var(--ui);
  font-size:.88rem;
  letter-spacing:.05em;
  color:#c4bfb7;
  text-decoration:none;
  border-radius:999px;
  transition:color .25s ease,background .25s ease;
}
.topnav a:hover,.topnav a:focus-visible{color:#fff;background:rgba(255,255,255,.06)}
.ico{
  width:6px;height:6px;border-radius:50%;
  background:var(--gold);
  box-shadow:0 0 8px rgba(232,201,138,.85);
  flex:0 0 auto;
  transition:transform .3s ease;
}
a:hover .ico{transform:scale(1.7)}
.bar{
  position:sticky;top:0;z-index:40;
  background:rgba(0,0,0,.84);
  border-bottom:1px solid #141414;
  backdrop-filter:blur(14px) saturate(130%);
  -webkit-backdrop-filter:blur(14px) saturate(130%);
}
.bar-in{
  display:flex;
  gap:2px;
  overflow-x:auto;
  scrollbar-width:none;
  padding:5px clamp(12px,4vw,44px);
}
.bar-in::-webkit-scrollbar{display:none}
.bar a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:44px;
  padding:8px 13px;
  white-space:nowrap;
  font-family:var(--ui);
  font-size:.84rem;
  letter-spacing:.05em;
  color:#9b968e;
  text-decoration:none;
  border-radius:999px;
  transition:color .25s ease,background .25s ease;
}
.bar a:hover{color:#fff;background:rgba(255,255,255,.07)}
.bar a[aria-current="true"]{color:#000;background:var(--gold);box-shadow:0 0 16px rgba(232,201,138,.4)}
.bar a[aria-current="true"] .ico{background:#000;box-shadow:none}

/* 首屏 */
.hero{
  position:relative;
  min-height:70vh;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  overflow:hidden;
  margin-bottom:clamp(30px,5vw,64px);
  background:radial-gradient(130% 100% at 82% 6%,#141417 0%,#08080a 46%,#000 78%);
  border-bottom-left-radius:50% 68px;
  border-bottom-right-radius:50% 68px;
}
.hero-fig{position:absolute;inset:0;margin:0}
.hero-img{
  width:100%;height:100%;
  object-fit:cover;
  filter:brightness(.6) saturate(.86);
  animation:drift 28s ease-in-out infinite alternate;
}
@keyframes drift{
  from{transform:scale(1.05) translate3d(0,0,0)}
  to{transform:scale(1.14) translate3d(-1.6%,-1.4%,0)}
}
.hero::after{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(196deg,rgba(0,0,0,.24) 0%,rgba(0,0,0,.62) 46%,rgba(0,0,0,.95) 100%);
  pointer-events:none;
}
.hero-txt{
  position:relative;z-index:2;
  margin-left:auto;
  max-width:min(760px,100%);
  text-align:right;
  padding:0 clamp(20px,5vw,60px) clamp(38px,7vw,80px);
}
.hero h1{
  margin:0 0 .5em;
  font-family:var(--display);
  font-weight:600;
  font-size:clamp(2.1rem,6.2vw,4.5rem);
  line-height:1.06;
  letter-spacing:.02em;
  color:#fff;
  text-shadow:0 0 30px rgba(232,201,138,.2);
}
.lede{
  margin:0 0 0 auto;
  max-width:44ch;
  font-size:1rem;
  line-height:1.8;
  color:#c5c0b8;
}

/* 主体骨架：左侧目录 + 右侧正文 */
.shell{
  display:grid;
  grid-template-columns:246px minmax(0,1fr);
  gap:clamp(20px,4vw,52px);
  align-items:start;
  max-width:1180px;
  margin:0 auto;
  padding:0 clamp(16px,4vw,44px) clamp(48px,8vw,96px);
}
main{display:block}

aside{
  position:sticky;
  top:76px;
  padding:18px 16px 20px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:var(--radius);
  background:linear-gradient(180deg,rgba(18,18,18,.9),rgba(8,8,8,.88));
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  box-shadow:0 22px 50px -30px rgba(0,0,0,.9),inset 0 1px 0 rgba(255,255,255,.05);
}
aside h2{
  margin:0 0 12px;
  font-family:var(--ui);
  font-size:.76rem;
  font-weight:500;
  letter-spacing:.24em;
  color:#8d8880;
}
.hd{display:inline-flex;align-items:center;gap:8px}
.dot{
  width:7px;height:7px;border-radius:50%;
  background:var(--gold);
  box-shadow:0 0 10px rgba(232,201,138,.9);
  flex:0 0 auto;
}
.toc{list-style:none;margin:0;padding:0;display:grid;gap:1px}
.toc a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:4px 9px;
  border-radius:10px;
  font-size:.94rem;
  line-height:1.5;
  color:#b3aea6;
  text-decoration:none;
  transition:background .25s ease,color .25s ease,transform .25s ease;
}
.toc a:hover,.toc a:focus-visible{background:rgba(255,255,255,.06);color:#fff;transform:translateX(3px)}
.num{
  font-family:var(--ui);
  font-size:.7rem;
  letter-spacing:.12em;
  color:#66625b;
}

/* 正文 */
.doc{min-width:0}
.doc>article{
  padding:clamp(26px,4vw,44px) 0;
  border-top:1px solid var(--slate);
  scroll-margin-top:78px;
}
.doc>article:first-child{border-top:0;padding-top:0}
.doc h2,.doc h3{font-family:var(--display);color:#fff;line-height:1.25;letter-spacing:.015em}
.doc h2{margin:0 0 .65em;font-size:clamp(1.5rem,3vw,2.05rem);font-weight:600}
.doc h2>span{display:inline-flex;align-items:baseline;gap:.6em}
.doc h2>span::before{
  content:"";
  align-self:center;
  width:26px;height:1px;flex:0 0 auto;
  background:linear-gradient(90deg,rgba(232,201,138,0),var(--gold));
}
.doc h3{margin:1.6em 0 .5em;font-size:1.24rem;color:var(--gold);font-weight:600}
.doc h3>span{display:inline}
.doc p{margin:0 0 1.05em;color:var(--body)}
.doc ul,.doc ol{margin:0 0 1.1em;padding-left:1.25em;color:var(--body)}
.doc li{margin:.3em 0}
.doc a{
  color:var(--gold);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
  text-decoration-color:rgba(232,201,138,.4);
  transition:color .2s ease,text-decoration-color .2s ease;
}
.doc a:hover{color:#fff;text-decoration-color:#fff}
.doc strong{color:#fff}
.doc hr{border:0;border-top:1px solid var(--slate);margin:2em 0}
.doc figure{
  margin:1.5em 0;
  padding:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--radius);
  background:rgba(255,255,255,.03);
}
.doc figure img{width:100%}
.doc blockquote{
  margin:1.4em 0;
  padding:16px 20px;
  border-left:2px solid var(--gold);
  border-radius:0 var(--radius) var(--radius) 0;
  background:rgba(232,201,138,.055);
  color:#ded9d1;
}
.doc blockquote p:last-child{margin-bottom:0}
.doc table{width:100%;border-collapse:collapse;display:block;overflow-x:auto;margin:1.3em 0;font-size:.96rem}
.doc th,.doc td{border:1px solid var(--slate);padding:9px 12px;text-align:left;vertical-align:top}
.doc th{background:rgba(255,255,255,.04);color:#fff;font-family:var(--ui);font-size:.85rem;letter-spacing:.04em}
.doc aside{
  position:static;
  margin:1.3em 0;
  border-radius:var(--radius);
}

/* 页脚 */
footer{
  border-top:1px solid #161616;
  background:linear-gradient(180deg,#060606,#000 62%);
  padding:clamp(36px,6vw,76px) clamp(16px,4vw,44px) 26px;
}
.f-top{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:clamp(24px,5vw,68px);
  max-width:1180px;
  margin:0 auto;
}
.f-brand .big{
  margin:0;
  font-family:var(--display);
  font-weight:600;
  font-size:clamp(3rem,11vw,7rem);
  line-height:.9;
  letter-spacing:.04em;
  color:#fff;
  text-shadow:0 0 44px rgba(232,201,138,.16);
}
address{
  font-style:normal;
  display:block;
  margin-top:18px;
  max-width:38ch;
  font-size:.94rem;
  line-height:1.8;
  color:var(--dim);
}
.f-links h2{
  margin:0 0 12px;
  font-family:var(--ui);
  font-size:.76rem;
  font-weight:500;
  letter-spacing:.24em;
  color:#8d8880;
}
.f-links h2.mt{margin-top:26px}
footer dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:0 14px;margin:0}
footer dt{
  font-family:var(--ui);
  font-size:.72rem;
  letter-spacing:.14em;
  color:#57544f;
  padding-top:.85em;
}
footer dd{margin:0;min-width:0}
footer nav a,footer ul a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:2px 0;
  color:#c6c1b9;
  text-decoration:none;
  font-size:.95rem;
  line-height:1.5;
  border-bottom:1px solid transparent;
  transition:color .2s ease,border-color .2s ease;
}
footer nav a:hover,footer ul a:hover{color:var(--gold);border-bottom-color:rgba(232,201,138,.55)}
.f-links ul{list-style:none;display:flex;flex-wrap:wrap;gap:0 20px;margin:0;padding:0}
.f-bottom{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:8px 20px;
  max-width:1180px;
  margin:34px auto 0;
  padding-top:16px;
  border-top:1px solid #141414;
  font-family:var(--ui);
  font-size:.78rem;
  letter-spacing:.06em;
  color:var(--mute);
}
.f-bottom p{margin:0}

/* 回到顶部 */
.to-top{
  position:fixed;
  right:16px;bottom:16px;z-index:50;
  min-height:44px;
  padding:0 18px;
  border:1px solid rgba(232,201,138,.4);
  border-radius:999px;
  background:rgba(0,0,0,.78);
  color:var(--gold);
  font-family:var(--ui);
  font-size:.84rem;
  letter-spacing:.08em;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transition:opacity .3s ease,transform .3s ease,background .25s ease;
}
.to-top.on{opacity:1;pointer-events:auto;transform:translateY(0)}
.to-top:hover{background:rgba(232,201,138,.14)}

@media (max-width:900px){
  .shell{grid-template-columns:minmax(0,1fr)}
  aside{position:static;order:-1;margin-bottom:8px}
  .hero{min-height:62vh}
  .f-top{grid-template-columns:minmax(0,1fr)}
  .f-brand .big{font-size:clamp(2.6rem,14vw,4.4rem)}
}
@media (max-width:620px){
  body{font-size:16px}
  .top{gap:10px;padding:10px 16px}
  .topnav ul{gap:0}
  .topnav a{min-height:42px;padding:8px 9px;font-size:.82rem}
  .hero{border-bottom-left-radius:50% 40px;border-bottom-right-radius:50% 40px}
  .hero-txt{text-align:left;padding:0 18px 44px}
  .lede{margin-left:0}
  .shell{padding-bottom:56px}
  .doc h2>span::before{width:18px}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
}

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