*{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  font-family:"Exo 2",system-ui,-apple-system,"Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.75;
  color:#26171a;
  background:
    radial-gradient(1100px 620px at 6% -8%,#ffe2e9 0%,rgba(255,226,233,0) 62%),
    radial-gradient(900px 560px at 102% 2%,#ffeef2 0%,rgba(255,238,242,0) 58%),
    linear-gradient(180deg,#fdf6f7 0%,#fbeef1 48%,#fdf7f8 100%);
  background-attachment:fixed;
  min-height:100vh;
}

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

h1,h2,h3{
  font-family:Orbitron,"Exo 2",system-ui,"Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color:#26171a;
}

a{color:#b8566e}

:focus-visible{
  outline:3px solid #eb879c;
  outline-offset:2px;
}

.skip{
  position:absolute;
  top:0;
  left:0;
  z-index:90;
  padding:10px 16px;
  min-height:44px;
  display:flex;
  align-items:center;
  background:#26171a;
  color:#ffe9ee;
  text-decoration:none;
  transform:translateY(-160%);
  transition:transform .2s ease;
}
.skip:focus{transform:none}

.site{
  display:grid;
  grid-template-columns:250px minmax(0,1fr);
  align-items:start;
}

/* ---------- 左侧竖排导航 ---------- */
.railbar{
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:20px 14px 18px;
  overflow-y:auto;
  z-index:40;
  color:#f3e2e7;
  background:linear-gradient(180deg,#2e1b20 0%,#26171a 62%);
  box-shadow:0 2px 4px rgba(38,23,26,.26),0 22px 44px -24px rgba(38,23,26,.62);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:4px 8px;
  text-decoration:none;
  border:1px solid rgba(255,182,193,.3);
  transition:background .24s ease,border-color .24s ease;
}
.brand:hover{background:rgba(255,182,193,.14);border-color:rgba(255,182,193,.6)}
.brand .mark{width:26px;height:26px;display:block;flex:0 0 26px}
.brand-txt{
  font-family:Orbitron,"Exo 2",system-ui,"Hiragino Sans GB",sans-serif;
  font-size:17px;
  font-weight:600;
  letter-spacing:.03em;
  color:#ffd9e2;
  line-height:1.3;
}

.rail-nav{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.rail-link{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:8px 10px;
  font-size:16px;
  line-height:1.4;
  color:#f3e2e7;
  text-decoration:none;
  border-left:2px solid transparent;
  animation:rise .3s ease both;
  transition:background .24s ease,color .24s ease,border-color .24s ease;
}
.rail-link .ico{
  width:16px;
  height:16px;
  flex:0 0 16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.4;
  opacity:.82;
}
.rail-link:hover,
.rail-link:focus-visible{
  background:rgba(255,182,193,.18);
  border-left-color:#ffb6c1;
  color:#fff;
}
.rail-link:nth-child(1){animation-delay:.02s}
.rail-link:nth-child(2){animation-delay:.05s}
.rail-link:nth-child(3){animation-delay:.08s}
.rail-link:nth-child(4){animation-delay:.11s}
.rail-link:nth-child(5){animation-delay:.14s}
.rail-link:nth-child(6){animation-delay:.17s}
.rail-link:nth-child(7){animation-delay:.2s}

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

.search{
  display:flex;
  gap:6px;
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid rgba(255,182,193,.24);
}
.search-in{
  flex:1 1 auto;
  min-width:0;
  min-height:42px;
  padding:8px 10px;
  font:inherit;
  font-size:16px;
  color:#fff;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,182,193,.32);
  border-radius:0;
}
.search-in::placeholder{color:#e8ccd4}
.search-btn{
  min-height:42px;
  padding:8px 13px;
  font:inherit;
  font-size:16px;
  font-weight:600;
  color:#26171a;
  background:#eb879c;
  border:0;
  border-radius:0;
  cursor:pointer;
  transition:background .24s ease;
}
.search-btn:hover{background:#ffb6c1}

/* ---------- 内容区 ---------- */
.frame{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:26px;
  max-width:1180px;
  margin:0 auto;
  padding:26px 32px 44px;
}

.side{
  position:sticky;
  top:26px;
  align-self:start;
  padding:16px 14px;
  background:rgba(255,255,255,.56);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:0 2px 4px rgba(38,23,26,.06),0 16px 32px -20px rgba(38,23,26,.4);
}
.side-small{
  display:block;
  font-size:16px;
  font-weight:600;
  letter-spacing:.2em;
  color:#b8566e;
}
.side-h{
  font-size:19px;
  line-height:1.4;
  margin:2px 0 4px;
}
.side-list{
  list-style:none;
  margin:8px 0 0;
  padding:0;
  counter-reset:none;
}
.side-list li{animation:rise .3s ease both}
.side-list li:nth-child(1){animation-delay:.04s}
.side-list li:nth-child(2){animation-delay:.07s}
.side-list li:nth-child(3){animation-delay:.1s}
.side-list li:nth-child(4){animation-delay:.13s}
.side-list li:nth-child(5){animation-delay:.16s}
.side-list li:nth-child(6){animation-delay:.19s}
.side-list li:nth-child(7){animation-delay:.22s}
.side-list a{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:4px 6px;
  font-size:16px;
  line-height:1.4;
  color:#26171a;
  text-decoration:none;
  border-bottom:1px solid rgba(38,23,26,.08);
  transition:background .22s ease,color .22s ease;
}
.side-list a:hover{background:rgba(255,182,193,.28);color:#8f3b52}
.side-list .num{
  font-family:Orbitron,"Exo 2",system-ui,sans-serif;
  font-size:16px;
  color:#b8566e;
}

.main{min-width:0}
.post{display:block;margin:0}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:flex-end;
  min-height:45vh;
  padding:26px 24px 52px;
  color:#fff;
  background:linear-gradient(142deg,#ffd7e0 0%,#eb879c 56%,#b2586e 100%);
  clip-path:polygon(0 0,100% 0,100% calc(100% - 58px),0 100%);
  box-shadow:0 2px 4px rgba(38,23,26,.1),0 26px 50px -28px rgba(38,23,26,.55);
}
.hero-media{
  position:absolute;
  inset:0;
  overflow:hidden;
  z-index:0;
}
.hero-media img{
  position:absolute;
  top:-110px;
  left:0;
  width:100%;
  height:calc(100% + 110px);
  object-fit:cover;
  display:block;
  will-change:transform;
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(96deg,rgba(38,23,26,.78) 0%,rgba(38,23,26,.34) 54%,rgba(38,23,26,.08) 100%);
}
.hero-copy{
  position:relative;
  z-index:2;
  max-width:640px;
}
.hero-h1{
  margin:0 0 10px;
  font-size:clamp(27px,4.3vw,44px);
  line-height:1.24;
  letter-spacing:.01em;
  color:#fff;
  text-shadow:0 2px 12px rgba(38,23,26,.42);
}
.hero-lede{
  margin:0;
  max-width:56ch;
  font-size:17px;
  line-height:1.72;
  color:#ffeaf0;
  text-shadow:0 1px 8px rgba(38,23,26,.55);
}
.badge{
  position:absolute;
  top:16px;
  right:16px;
  z-index:3;
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:8px 14px;
  font-size:16px;
  font-weight:600;
  line-height:1.4;
  color:#26171a;
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:0 2px 4px rgba(38,23,26,.14),0 14px 26px -16px rgba(38,23,26,.6);
}
.badge .dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#eb879c;
  box-shadow:0 0 0 4px rgba(235,135,156,.32);
}

/* ---------- 正文 ---------- */
.prose{
  counter-reset:sec;
  display:grid;
  gap:18px;
  margin-top:24px;
}
.prose > div,
.prose [id]{scroll-margin-top:96px}

.prose > div{
  position:relative;
  counter-increment:sec;
  padding:22px 22px 24px;
  background:rgba(255,255,255,.62);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.9);
  border-left:3px solid #eb879c;
  box-shadow:0 2px 4px rgba(38,23,26,.05),0 20px 38px -26px rgba(38,23,26,.45);
}
.prose > div::before{
  content:counter(sec,decimal-leading-zero);
  position:absolute;
  top:0;
  right:0;
  padding:3px 10px;
  font-family:Orbitron,"Exo 2",system-ui,sans-serif;
  font-size:16px;
  letter-spacing:.1em;
  color:#b8566e;
  background:rgba(255,182,193,.3);
}
.prose h2{
  font-size:clamp(20px,2.4vw,26px);
  line-height:1.36;
  margin:0 0 12px;
  padding-right:56px;
}
.prose h3{
  font-size:19px;
  line-height:1.42;
  margin:20px 0 8px;
}
.prose small{
  display:block;
  margin:0 0 4px;
  font-size:16px;
  font-weight:600;
  letter-spacing:.18em;
  color:#b8566e;
}
.prose p{margin:0 0 14px}
.prose p:last-child{margin-bottom:0}
.prose ul,.prose ol{margin:0 0 14px;padding-left:22px}
.prose li{margin:0 0 8px}
.prose li:last-child{margin-bottom:0}
.prose a{color:#b8566e;text-underline-offset:3px}
.prose strong{color:#8f3b52}
.prose img{
  display:block;
  max-width:100%;
  height:auto;
  margin:14px 0;
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 2px 4px rgba(38,23,26,.08),0 16px 30px -22px rgba(38,23,26,.5);
}

.js .prose > div{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .28s ease,transform .28s ease;
}
.js .prose > div.in{opacity:1;transform:none}

/* ---------- 页脚 ---------- */
.foot{
  padding:36px 32px 26px;
  color:#f6e6ea;
  background:#26171a;
  box-shadow:0 -2px 4px rgba(38,23,26,.18);
}
.foot-mega{
  margin:0 0 24px;
  max-width:1180px;
  font-family:Orbitron,"Exo 2",system-ui,"Hiragino Sans GB",sans-serif;
  font-size:clamp(38px,11vw,130px);
  line-height:.92;
  letter-spacing:-.01em;
  color:rgba(255,182,193,.26);
  white-space:nowrap;
  overflow:hidden;
}
.foot-cols{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
  max-width:1000px;
  margin:0 auto;
}
.foot dl{margin:0}
.foot dt{
  font-size:16px;
  font-weight:600;
  letter-spacing:.18em;
  color:#ffb6c1;
  margin-bottom:8px;
}
.foot dd{margin:0 0 4px}
.foot dd a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:4px 0;
  font-size:16px;
  line-height:1.45;
  color:#f6e6ea;
  text-decoration:none;
  transition:color .22s ease;
}
.foot dd a:hover{color:#fff;text-decoration:underline;text-underline-offset:4px}
.foot-base{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin:24px 0 0;
  padding-top:16px;
  border-top:1px solid rgba(255,182,193,.26);
  font-size:16px;
  text-align:center;
  color:#e9d3da;
}
.totop{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:6px 16px;
  font-size:16px;
  color:#ffe9ee;
  text-decoration:none;
  border:1px solid rgba(255,182,193,.45);
  transition:background .22s ease,color .22s ease;
}
.totop:hover{background:#ffb6c1;color:#26171a}

/* ---------- 中等屏 ---------- */
@media (max-width:1100px){
  .frame{grid-template-columns:186px minmax(0,1fr);gap:20px;padding:22px 22px 40px}
  .side{padding:14px 12px}
}

/* ---------- 窄屏：导航转顶部横条 ---------- */
@media (max-width:900px){
  body{background-attachment:scroll}
  .site{grid-template-columns:minmax(0,1fr)}
  .railbar{
    position:sticky;
    top:0;
    height:auto;
    width:auto;
    padding:10px 12px 8px;
    gap:8px;
    overflow:visible;
    z-index:50;
  }
  .brand{min-height:44px;padding:2px 8px}
  .rail-nav{
    flex-direction:row;
    gap:4px;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:thin;
  }
  .rail-link{
    flex:0 0 auto;
    min-height:44px;
    padding:8px 12px;
    border-left:0;
    border-bottom:2px solid transparent;
    white-space:nowrap;
  }
  .rail-link:hover,
  .rail-link:focus-visible{border-left:0;border-bottom-color:#ffb6c1}
  .search{margin-top:0;padding-top:8px}
  .frame{grid-template-columns:minmax(0,1fr);gap:16px;padding:16px 16px 32px}
  .side{position:static;padding:12px}
  .side-h{font-size:18px}
  .side-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
  .side-list li{flex:0 0 auto}
  .side-list a{
    min-height:40px;
    padding:4px 10px;
    border:1px solid rgba(38,23,26,.12);
    background:rgba(255,255,255,.5);
    font-size:16px;
  }
  .hero{min-height:42vh;padding:20px 16px 44px;clip-path:polygon(0 0,100% 0,100% calc(100% - 34px),0 100%)}
  .hero-media img{top:-80px;height:calc(100% + 80px)}
  .badge{top:12px;right:12px;padding:6px 12px}
  .prose > div,
  .prose [id]{scroll-margin-top:158px}
  .prose > div{padding:18px 16px 20px}
  .prose h2{padding-right:44px}
  .foot{padding:28px 16px 22px}
  .foot-cols{grid-template-columns:minmax(0,1fr);gap:16px}
  .foot-mega{white-space:normal;margin-bottom:18px}
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .rail-link,.side-list li{animation:none}
  .js .prose > div{opacity:1;transform:none;transition:none}
  .hero-media img{will-change:auto}
}

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