:root{
  --violet:#8000ff;
  --magenta:#ff00ff;
  --ink:#0d0d0d;
  --text:#e9e3f6;
  --dim:#a294c0;
  --edge:rgba(128,0,255,.34);
  --hair:rgba(255,255,255,.12);
  --mono:'Quicksand','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  --hand:'Caveat','Quicksand','PingFang SC','Microsoft YaHei',cursive;
}
*,*::before,*::after{box-sizing:border-box}
html{
  scroll-behavior:smooth;
  background:var(--ink);
  -webkit-text-size-adjust:100%;
}
body{
  margin:0;
  min-height:100vh;
  overflow-x:hidden;
  font-family:var(--mono);
  font-size:17px;
  line-height:1.8;
  color:var(--text);
  padding-bottom:calc(88px + env(safe-area-inset-bottom));
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(255,0,255,.17), transparent 62%),
    radial-gradient(760px 500px at 2% 6%, rgba(128,0,255,.2), transparent 66%),
    var(--ink);
}
body::before{
  content:'';
  position:fixed;
  inset:0;
  z-index:70;
  pointer-events:none;
  opacity:.55;
  mix-blend-mode:screen;
  background:repeating-linear-gradient(180deg, rgba(255,255,255,.035) 0 1px, rgba(0,0,0,0) 1px 4px);
}
a{color:inherit}
:focus-visible{outline:2px solid var(--magenta); outline-offset:2px}

h1,h2,h3{font-family:var(--hand); font-weight:700; line-height:1.26; margin:0 0 12px}
h1{
  font-size:clamp(32px,7.4vw,60px);
  color:#fff;
  letter-spacing:.01em;
  text-shadow:0 0 18px rgba(255,0,255,.55), 0 0 46px rgba(128,0,255,.5);
  animation:glitch 7s steps(1) infinite;
}
@keyframes glitch{
  0%,90%,100%{transform:none}
  91%{transform:skewX(-2deg) translateX(-2px)}
  94%{transform:skewX(2deg) translateX(2px)}
  97%{transform:none}
}

/* 底部固定终端条 */
.strip{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:60;
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 12px calc(7px + env(safe-area-inset-bottom));
  background:rgba(8,8,14,.94);
  border-top:1px solid var(--edge);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}
.tag{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 8px;
  font-family:var(--hand);
  font-size:clamp(16px,3.6vw,23px);
  font-weight:700;
  color:#fff;
  white-space:nowrap;
  text-decoration:none;
  border:1px solid transparent;
  border-radius:10px;
  text-shadow:0 0 14px var(--magenta);
}
.tag:hover{border-color:var(--magenta)}
.rail{flex:1 1 auto; min-width:0; overflow-x:auto; scrollbar-width:none}
.rail::-webkit-scrollbar{display:none}
.rail p{display:flex; align-items:center; gap:6px; margin:0; padding:0; white-space:nowrap}
.rail a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 11px;
  font-size:16px;
  color:var(--dim);
  text-decoration:none;
  border:1px solid var(--hair);
  border-radius:10px;
  background:rgba(255,255,255,.02);
}
.rail a:hover,.rail a:focus-visible{
  color:#fff;
  border-color:var(--magenta);
  text-shadow:0 0 12px var(--magenta);
}
.ping{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 13px;
  font-size:16px;
  font-weight:600;
  color:#0d0d0d;
  text-decoration:none;
  border-radius:10px;
  background:linear-gradient(120deg,var(--violet),var(--magenta));
}

