:root{
  --red:#ff0000;
  --violet:#8b00ff;
  --ink:#261717;
  --paper:#f4ecec;
  --dim:#c9b8b8;
  --glass:rgba(255,255,255,.08);
  --glass-2:rgba(255,255,255,.14);
  --edge:rgba(255,255,255,.18);
  --serif:"Noto Serif JP","Songti SC","Hiragino Mincho ProN",serif;
  --sans:"Noto Sans JP",system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
}

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

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

body{
  margin:0;
  padding:32px 0 0 272px;
  background:var(--ink);
  color:var(--paper);
  font-family:var(--sans);
  font-size:17px;
  font-weight:300;
  line-height:1.85;
  letter-spacing:.01em;
  overflow-x:hidden;
  min-height:100vh;
}

body::before{
  content:"";
  position:fixed;
  inset:-12%;
  z-index:-2;
  background:
    radial-gradient(circle at 10% 5%,rgba(255,0,0,.46),transparent 40%),
    radial-gradient(circle at 88% 10%,rgba(139,0,255,.42),transparent 44%),
    radial-gradient(circle at 64% 90%,rgba(139,0,255,.3),transparent 52%),
    radial-gradient(circle at 16% 84%,rgba(255,0,0,.22),transparent 46%),
    var(--ink);
  filter:blur(20px);
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(38,23,23,.42),rgba(38,23,23,.9));
}

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

a{color:inherit;}

a:focus-visible,
button:focus-visible{
  outline:2px solid var(--red);
  outline-offset:3px;
}

/* 顶部细条 */
.strip{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:32px;
  z-index:80;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 16px;
  background:rgba(38,23,23,.78);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--edge);
}

.strip-dot{
  width:7px;
  height:7px;
  flex:none;
  border-radius:50%;
  background:var(--red);
  box-shadow:0 0 0 0 rgba(255,0,0,.6);
  animation:pulse 2.6s ease-out infinite;
}

@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(255,0,0,.55);}
  70%{box-shadow:0 0 0 10px rgba(255,0,0,0);}
  100%{box-shadow:0 0 0 0 rgba(255,0,0,0);}
}

.strip-text{
  margin:0;
  font-size:14px;
  line-height:1;
  letter-spacing:.12em;
  color:#f0dcdc;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 左侧竖排导航 */
.rail{
  position:fixed;
  top:32px;
  left:0;
  bottom:0;
  width:272px;
  z-index:70;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:22px 18px 28px;
  overflow-y:auto;
  background:rgba(255,255,255,.05);
  -webkit-backdrop-filter:blur(18px);
  backdrop-filter:blur(18px);
  border-right:1px solid var(--edge);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:48px;
  text-decoration:none;
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.14);
  padding-bottom:14px;
}

.brand-glyph{
  width:40px;
  height:40px;
  flex:none;
  display:grid;
  place-items:center;
  font-family:var(--serif);
  font-size:20px;
  color:#fff;
  background:rgba(255,0,0,.18);
  border:1px solid rgba(255,0,0,.72);
}

.brand-logo{
  width:40px;
  height:40px;
  flex:none;
  object-fit:cover;
  border:1px solid var(--edge);
}

.brand-name{
  font-family:var(--serif);
  font-size:19px;
  font-weight:600;
  line-height:1.35;
  letter-spacing:.06em;
}

.rail-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.rail-nav a{
  display:flex;
  align-items:center;
  gap:11px;
  min-height:44px;
  padding:9px 10px;
  text-decoration:none;
  color:var(--dim);
  font-size:16px;
  line-height:1.5;
  border-left:2px solid transparent;
  transition:color .2s ease,background .2s ease,border-color .2s ease;
}