/* 首屏 */
.hero{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  min-height:70vh;
  padding:14vh 6vw 9vh;
  border-bottom:1px solid var(--edge);
}
.hero::before{
  content:'';
  position:absolute;
  inset:0;
  z-index:-2;
  opacity:.5;
  background-image:
    linear-gradient(rgba(128,0,255,.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128,0,255,.2) 1px, transparent 1px);
  background-size:54px 54px;
}
.shots{position:absolute; inset:0; z-index:-1}
.shots img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover}
.shots .shot{opacity:0; animation:shotCycle 21s linear infinite}
.shots .shot:nth-child(1){animation-delay:0s; opacity:1}
.shots .shot:nth-child(2){animation-delay:7s}
.shots .shot:nth-child(3){animation-delay:14s}
.shots .shot:only-child{animation:none; opacity:1}
@keyframes shotCycle{
  0%{opacity:0}
  5%{opacity:1}
  28%{opacity:1}
  33%{opacity:0}
  100%{opacity:0}
}
.veil{
  position:absolute;
  inset:0;
  z-index:0;
  background:
    linear-gradient(240deg, rgba(13,13,13,.4), rgba(13,13,13,.92) 74%),
    linear-gradient(0deg, #0d0d0d, rgba(13,13,13,0) 46%);
}
.copy{position:relative; z-index:1; max-width:44ch; text-align:right}
.dek{margin:0; color:var(--dim); font-size:17px}

/* 主体 */
.deck{
  max-width:1200px;
  margin:0 auto;
  padding:44px 6vw 76px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 282px;
  gap:34px;
  align-items:start;
}
.prose{min-width:0}
.prose article{
  padding:30px 0;
  border-bottom:1px dashed rgba(255,255,255,.09);
  scroll-margin-top:24px;
}
.prose article:last-child{border-bottom:0}
.prose h2{
  margin-top:6px;
  font-size:clamp(23px,3.6vw,32px);
  color:#fff;
  text-shadow:0 0 16px rgba(128,0,255,.6);
}
.prose h3{font-size:clamp(19px,2.8vw,24px); color:#f4ebff}
hr{
  border:0;
  height:1px;
  margin:12px 0 20px;
  background:linear-gradient(90deg,var(--magenta),rgba(128,0,255,.45) 42%, transparent);
}
.prose p{margin:0 0 16px}
.prose ul,.prose ol{margin:0 0 16px; padding-left:22px}
.prose li{margin-bottom:8px}
.prose a{color:#e5b3ff; text-underline-offset:3px}
.prose strong{color:#fff}
.prose blockquote{
  margin:0 0 18px;
  padding:12px 16px;
  border-left:2px solid var(--magenta);
  border-radius:0 10px 10px 0;
  background:rgba(255,0,255,.07);
}
.prose img{max-width:100%; height:auto; border:1px solid var(--edge); border-radius:10px}

/* 右侧栏 */
.side{
  position:sticky;
  top:24px;
  padding:18px;
  border:1px solid var(--edge);
  border-radius:10px;
  background:rgba(128,0,255,.08);
}
.side h2{margin:0 0 10px; font-size:24px; color:#fff; text-shadow:0 0 12px var(--magenta)}
.side hr{margin:0 0 14px}
.side ul{list-style:none; margin:0; padding:0; display:grid; gap:8px}
.side li a{
  display:flex;
  align-items:center;
  padding:10px 12px;
  min-height:44px;
  font-size:16px;
  line-height:1.5;
  color:var(--dim);
  text-decoration:none;
  border:1px solid var(--hair);
  border-radius:10px;
}
.side li a:hover,.side li a:focus-visible{
  color:#fff;
  border-color:var(--magenta);
  text-shadow:0 0 10px var(--magenta);
}

/* 页脚 */
.base{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:26px 6vw;
  font-size:16px;
  border-top:1px solid var(--edge);
  background:rgba(8,8,14,.72);
}
.base p{margin:0}
.base .mark{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-family:var(--hand);
  font-size:24px;
  font-weight:700;
  color:#fff;
  text-decoration:none;
  text-shadow:0 0 12px var(--violet);
}
.base small{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:44px;
  font-size:16px;
  color:var(--dim);
}
.base small a{color:var(--magenta); text-decoration:none; padding:6px 4px}

/* 滚动入场 */
.js .reveal{opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease}
.js .reveal.on{opacity:1; transform:none}

@media (max-width:900px){
  .deck{grid-template-columns:1fr; gap:24px; padding:34px 5vw 60px}
  .side{position:static}
  .hero{min-height:64vh; padding:12vh 5vw 8vh}
}
@media (max-width:420px){
  body{font-size:16px}
  .rail a{padding:0 9px}
  .ping{padding:0 10px}
}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  h1{animation:none}
  .shots .shot{animation:none}
  .js .reveal{opacity:1; transform:none; transition:none}
}

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