.ic{
  width:7px;
  height:7px;
  flex:none;
  background:var(--violet);
  transform:rotate(45deg);
  transition:background .2s ease,transform .25s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible{
  color:#fff;
  background:rgba(255,255,255,.12);
  border-left-color:var(--red);
}

.rail-nav a:hover .ic{
  background:var(--red);
  transform:rotate(45deg) scale(1.5);
}

.rail-nav a.is-current{
  color:#fff;
  background:rgba(255,0,0,.16);
  border-left-color:var(--red);
}

.rail-nav a.is-current .ic{background:var(--red);}

/* 主体 */
main{
  max-width:1024px;
  margin:0 auto;
  padding:26px 22px 0;
}

.hero{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:26px;
  padding-top:14px;
  overflow:hidden;
}

.hero-ghost{
  position:absolute;
  top:0;
  right:-4px;
  writing-mode:vertical-rl;
  font-family:var(--serif);
  font-weight:700;
  font-size:clamp(52px,10vw,132px);
  line-height:1;
  letter-spacing:.08em;
  color:rgba(255,255,255,.075);
  text-shadow:0 0 34px rgba(139,0,255,.55);
  pointer-events:none;
  user-select:none;
  animation:drift 13s ease-in-out infinite alternate;
}

@keyframes drift{
  from{transform:translateY(-8px);}
  to{transform:translateY(14px);}
}

.hero-copy{
  position:relative;
  z-index:2;
  min-height:40vh;
  display:grid;
  place-items:center;
  text-align:center;
  padding:24px 8px;
}

.hero-copy h1{
  margin:0;
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(26px,4.6vw,50px);
  line-height:1.34;
  letter-spacing:.02em;
  color:#fff;
  text-shadow:0 2px 26px rgba(0,0,0,.6);
  max-width:22em;
}

.hero-copy h1::after{
  content:"";
  display:block;
  width:64px;
  height:2px;
  margin:20px auto 0;
  background:linear-gradient(90deg,var(--red),var(--violet));
}

.hero-fig{
  position:relative;
  margin:0;
  aspect-ratio:16/8;
  overflow:hidden;
  border-top:1px solid var(--edge);
  border-bottom:1px solid var(--edge);
  background:linear-gradient(120deg,rgba(255,0,0,.22),rgba(139,0,255,.22));
}

.hero-img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.hero-fallback{
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 28% 42%,rgba(255,0,0,.55),transparent 58%),
    radial-gradient(circle at 72% 58%,rgba(139,0,255,.55),transparent 58%);
}

/* 分栏：左侧栏 + 正文 */
.frame{
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
  padding-top:26px;
}

.side{
  align-self:start;
  padding:18px 18px 12px;
  background:var(--glass);
  -webkit-backdrop-filter:blur(15px);
  backdrop-filter:blur(15px);
  border:1px solid var(--edge);
  border-top:2px solid var(--red);
  box-shadow:0 18px 40px rgba(0,0,0,.4);
}

.side h2{
  margin:0 0 6px;
  font-family:var(--serif);
  font-size:19px;
  font-weight:600;
  line-height:1.45;
  letter-spacing:.04em;
  color:#fff;
}

.subtitle{
  margin:0 0 14px;
  font-size:14px;
  line-height:1.6;
  letter-spacing:.05em;
  color:#e6bcc8;
}

.side-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
}

.side-list a{
  display:flex;
  align-items:baseline;
  gap:10px;
  min-height:42px;
  padding:9px 4px;
  font-size:15px;
  line-height:1.6;
  text-decoration:none;
  color:var(--dim);
  border-bottom:1px dashed rgba(255,255,255,.13);
  transition:color .2s ease,padding-left .2s ease;
}

.s-num{
  font-family:var(--serif);
  font-size:12px;
  letter-spacing:.1em;
  color:var(--violet);
}

.side-list a:hover{
  color:#fff;
  padding-left:9px;
}

.side-list a.is-current{color:#fff;}

/* 正文 */
.prose{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.prose > div{
  padding:26px 22px;
  background:var(--glass);
  -webkit-backdrop-filter:blur(15px);
  backdrop-filter:blur(15px);
  border:1px solid var(--edge);
  box-shadow:0 22px 48px rgba(0,0,0,.42);
  scroll-margin-top:96px;
}

.prose > div:nth-child(even){
  background:rgba(139,0,255,.1);
}

.prose > div:first-child{
  border-top:2px solid var(--violet);
}

.prose h2{
  position:relative;
  margin:0 0 14px;
  padding-left:15px;
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(21px,2.9vw,29px);
  line-height:1.4;
  letter-spacing:.02em;
  color:#fff;
}

.prose h2::before{
  content:"";
  position:absolute;
  left:0;
  top:.4em;
  width:4px;
  height:1em;
  background:linear-gradient(180deg,var(--red),var(--violet));
}

.prose h3{
  margin:22px 0 10px;
  font-family:var(--serif);
  font-size:19px;
  line-height:1.5;
  color:#ffe9e9;
}

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

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

.prose a{
  color:#ff9d9d;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

.prose a:hover{color:#fff;}

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

.prose li{margin:0 0 7px;}

.prose strong{color:#fff;font-weight:500;}

.prose time{
  display:inline-block;
  margin:0 0 12px;
  padding-left:9px;
  font-size:14px;
  line-height:1.6;
  color:#dcc4c4;
  border-left:2px solid var(--violet);
}

.prose figure{margin:0 0 16px;}

.prose blockquote{
  margin:0 0 16px;
  padding:14px 16px;
  background:rgba(255,0,0,.1);
  border-left:2px solid var(--red);
}

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

/* 页脚 */
.foot{
  max-width:1024px;
  margin:48px auto 0;
  padding:0 22px 34px;
  display:flex;
  flex-direction:column;
  gap:22px;
}

.foot-head{
  padding-top:22px;
  border-top:1px solid var(--edge);
}

.foot-giant{
  margin:0;
  font-family:var(--serif);
  font-weight:700;
  font-size:clamp(34px,7.5vw,92px);
  line-height:1.08;
  letter-spacing:.02em;
  color:transparent;
  background:linear-gradient(100deg,#ffffff,rgba(255,0,0,.92) 46%,rgba(139,0,255,.95));
  -webkit-background-clip:text;
  background-clip:text;
}

.foot-nav{
  padding:18px;
  background:var(--glass);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  border:1px solid var(--edge);
}

.foot-nav dl{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:4px 16px;
  margin:0;
  align-items:center;
}

.foot-nav dt{
  font-size:14px;
  line-height:1.6;
  letter-spacing:.08em;
  color:#c8b1b1;
}

.foot-nav dd{margin:0;}

.foot-nav dd a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 2px;
  font-size:16px;
  text-decoration:none;
  color:#fff;
  border-bottom:1px solid transparent;
  transition:color .2s ease,border-color .2s ease;
}

.foot-nav dd a:hover{
  color:#ff9d9d;
  border-bottom-color:var(--red);
}

.foot-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding-top:16px;
  border-top:1px solid var(--edge);
}

.copy{
  margin:0;
  font-size:14px;
  line-height:1.6;
  letter-spacing:.06em;
  color:#bda9a9;
}

.totop{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 16px;
  font-size:15px;
  text-decoration:none;
  color:#fff;
  background:rgba(255,255,255,.07);
  border:1px solid var(--edge);
  transition:background .2s ease,border-color .2s ease;
}

.totop:hover{
  background:rgba(255,0,0,.26);
  border-color:var(--red);
}

/* 桌面增强 */
@media (min-width:901px){
  .frame{grid-template-columns:246px minmax(0,1fr);gap:26px;}
  .side{position:sticky;top:56px;}
  .prose > div{padding:32px 30px;}
}

@media (min-width:760px){
  .foot-nav dl{grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);gap:4px 22px;}
}

/* 移动端 */
@media (max-width:900px){
  body{padding:128px 0 0;}

  .strip{height:32px;}

  .rail{
    top:32px;
    right:0;
    bottom:auto;
    width:auto;
    padding:8px 12px 10px;
    gap:8px;
    border-right:0;
    border-bottom:1px solid var(--edge);
    overflow:visible;
  }

  .brand{
    min-height:44px;
    padding-bottom:8px;
    gap:10px;
  }

  .brand-glyph,
  .brand-logo{width:32px;height:32px;}

  .brand-name{font-size:17px;}

  .rail-nav ul{
    flex-direction:row;
    gap:6px;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:none;
  }

  .rail-nav ul::-webkit-scrollbar{display:none;}

  .rail-nav a{
    min-height:42px;
    padding:8px 12px;
    white-space:nowrap;
    border-left:0;
    border-bottom:2px solid transparent;
  }

  .rail-nav a:hover,
  .rail-nav a.is-current{border-bottom-color:var(--red);}

  main{padding:18px 16px 0;}

  .hero{gap:20px;padding-top:6px;}

  .hero-ghost{font-size:clamp(46px,16vw,86px);right:-2px;opacity:.9;}

  .hero-copy{min-height:34vh;padding:18px 4px;}

  .hero-copy h1::after{width:48px;margin-top:16px;}

  .hero-fig{aspect-ratio:16/10;}

  .frame{padding-top:18px;}

  .prose > div{padding:22px 17px;scroll-margin-top:142px;}

  .foot{padding:0 16px 30px;margin-top:36px;}
}

@media (max-width:400px){
  .strip-text{letter-spacing:.06em;}
  .prose > div{padding:20px 15px;}
}

/* 降低动效 */
@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}
