/* ==========================================================================
   AN-94 // IOP TACTICAL DOLL ARCHIVE TERMINAL
   wunian94.top  —  fan-made dossier interface
   --------------------------------------------------------------------------
   00 tokens        01 reset        02 layer/fx     03 hud chrome
   04 boot          05 hero         06 ticker       07 sections
   08 dossier       09 weapon       10 tactics      11 comms
   12 gallery       13 footer       14 lightbox     15 misc
   16 responsive
   ========================================================================== */

/* 00 ============================================================== TOKENS */
:root {
  /* surface */
  --bg-0: #06080b;
  --bg-1: #0a0d12;
  --bg-2: #10151c;
  --bg-3: #171e27;
  --line: #1f2833;
  --line-2: #2c3947;
  --line-3: #3d4d5e;

  /* ink */
  --ink: #e8eef4;
  --ink-2: #a3b1c0;
  --ink-3: #6b7a8a;
  --ink-4: #46525f;

  /* identity — AN-94 crimson (eyes / hairband) */
  --red: #d51f3c;
  --red-2: #ff3654;
  --red-3: #8c1226;
  --red-a: rgba(213, 31, 60, 0.5);
  --red-f: rgba(213, 31, 60, 0.08);

  /* hud — GFL amber */
  --amber: #ffae2b;
  --amber-2: #ffd47e;
  --amber-a: rgba(255, 174, 43, 0.5);

  /* data */
  --ice: #62cfe4;
  --ok: #4ed08a;

  /* type */
  --f-disp: "Chakra Petch", "Rajdhani", "Bahnschrift", "DIN Alternate",
    "Oswald", "Arial Narrow", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", "IBM Plex Mono", "Cascadia Mono", Consolas,
    "SFMono-Regular", ui-monospace, monospace;
  --f-cn: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;

  /* geometry */
  --notch: 14px;
  --gut: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --hud-h: 52px;

  /* motion */
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-io: cubic-bezier(0.65, 0, 0.35, 1);
  --e-snap: cubic-bezier(0.2, 0.9, 0.1, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-3) var(--bg-0);
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--f-cn);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border: 3px solid var(--bg-0);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

/* utility type roles ---------------------------------------------------- */
.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.disp {
  font-family: var(--f-disp);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cn-num {
  font-family: var(--f-disp);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.ttl-en {
  font-family: var(--f-disp);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hl { color: var(--amber); }
.hl-red { color: var(--red-2); }
.dim { color: var(--ink-3); }
.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--amber);
  color: #10151c;
  font-family: var(--f-disp);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s var(--e-out);
}
.skip:focus { transform: none; }

/* 02 ========================================================= LAYER / FX */
#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cg fill='none' stroke='%23253241' stroke-width='1'%3E%3Cpath d='M28 0l24 14v28L28 56 4 42V14z'/%3E%3Cpath d='M28 48l24 14v28L28 104 4 90V62z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 96px;
  opacity: 0.5;
  transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -14px), 0);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 78%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 78% 8%, rgba(213, 31, 60, 0.16), transparent 70%),
    radial-gradient(40% 34% at 6% 62%, rgba(255, 174, 43, 0.07), transparent 70%),
    radial-gradient(70% 60% at 50% 108%, rgba(40, 78, 110, 0.22), transparent 72%);
}

/* perspective floor — gives the page a ground plane */
.bg-floor {
  position: fixed;
  left: -25%;
  right: -25%;
  bottom: -6vh;
  height: 46vh;
  z-index: 0;
  pointer-events: none;
  perspective: 320px;
  opacity: 0.5;
}
.bg-floor i {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 84px);
  /* 位移只动 transform（合成器线程），不再动 background-position（每帧重绘整块） */
  transform: rotateX(76deg) translateY(0);
  animation: floorRun 14s linear infinite;
  will-change: transform;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 72%);
  mask-image: linear-gradient(to top, #000, transparent 72%);
}
@keyframes floorRun {
  from { transform: rotateX(76deg) translateY(0); }
  to { transform: rotateX(76deg) translateY(-84px); }
}

.fx {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  contain: layout paint;   /* 让渲染器把这几层的作用域收窄 */
}
/* 扫描线 + 暗角合成同一个元素：全屏半透明层每帧都要参与合成，
   少一层就少一次全屏混合。 */
.fx--scan {
  background-image:
    repeating-linear-gradient(180deg, rgba(214, 230, 245, 0.042) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 45%, transparent 42%, rgba(0, 0, 0, 0.62) 100%);
}
.fx--sweep::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 22vh;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(120, 190, 220, 0.045) 46%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent
  );
  animation: sweep 9s linear infinite;
}
@keyframes sweep {
  0% { transform: translateY(-30vh); }
  100% { transform: translateY(115vh); }
}
.fx--grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  opacity: 0.32;
  animation: grain 6s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-2%, -3%); }
  80% { transform: translate(4%, 2%); }
  100% { transform: translate(0, 0); }
}

/* 03 ========================================================== HUD CHROME */
.hud {
  position: fixed;
  z-index: 70;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  pointer-events: none;
}

/* top bar --------------------------------------------------------------- */
.hud-top {
  top: 0; left: 0; right: 0;
  height: var(--hud-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 var(--gut);
  background: linear-gradient(180deg, rgba(6, 8, 11, 0.94), rgba(6, 8, 11, 0.62) 70%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s, background 0.3s;
}
.hud-top.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(6, 8, 11, 0.9);
}
.hud-top > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand__mark {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  color: var(--red-2);
  background: var(--red-f);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  font-family: var(--f-disp);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}
.brand__txt {
  font-family: var(--f-disp);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.brand__sub {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  position: relative;
  display: block;
  padding: 7px 13px;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.nav a b {
  display: block;
  font-family: var(--f-cn);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.nav a i {
  display: block;
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--ink-4);
  transition: color 0.2s;
}
.nav a::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--e-out);
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.035); }
.nav a:hover i { color: var(--ink-3); }
.nav a.is-on { color: var(--ink); background: rgba(213, 31, 60, 0.1); }
.nav a.is-on i { color: var(--red-2); }
.nav a.is-on::before { transform: scaleX(1); }

.hud-top__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  background: rgba(16, 21, 28, 0.7);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.chip b { color: var(--amber); font-weight: 500; }
.dot-live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(78, 208, 138, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(78, 208, 138, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(78, 208, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(78, 208, 138, 0); }
}

.sndbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  background: rgba(16, 21, 28, 0.7);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.sndbtn:hover { color: var(--amber); border-color: var(--amber-a); }
.sndbtn.is-on { color: var(--amber); border-color: var(--amber-a); background: rgba(255, 174, 43, 0.09); }
.sndbtn svg { width: 15px; height: 15px; flex: none; }
.sndbtn__txt {
  font-family: var(--f-cn);
  font-size: 11px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* right rail — section index + progress -------------------------------- */
.hud-rail {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}
.hud-rail a {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-4);
  pointer-events: auto;
  transition: color 0.25s;
}
.hud-rail a span {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.25s, transform 0.25s;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: rgba(6, 8, 11, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.hud-rail a::after {
  content: "";
  width: 14px; height: 1px;
  background: currentColor;
  transition: width 0.3s var(--e-out), background 0.25s;
}
.hud-rail a:hover,
.hud-rail a.is-on { color: var(--amber); }
.hud-rail a:hover span,
.hud-rail a.is-on span { opacity: 1; transform: none; }
.hud-rail a.is-on::after { width: 30px; }

/* bottom readout ------------------------------------------------------- */
.hud-bot {
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 8px var(--gut);
  background: linear-gradient(0deg, rgba(6, 8, 11, 0.92), transparent);
  font-size: 9.5px;
}
.hud-bot__sp { margin-left: auto; }
.hud-bot b { color: var(--ink-2); font-weight: 500; }

/* corner brackets ------------------------------------------------------ */
.bracket {
  position: fixed;
  z-index: 65;
  width: 20px; height: 20px;
  border: 1px solid var(--line-3);
  pointer-events: none;
  opacity: 0.75;
}
.bracket--tl { top: calc(var(--hud-h) + 10px); left: 10px; border-right: 0; border-bottom: 0; }
.bracket--tr { top: calc(var(--hud-h) + 10px); right: 10px; border-left: 0; border-bottom: 0; }
.bracket--bl { bottom: 34px; left: 10px; border-right: 0; border-top: 0; }
.bracket--br { bottom: 34px; right: 10px; border-left: 0; border-top: 0; }

/* reticle cursor (mouse / pen only — touch devices never trigger it) ------- */
.reticle {
  position: fixed;
  top: 0; left: 0;
  z-index: 120;
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s;
  will-change: transform;
}
.reticle.is-live { opacity: 1; }
.reticle__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--amber);
  border-radius: 50%;
  /* 深色描边代替 drop-shadow：是静态绘制、随层一起位移，不会每帧重新模糊 */
  box-shadow: 0 0 0 1.5px rgba(6, 8, 11, 0.6);
  transition: transform 0.24s var(--e-out), border-color 0.24s;
}
.reticle__tick {
  position: absolute;
  background: var(--amber);
  transition: transform 0.24s var(--e-out), background 0.24s;
}
.reticle__tick--n { top: -6px; left: 50%; width: 1.5px; height: 7px; margin-left: -0.75px; }
.reticle__tick--s { bottom: -6px; left: 50%; width: 1.5px; height: 7px; margin-left: -0.75px; }
.reticle__tick--w { left: -6px; top: 50%; height: 1.5px; width: 7px; margin-top: -0.75px; }
.reticle__tick--e { right: -6px; top: 50%; height: 1.5px; width: 7px; margin-top: -0.75px; }
.reticle__dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  background: var(--amber);
  transform: rotate(45deg);
  transition: background 0.24s;
}
/* hovering something interactive: brackets snap in and it goes crimson */
.reticle.is-hot .reticle__ring { transform: scale(0.6); border-color: var(--red-2); }
.reticle.is-hot .reticle__tick { background: var(--red-2); }
.reticle.is-hot .reticle__tick--n { transform: translateY(4px); }
.reticle.is-hot .reticle__tick--s { transform: translateY(-4px); }
.reticle.is-hot .reticle__tick--w { transform: translateX(4px); }
.reticle.is-hot .reticle__tick--e { transform: translateX(-4px); }
.reticle.is-hot .reticle__dot { background: var(--red-2); }

/* 收起原生光标。用具体选择器而不是 `* { cursor: none !important }`：
   cursor 是继承属性，写在 body 上就够了；通配符 + !important 会让每次悬停变化
   都牵动整篇文档的样式重算，鼠标一快就卡。 */
body.has-reticle,
body.has-reticle a,
body.has-reticle button,
body.has-reticle summary,
body.has-reticle .sim__pad,
body.has-reticle .bar,
body.has-reticle .egg__row { cursor: none; }

/* 04 ================================================================= BOOT */
#boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg-0);
  transition: opacity 0.55s ease, visibility 0.55s;
}
#boot.is-done { opacity: 0; visibility: hidden; }
.boot {
  width: min(520px, 84vw);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.boot__hd {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.boot__hd b {
  font-family: var(--f-disp);
  font-size: 14px;
  letter-spacing: 0.24em;
  color: var(--red-2);
}
.boot__log { min-height: 132px; }
.boot__log li {
  opacity: 0;
  transform: translateX(-6px);
  animation: bootline 0.32s var(--e-out) forwards;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.boot__log li b { color: var(--amber); font-weight: 500; }
.boot__log li em { font-style: normal; color: var(--ok); }
@keyframes bootline {
  to { opacity: 1; transform: none; }
}
.boot__bar {
  position: relative;
  height: 3px;
  margin: 16px 0 10px;
  background: var(--line);
  overflow: hidden;
}
.boot__bar i {
  position: absolute;
  inset: 0 100% 0 0;
  background: linear-gradient(90deg, var(--red-3), var(--red-2));
  transition: right 0.3s linear;
}
.boot__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 7px, var(--bg-0) 7px 9px);
}
.boot__ft {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--ink-4);
}
.boot__ft b { color: var(--ink-2); font-weight: 500; }

/* 05 ================================================================= HERO */
main { position: relative; z-index: 10; }

.sec {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 11vh, 132px) var(--gut);
}
.sec--tight { padding-top: clamp(40px, 6vh, 72px); }

/* section header ------------------------------------------------------- */
.shd {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: clamp(26px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.shd::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 96px; height: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
}
.shd__idx {
  font-family: var(--f-disp);
  font-size: 34px;
  font-weight: 700;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-3);
  letter-spacing: 0.02em;
}
.shd__txt h2 {
  font-size: clamp(22px, 3.4vw, 34px);
  letter-spacing: 0.01em;
}
.shd__txt p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}
.shd__meta {
  margin-left: auto;
  text-align: right;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.shd__meta b { display: block; color: var(--ink-2); font-weight: 500; }

/* hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--hud-h) + clamp(28px, 6vh, 72px)) var(--gut) clamp(40px, 8vh, 90px);
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: center;
  min-height: 100svh;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__glyph {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-disp);
  font-size: clamp(120px, 25vw, 400px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(61, 77, 94, 0.32);
  white-space: nowrap;
  user-select: none;
}
.hero__stripe {
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-2), transparent);
  opacity: 0.6;
}

.hero__col { position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 5px 12px 5px 8px;
  border: 1px solid var(--line-2);
  background: rgba(16, 21, 28, 0.66);
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
  text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.eyebrow s {
  display: block;
  width: 16px; height: 2px;
  background: var(--red);
  text-decoration: none;
}

.hero__name {
  position: relative;
  margin: 0 0 6px;
  font-family: var(--f-disp);
  font-size: clamp(58px, 11vw, 138px);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.hero__name .g {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.hero__name .g--a { color: var(--red-2); clip-path: inset(12% 0 62% 0); }
.hero__name .g--b { color: var(--ice); clip-path: inset(58% 0 18% 0); }
.hero__name:hover .g--a,
.hero__name:focus-within .g--a { animation: glitchA 0.5s steps(2) 1; }
.hero__name:hover .g--b,
.hero__name:focus-within .g--b { animation: glitchB 0.5s steps(2) 1; }
@keyframes glitchA {
  0%, 100% { opacity: 0; transform: none; }
  15% { opacity: 1; transform: translate(-3px, -1px); }
  40% { opacity: 1; transform: translate(4px, 1px); }
  70% { opacity: 1; transform: translate(-2px, 0); }
}
@keyframes glitchB {
  0%, 100% { opacity: 0; transform: none; }
  20% { opacity: 1; transform: translate(3px, 1px); }
  55% { opacity: 1; transform: translate(-4px, -1px); }
  80% { opacity: 1; transform: translate(2px, 0); }
}

.hero__cyr {
  font-family: var(--f-disp);
  font-size: clamp(15px, 2vw, 21px);
  letter-spacing: 0.42em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.hero__cyr b { color: var(--red-2); }

.hero__role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 20px 0 22px;
  font-size: 13px;
  color: var(--ink-2);
}
.hero__role i {
  font-style: normal;
  width: 1px; height: 14px;
  background: var(--line-2);
}
.stars {
  display: inline-flex;
  gap: 3px;
}
.stars svg { width: 14px; height: 14px; fill: var(--amber); }

.hero__lede {
  max-width: 46ch;
  font-size: 15px;
  color: var(--ink-2);
  border-left: 2px solid var(--red-3);
  padding-left: 16px;
}
.hero__lede b { color: var(--ink); font-weight: 600; }

.hero__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  font-family: var(--f-disp);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.25s var(--e-out);
}
.btn svg { width: 14px; height: 14px; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  transform: translateX(-120%);
  transition: transform 0.55s var(--e-out);
}
.btn:hover { transform: translateY(-2px); border-color: var(--line-3); }
.btn:hover::before { transform: translateX(120%); }
.btn--primary {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(213, 31, 60, 0.26), rgba(213, 31, 60, 0.1));
  box-shadow: 0 10px 30px -12px var(--red-a), inset 0 0 0 1px rgba(255, 54, 84, 0.14);
}
.btn--primary:hover { background: linear-gradient(180deg, rgba(213, 31, 60, 0.4), rgba(213, 31, 60, 0.16)); }
.btn--ghost { background: transparent; }

/* portrait scene (3D) -------------------------------------------------- */
.scene {
  position: relative;
  perspective: 1100px;
  perspective-origin: 50% 42%;
  min-height: clamp(380px, 62vh, 660px);
  /* 纵向滑动仍然翻页，横向拖动交给 JS 做 3D 倾斜 */
  touch-action: pan-y;
}
.scene:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }

/* 无人操作时的呼吸感：常驻缓慢摆动，保证「立体」这件事一眼可见 */
@keyframes idleSway {
  0%, 100% { transform: rotateY(-1.6deg) rotateX(0.5deg); }
  50% { transform: rotateY(1.6deg) rotateX(-0.5deg); }
}
@media (min-width: 1025px) {
  .scene { animation: idleSway 13s ease-in-out infinite; }
  .scene.is-live { animation-play-state: paused; }
}
.deck {
  position: relative;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  /* 实际角度由 app.js 直接写 inline transform（见 initTilt 注释）；
     这里只留一个中性值，保证没有 JS 时也是正着的。 */
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform 0.5s var(--e-out);
  will-change: transform;
}
.scene.is-live .deck { transition: transform 0.12s linear; }

.deck__plate {
  position: absolute;
  inset: 4% 0 8%;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(180deg, rgba(23, 30, 39, 0.86), rgba(10, 13, 18, 0.9)),
    radial-gradient(70% 50% at 62% 18%, rgba(213, 31, 60, 0.16), transparent 70%);
  clip-path: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px);
  transform: translateZ(-40px);
  box-shadow: 0 40px 90px -40px #000;
}
.deck__plate::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(61, 77, 94, 0.4);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
.deck__grid {
  position: absolute;
  inset: 4% 0 8%;
  background-image:
    repeating-linear-gradient(0deg, rgba(61, 77, 94, 0.16) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(61, 77, 94, 0.16) 0 1px, transparent 1px 40px);
  transform: translateZ(-30px);
  opacity: 0.5;
}
.deck__art {
  position: absolute;
  inset: 0 0 2%;
  display: grid;
  place-items: end center;
  transform: translateZ(38px);
}
/* rim light so the dark uniform separates from the dark plate */
.deck__art::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 62%;
  height: 76%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(167, 204, 232, 0.2), rgba(213, 31, 60, 0.12) 58%, transparent 100%);
  filter: blur(18px);
  pointer-events: none;
}
/* 落地阴影：用固定的椭圆渐变，代替原来 img 上的 drop-shadow。
   drop-shadow 在 3D 子树里每帧都要按新的缩放重新光栅化，是移动时掉帧的主因。 */
.deck__art::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.5%;
  width: 52%;
  height: 7%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent 100%);
  pointer-events: none;
}
.deck__art img {
  position: relative;
  max-height: clamp(400px, 68vh, 700px);
  width: auto;
  max-width: 112%;
  object-fit: contain;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.9s var(--e-out), transform 1.1s var(--e-out);
}
.deck__art img.is-in { opacity: 1; transform: none; }
.deck__art img.is-dead { display: none; }

/* signal-lost placeholder if every mirror fails */
.deck__void {
  display: none;
  position: absolute;
  inset: 6% 4% 10%;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line-2);
  background: repeating-linear-gradient(45deg, rgba(213, 31, 60, 0.05) 0 12px, transparent 12px 24px);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  line-height: 2.2;
}
.deck__void b { display: block; color: var(--red-2); font-size: 13px; letter-spacing: 0.3em; }
.has-void .deck__void { display: grid; }

/* 高光：以前是把 --mx/--my 塞进 radial-gradient 的 calc() 里 —— 那等于每帧重画一次渐变。
   现在渐变固定不变，只移动它的 transform，纯合成器工作，不重绘。 */
.deck__sheen {
  position: absolute;
  inset: 4% 0 8%;
  transform: translateZ(41px);
  pointer-events: none;
  overflow: hidden;
  clip-path: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px);
}
.deck__sheen::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 460px;
  height: 460px;
  margin: -230px 0 0 -230px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.14), transparent 72%);
  transform: translate(
    calc((var(--mx, 0.5) - 0.5) * 620px),
    calc((var(--my, 0.4) - 0.5) * 500px)
  );
  will-change: transform;
}
/* 扫描线原本动的是 top（每帧触发布局），改成 transform:
   高度用父容器的百分比，位移用自身高度的百分比，任何尺寸下都能走完全程 */
.deck__scan {
  position: absolute;
  left: 0; right: 0;
  top: 4%;
  height: 14%;
  transform: translateZ(42px) translateY(0);
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.07) 60%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  animation: scanY 6.5s var(--e-io) infinite;
}
@keyframes scanY {
  0%, 100% { transform: translateZ(42px) translateY(0); opacity: 0; }
  12% { opacity: 0.9; }
  88% { opacity: 0.9; }
  50% { transform: translateZ(42px) translateY(560%); }
}

.deck__tag {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid var(--line-2);
  background: rgba(10, 13, 18, 0.88);
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  text-transform: uppercase;
  white-space: nowrap;
  /* 这里原本有 backdrop-filter: blur(4px)。它嵌在会动的 3D 子树里，
     背景每帧都在变，于是每帧都要重算一次背景模糊——而底色本来就是 88% 不透明，
     模糊几乎看不出来。去掉，纯赚。 */
  --tz: 60px;
  transform: translateZ(var(--tz));
  animation: floaty 7s ease-in-out infinite;
}
.deck__tag b { color: var(--amber); font-weight: 500; }
.deck__tag::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--red-2);
  transform: rotate(45deg);
  flex: none;
}
.deck__tag--1 { top: 12%; left: -4%; --tz: 70px; animation-delay: -0.4s; }
.deck__tag--2 { top: 42%; right: -6%; --tz: 88px; animation-delay: -2.6s; }
.deck__tag--3 { bottom: 16%; left: 2%; --tz: 60px; animation-delay: -4.9s; }
/* 原来是动 margin-top —— 那会每帧触发布局。改成 transform，
   Z 深度通过 --tz 传进关键帧里保留下来。 */
@keyframes floaty {
  0%, 100% { transform: translateZ(var(--tz)) translateY(0); }
  50% { transform: translateZ(var(--tz)) translateY(-9px); }
}

.deck__stamp {
  position: absolute;
  right: 3%;
  bottom: 3%;
  z-index: 5;
  transform: translateZ(52px) rotate(-4deg);
  padding: 7px 13px;
  border: 2px solid rgba(213, 31, 60, 0.55);
  color: rgba(255, 54, 84, 0.82);
  font-family: var(--f-disp);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  background: rgba(140, 18, 38, 0.1);
}

/* 06 =============================================================== TICKER */
.ticker {
  position: relative;
  z-index: 12;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 13, 18, 0.7);
  padding: 9px 0;
}
/* 两端淡出：原来是父元素上的 mask-image，那会让内部滚动动画每帧都要重新套一次遮罩；
   改用两条固定的渐变条，效果一样但便宜。 */
.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 9%;
  z-index: 2;
  pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(90deg, #0a0d12, rgba(10, 13, 18, 0)); }
.ticker::after { right: 0; background: linear-gradient(270deg, #0a0d12, rgba(10, 13, 18, 0)); }
.ticker__row {
  display: flex;
  gap: 34px;
  width: max-content;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  animation: tick 46s linear infinite;
}
.ticker:hover .ticker__row { animation-play-state: paused; }
.ticker__row span { display: inline-flex; align-items: center; gap: 10px; }
.ticker__row span::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--red);
  transform: rotate(45deg);
}
.ticker__row b { color: var(--ink-2); font-weight: 500; }
@keyframes tick {
  to { transform: translateX(-50%); }
}

/* 07 ============================================================= SECTIONS */
.panel {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(23, 30, 39, 0.5), rgba(10, 13, 18, 0.72));
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(44, 57, 71, 0.4);
  pointer-events: none;
  clip-path: polygon(calc(var(--notch) - 4px) 0, 100% 0, 100% calc(100% - var(--notch) + 4px), calc(100% - var(--notch) + 4px) 100%, 0 100%, 0 calc(var(--notch) - 4px));
}
.panel__hd {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(23, 30, 39, 0.5);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.panel__hd b { color: var(--ink); font-weight: 500; letter-spacing: 0.16em; }
.panel__hd i { font-style: normal; margin-left: auto; color: var(--ink-4); }
.panel__bd { padding: clamp(18px, 3vw, 28px); }

/* reveal --------------------------------------------------------------- */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--e-out), transform 0.9s var(--e-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.rv.is-in { opacity: 1; transform: none; }

.rv-line {
  position: relative;
  overflow: hidden;
}
.rv-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-0);
  border-right: 2px solid var(--red);
  transform: translateX(0);
  transition: transform 0.85s var(--e-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.rv-line.is-in::after { transform: translateX(101%); }

/* 08 ============================================================== DOSSIER */
.dossier {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(16px, 2.5vw, 26px);
  align-items: start;
}

.spec { display: grid; }
.spec > div {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  padding: 11px 2px;
  border-bottom: 1px dashed rgba(44, 57, 71, 0.55);
  font-size: 13.5px;
}
.spec > div:last-child { border-bottom: 0; }
.spec dt {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  text-transform: uppercase;
  padding-top: 4px;
}
.spec dd { margin: 0; color: var(--ink); }
.spec dd small { display: block; color: var(--ink-3); font-size: 11.5px; letter-spacing: 0.06em; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
  padding: 2px 9px;
  border: 1px solid var(--line-2);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  background: rgba(23, 30, 39, 0.6);
}
.tags span.is-red { border-color: var(--red-3); color: var(--red-2); background: var(--red-f); }
.tags span.is-amber { border-color: rgba(255, 174, 43, 0.4); color: var(--amber); background: rgba(255, 174, 43, 0.07); }

/* radar + bars --------------------------------------------------------- */
.statwrap { display: grid; gap: 18px; }
.radar {
  position: relative;
  display: grid;
  place-items: center;
  padding: 6px 0 2px;
}
.radar canvas { max-width: 100%; touch-action: none; }
.radar__hint {
  position: absolute;
  right: 4px; bottom: 0;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  text-transform: uppercase;
}

.bars { display: grid; gap: 9px; }
.bar {
  display: grid;
  grid-template-columns: 62px 1fr 46px;
  align-items: center;
  gap: 12px;
  padding: 3px 6px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  cursor: default;
}
.bar:hover, .bar.is-on { background: rgba(213, 31, 60, 0.07); border-color: var(--red-3); }
.bar__k {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.bar__t {
  position: relative;
  height: 7px;
  background: rgba(44, 57, 71, 0.42);
  overflow: hidden;
}
.bar__t i {
  position: absolute;
  inset: 0 100% 0 0;
  background: linear-gradient(90deg, var(--red-3), var(--red-2));
  transition: right 1.1s var(--e-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.bar__t i.is-hi { background: linear-gradient(90deg, #8a5a10, var(--amber)); }
.bar__v {
  font-family: var(--f-disp);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 09 =============================================================== WEAPON */
.wpn {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(16px, 2.5vw, 26px);
  align-items: start;
}

/* burst simulator */
.sim { display: grid; gap: 16px; }

.sim__pad {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 156px;
  padding: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 50% 120%, rgba(213, 31, 60, 0.16), transparent 70%),
    repeating-linear-gradient(90deg, rgba(61, 77, 94, 0.14) 0 1px, transparent 1px 34px),
    var(--bg-1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  cursor: crosshair;
  overflow: hidden;
}
.sim__pad.is-fire { border-color: var(--red); }
.sim__count {
  font-family: var(--f-disp);
  font-size: clamp(54px, 9vw, 84px);
  font-weight: 700;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-shadow: 0 0 34px rgba(213, 31, 60, 0.4);
}
.sim__count small {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
  margin-left: 8px;
  font-family: var(--f-mono);
  font-weight: 400;
}
.sim__hint {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.sim__rpm {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.sim__rpm b { display: block; font-family: var(--f-disp); font-size: 21px; letter-spacing: 0; color: var(--amber); font-weight: 700; }
.sim__rpm s { display: block; text-decoration: none; color: var(--ink-4); }

/* cycle diagram */
.cycle {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--bg-1);
}
.cycle__track {
  position: relative;
  height: 34px;
  background: repeating-linear-gradient(90deg, rgba(61, 77, 94, 0.18) 0 1px, transparent 1px 22px);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.cycle__bolt {
  position: absolute;
  top: 5px;
  left: 0;
  width: 46px;
  height: 22px;
  background: linear-gradient(180deg, var(--line-3), var(--line-2));
  border: 1px solid var(--line-3);
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.cycle__cap {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.cycle__note { font-size: 12.5px; color: var(--ink-3); line-height: 1.8; margin: 0; }

/* waveform strip */
.wave {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  padding: 0 2px;
  border: 1px solid var(--line);
  background: var(--bg-1);
}
.wave i {
  flex: 1 0 3px;
  height: 14%;
  background: var(--line-2);
  transform-origin: center;
  transition: height 0.14s linear, background 0.4s;
}
.wave i:nth-child(3n) { height: 24%; background: var(--line); }
.wave i:nth-child(7n) { height: 9%; }
.wave i.is-hit { background: var(--red-2); height: 88%; }
.wave.is-live i { background: var(--amber-a); }

/* 10 ============================================================== TACTICS */
.tac { display: grid; gap: 12px; }
.skill {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(23, 30, 39, 0.55), rgba(10, 13, 18, 0.6));
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  transition: border-color 0.3s;
}
.skill.is-open { border-color: var(--line-3); }
.skill__hd {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  text-align: left;
}
.skill__no {
  font-family: var(--f-disp);
  font-size: 20px;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-3);
  text-align: center;
}
.skill.is-open .skill__no { color: var(--red-2); -webkit-text-stroke: 0; }
.skill__nm { font-size: 16px; font-weight: 700; letter-spacing: 0.04em; }
.skill__nm small {
  display: block;
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--ink-4);
  text-transform: uppercase;
  margin-top: 3px;
}
.skill__type {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  text-transform: uppercase;
  white-space: nowrap;
}
.skill__type.is-active { border-color: var(--red-3); color: var(--red-2); background: var(--red-f); }
.skill__bd {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--e-out);
}
.skill.is-open .skill__bd { grid-template-rows: 1fr; }
.skill__in { overflow: hidden; }
.skill__pad {
  padding: 0 20px 20px;
  border-top: 1px dashed rgba(44, 57, 71, 0.6);
  margin-top: 0;
  padding-top: 16px;
}
.skill__pad p { font-size: 13.5px; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 10px; margin-top: 14px; }
.kv div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(6, 8, 11, 0.5);
}
.kv dt { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em; color: var(--ink-4); text-transform: uppercase; }
.kv dd { margin: 4px 0 0; font-family: var(--f-disp); font-size: 17px; font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }
.kv dd small { font-family: var(--f-cn); font-size: 11px; color: var(--ink-3); font-weight: 400; }

/* 11 ================================================================ COMMS */
.comms {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(14px, 2vw, 22px);
  align-items: start;
}
.comms__list {
  display: grid;
  gap: 6px;
  max-height: min(64vh, 560px);
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
}
.comms__list button {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 28, 0.6);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.comms__list button:hover { border-color: var(--line-3); background: rgba(23, 30, 39, 0.8); }
.comms__list button.is-on {
  border-color: var(--red);
  background: linear-gradient(90deg, rgba(213, 31, 60, 0.16), rgba(213, 31, 60, 0.03));
}
.comms__list i {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-4);
}
.comms__list b { font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; }
.comms__list b small { display: block; font-family: var(--f-mono); font-size: 9px; font-weight: 400; letter-spacing: 0.16em; color: var(--ink-4); text-transform: uppercase; margin-top: 2px; }

.comms__stage { position: relative; }
@media (min-width: 1025px) {
  .comms__stage { position: sticky; top: calc(var(--hud-h) + 20px); }
}
.comms__screen {
  position: relative;
  min-height: 302px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(23, 30, 39, 0.6), rgba(6, 8, 11, 0.85)),
    radial-gradient(80% 60% at 20% 0%, rgba(213, 31, 60, 0.12), transparent 70%);
  overflow: hidden;
}
.comms__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.comms__who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.comms__who b { color: var(--red-2); font-weight: 500; }
.comms__line {
  position: relative;
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.9;
  color: var(--ink);
  min-height: 3.8em;
  letter-spacing: 0.03em;
}
.comms__line .cur {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.16em;
  background: var(--red-2);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.comms__src {
  margin-top: 16px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.comms__ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.comms__ctrl .hint { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--ink-4); text-transform: uppercase; margin-left: auto; }

.viz { position: absolute; right: 14px; top: 14px; display: flex; align-items: flex-end; gap: 2px; height: 22px; opacity: 0.7; }
.viz i {
  width: 2px;
  height: 100%;
  background: var(--red-2);
  transform: scaleY(0.2);
  transform-origin: bottom;
}
.viz.is-live i { animation: vizBar 0.7s ease-in-out infinite alternate; }
.viz.is-live i:nth-child(2n) { animation-duration: 0.45s; }
.viz.is-live i:nth-child(3n) { animation-duration: 0.9s; }
/* 动 scaleY 而不是 height：不入布局 */
@keyframes vizBar {
  from { transform: scaleY(0.18); }
  to { transform: scaleY(1); }
}

/* 12 ============================================================== GALLERY */
.gal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.gal__it {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(64% 46% at 50% 74%, rgba(213, 31, 60, 0.13), transparent 72%),
    repeating-linear-gradient(45deg, rgba(44, 57, 71, 0.22) 0 10px, transparent 10px 20px),
    var(--bg-1);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  transition: border-color 0.3s, transform 0.5s var(--e-out);
}
.gal__it:hover { border-color: var(--red-3); transform: translateY(-5px); }
.gal__it img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: bottom center;
  transition: transform 0.7s var(--e-out), filter 0.4s;
  filter: saturate(0.78) contrast(1.05) brightness(0.9);
  color: var(--ink-4);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 14px;
}
.gal__it:hover img { transform: scale(1.04); filter: none; }
.gal__it::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(6, 8, 11, 0.9));
  pointer-events: none;
}
.gal__meta {
  position: absolute;
  left: 12px; right: 12px; bottom: 11px;
  z-index: 2;
}
.gal__meta b { display: block; font-size: 13.5px; letter-spacing: 0.04em; }
.gal__meta small {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--amber);
  text-transform: uppercase;
  margin-top: 2px;
}
.gal__it.is-dead { display: none; }
.gal__expand {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: rgba(6, 8, 11, 0.7);
  color: var(--ink-2);
  font-family: var(--f-mono);
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.3s;
}
.gal__it:hover .gal__expand { opacity: 1; }

/* 13 =============================================================== FOOTER */
.foot {
  position: relative;
  z-index: 10;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 6vh, 72px) var(--gut) 96px;
  border-top: 1px solid var(--line);
}
.foot__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
}
.foot h4 {
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 12px;
}
.foot p, .foot li { font-size: 12.5px; color: var(--ink-3); line-height: 1.9; }
.foot a.u { color: var(--ink-2); border-bottom: 1px solid var(--line-2); transition: color 0.2s, border-color 0.2s; }
.foot a.u:hover { color: var(--amber); border-color: var(--amber-a); }
.foot__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.foot__bar .sp { margin-left: auto; }

/* 14 ============================================================= LIGHTBOX */
#lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(4, 6, 9, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s, visibility 0.32s;
}
#lb.is-open { opacity: 1; visibility: visible; }
.lb__top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px var(--gut);
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.lb__top b { color: var(--ink); font-weight: 500; }
.lb__close { margin-left: auto; width: 34px; height: 30px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 15px; transition: color 0.2s, border-color 0.2s; }
.lb__close:hover { color: var(--red-2); border-color: var(--red-3); }
.lb__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0; /* without this the 1fr row stretches to the artwork's natural size */
  padding: 18px;
  overflow: hidden;
}
/* absolute box + object-fit: contain — a percentage max-height does not
   constrain a centred grid item, which would let tall art overflow the row */
.lb__stage img {
  position: absolute;
  inset: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  max-width: none;
  max-height: none;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.3s, transform 0.45s var(--e-out);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.7));
}
.lb__stage img.is-in { opacity: 1; transform: none; }
.lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: rgba(10, 13, 18, 0.8);
  color: var(--ink-2);
  font-size: 17px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.lb__nav:hover { color: var(--amber); border-color: var(--amber-a); background: rgba(23, 30, 39, 0.9); }
.lb__nav--p { left: 12px; }
.lb__nav--n { right: 12px; }
.lb__bot {
  padding: 12px var(--gut) 16px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  text-transform: uppercase;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.lb__bot b { color: var(--amber); font-weight: 500; }

/* 15 ================================================================= MISC */
.totop {
  position: fixed;
  right: 16px;
  bottom: 52px;
  z-index: 80;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: rgba(10, 13, 18, 0.86);
  color: var(--ink-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--e-out), color 0.2s, border-color 0.2s;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.totop.is-in { opacity: 1; visibility: visible; transform: none; }
.totop:hover { color: var(--amber); border-color: var(--amber-a); }

#toast {
  position: fixed;
  left: 50%;
  bottom: 66px;
  z-index: 210;
  transform: translate(-50%, 16px);
  padding: 11px 18px;
  border: 1px solid var(--amber-a);
  background: rgba(10, 13, 18, 0.95);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.4s var(--e-out);
  max-width: min(88vw, 520px);
  text-align: center;
}
#toast.is-in { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
#toast b { color: var(--amber); font-weight: 500; }

/* easter-egg panel */
.egg {
  display: grid;
  gap: 14px;
}
.egg__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(44, 57, 71, 0.55);
  font-size: 13.5px;
}
.egg__row:last-child { border-bottom: 0; }
.egg__row b { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--ink-4); text-transform: uppercase; font-weight: 400; padding-top: 4px; }
.is-hidden { display: none !important; }

/* 15b ================================================== COMPONENT EXTRAS */
/* segmented control (shared by simulator + stat panel) */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
}
.seg button {
  padding: 9px 16px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color 0.2s, background 0.2s;
}
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.is-on { color: #0b0e13; background: var(--amber); font-weight: 500; }
.seg button:not(.is-on):hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }

/* prose blocks */
.prose p { font-size: 13.8px; line-height: 2; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }
.prose b { color: var(--ink); font-weight: 600; }
.prose blockquote {
  margin: 16px 0;
  padding: 14px 18px;
  border-left: 2px solid var(--red);
  background: linear-gradient(90deg, var(--red-f), transparent 70%);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.95;
}

/* small footnote-style remark */
.note {
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 1px solid var(--line-2);
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-3);
}
.note b { color: var(--ink-2); font-weight: 600; }

/* simulator body */
.sim__body { display: grid; gap: 14px; }
.simlog { display: grid; gap: 4px; font-family: var(--f-mono); font-size: 10px; }
.simlog li {
  display: flex;
  gap: 10px;
  padding: 5px 9px;
  border-left: 2px solid var(--line-2);
  background: rgba(6, 8, 11, 0.5);
  color: var(--ink-3);
  letter-spacing: 0.08em;
  animation: logIn 0.3s var(--e-out);
}
.simlog li b { color: var(--amber); font-weight: 500; }
.simlog li em { font-style: normal; margin-left: auto; color: var(--ink-4); }
@keyframes logIn { from { opacity: 0; transform: translateX(-8px); } }

/* skill internals */
.skill__flex { display: flex; gap: 16px; align-items: flex-start; }
.skill__flex p { margin-top: 0; }
.skill__ico {
  flex: none;
  width: 56px; height: 56px;
  object-fit: contain;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  padding: 4px;
}

/* big counters */
.counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
}
.counters > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(6, 8, 11, 0.45);
}
.counters b {
  display: block;
  font-family: var(--f-disp);
  font-size: clamp(26px, 4.6vw, 38px);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.counters s {
  display: block;
  margin-top: 8px;
  text-decoration: none;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.counters .note { grid-column: 1 / -1; margin-top: 0; }

/* 15c ============================================== CONTENT-DEPTH BLOCKS */
/* two-panel rows */
.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(16px, 2.5vw, 26px);
  align-items: start;
}

/* label / value record list */
.rec { display: grid; gap: 2px; margin: 0 0 4px; }
.rec li {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(44, 57, 71, 0.55);
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
}
.rec li:last-child { border-bottom: 0; }
.rec b {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--amber);
  text-transform: uppercase;
  padding-top: 5px;
}

/* mechanism stepper */
.steps { display: grid; gap: 16px; }
.steps__nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.steps__nav button {
  display: grid;
  gap: 4px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 28, 0.6);
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-3);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.steps__nav button b {
  font-family: var(--f-disp);
  font-size: 15px;
  font-weight: 700;
  color: var(--line-3);
  transition: color 0.2s;
}
.steps__nav button:hover { color: var(--ink); border-color: var(--line-3); }
.steps__nav button.is-on {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(213, 31, 60, 0.18), rgba(213, 31, 60, 0.04));
  color: var(--ink);
}
.steps__nav button.is-on b { color: var(--red-2); }
.steps__body {
  position: relative;
  min-height: 168px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, rgba(61, 77, 94, 0.12) 0 1px, transparent 1px 40px),
    rgba(6, 8, 11, 0.5);
}
.steps__body article {
  position: absolute;
  inset: 18px 20px auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.4s var(--e-out);
  pointer-events: none;
}
.steps__body article.is-on { opacity: 1; transform: none; pointer-events: auto; }
.steps__body h4 {
  font-size: 15px;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}
.steps__body p { font-size: 13.2px; color: var(--ink-2); margin: 0 0 12px; }
.steps__meta {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
  text-transform: uppercase;
}

/* data table */
.dtable {
  width: 100%;
  margin: 14px 0 4px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.dtable caption {
  text-align: left;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
  text-transform: uppercase;
  padding-bottom: 8px;
}
.dtable th, .dtable td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
}
.dtable thead th {
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  text-transform: uppercase;
  background: rgba(23, 30, 39, 0.6);
}
.dtable tbody th {
  font-weight: 500;
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
}
.dtable--num td {
  font-family: var(--f-disp);
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--ink-2);
}
.dtable--num th:first-child { text-align: left; }
.dtable--num td.is-hi { color: var(--amber); font-weight: 700; background: rgba(255, 174, 43, 0.07); }
.dtable tr.is-win td { color: var(--amber); }
.dtable tr.is-win td:first-child { font-weight: 700; }

/* collapsible growth table */
.grow { margin-top: 16px; border-top: 1px dashed rgba(44, 57, 71, 0.6); }
.grow summary {
  padding: 12px 0 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--amber);
  text-transform: uppercase;
}
.grow summary::-webkit-details-marker { display: none; }
.grow summary::before { content: "▸ "; }
.grow[open] summary::before { content: "▾ "; }
.grow summary:hover { color: var(--amber-2); }
.grow__scroll { overflow-x: auto; }
.grow .dtable { min-width: 520px; }

/* gallery filter */
.gal__filter { margin-bottom: 16px; }
.gal__it.is-off { display: none; }

/* operation distribution bars */
.ops { display: grid; gap: 12px; }
.ops__row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  font-size: 12.5px;
}
.ops__row b { font-weight: 600; letter-spacing: 0.04em; }
.ops__bar {
  position: relative;
  height: 8px;
  background: rgba(44, 57, 71, 0.42);
  overflow: hidden;
}
.ops__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--red-3), var(--red-2));
  transform-origin: left;
  animation: opsIn 0.9s var(--e-out) both;
}
@keyframes opsIn { from { transform: scaleX(0); } }
.ops__row em {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  text-transform: uppercase;
}

/* 首屏滚出视野后，把所有常驻氛围动画挂起（画布由 JS 一起停）：
   读正文时页面基本静止，不白烧 CPU/GPU。 */
html.amb-paused .scene,
html.amb-paused .fx--grain,
html.amb-paused .fx--sweep,
html.amb-paused .bg-floor i,
html.amb-paused .ticker__row,
html.amb-paused .deck__scan,
html.amb-paused .deck__tag { animation-play-state: paused; }

/* 16 =========================================================== RESPONSIVE */
@media (max-width: 1180px) {
  .hud-rail { display: none; }
  .bracket { display: none; }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: clamp(28px, 6vw, 44px);
    min-height: 0;
    padding-top: calc(var(--hud-h) + 34px);
  }
  .hero__col--art { order: -1; }
  .scene { min-height: clamp(340px, 54vh, 520px); }
  .deck__art img { max-height: clamp(320px, 48vh, 500px); }
  .deck__tag--1 { left: 0; }
  .deck__tag--2 { right: 0; }
  .dossier, .wpn, .comms { grid-template-columns: 1fr; }
  .comms__list { grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); overflow-x: auto; padding-bottom: 6px; }
  .comms__list button { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  :root { --hud-h: 48px; --notch: 11px; }
  .hud-top { gap: 10px; padding: 0 14px; }
  .brand__sub { display: none; }
  .hud-top__right .chip { display: none; }
  .sndbtn { padding: 0 8px; }
  .sndbtn__txt { display: none; }
  .nav { margin-left: 0; }
  .nav a { padding: 6px 10px; }
  .nav a i { display: none; }
  .hud-bot { font-size: 9px; gap: 12px; }
  .hud-bot__hide { display: none; }
  .sec { padding-left: 14px; padding-right: 14px; }
  .hero { padding-left: 14px; padding-right: 14px; }
  .shd {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 6px 14px;
  }
  .shd__idx { font-size: 26px; }
  .shd__meta { grid-column: 1 / -1; margin-left: 0; text-align: left; }
  .gal { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 9px; }
  .deck__tag { font-size: 9px; padding: 5px 9px; }
  .deck__stamp { font-size: 10px; padding: 6px 10px; }
  /* 手机上收掉 Z 轴放大：透视会把悬浮标签向外推，窄屏下会顶出视口 */
  .deck__art img { max-width: 100%; }
  .deck__tag--1 { left: 0; --tz: 22px; }
  .deck__tag--2 { right: 0; --tz: 26px; }
  .deck__tag--3 { left: 0; --tz: 18px; }
  .deck__stamp { transform: translateZ(16px) rotate(-4deg); }
  .hero__glyph { font-size: clamp(84px, 26vw, 200px); }
  .spec > div { grid-template-columns: 84px 1fr; gap: 10px; font-size: 13px; }
  .skill__hd { grid-template-columns: 34px 1fr; gap: 12px; padding: 14px; }
  .skill__type { grid-column: 2; justify-self: start; margin-top: 6px; }
  .comms__screen { min-height: 240px; }
  .comms__line { min-height: 4.4em; }
  .lb__nav { width: 38px; height: 52px; }
  .totop { bottom: 60px; right: 12px; }
  .seg { width: 100%; }
  .seg button { flex: 1 1 auto; padding: 9px 10px; font-size: 10px; }
  .sim__pad { min-height: 132px; padding: 14px; }
  .sim__rpm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
  .sim__rpm b { font-size: 19px; }
  .skill__flex { gap: 12px; }
  .skill__ico { width: 44px; height: 44px; }
  .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .counters b { font-size: 24px; }
  .prose blockquote { font-size: 14px; padding: 12px 14px; }
  .egg__row { grid-template-columns: 68px 1fr; }
  .rec li { grid-template-columns: 82px 1fr; gap: 10px; }
  .steps__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps__body { min-height: 208px; padding: 14px; }
  .steps__body article { inset: 14px 14px auto; }
  .ops__row { grid-template-columns: 74px minmax(0, 1fr); gap: 8px 10px; }
  .ops__row em { grid-column: 2; }
  .dtable { font-size: 11.5px; }
  .dtable th, .dtable td { padding: 6px 7px; }
}

@media (hover: none) {
  .deck__scan { display: none; }
}

/* 系统「减少动态效果」→ 收敛常驻动效；但 html.fx-force（HUD 上的「动效」开关）
   会整体解除这些覆盖，让用户自己决定要看全效果。 */
@media (prefers-reduced-motion: reduce) {
  html:not(.fx-force) { scroll-behavior: auto; }
  html:not(.fx-force) *,
  html:not(.fx-force) *::before,
  html:not(.fx-force) *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html:not(.fx-force) .rv { opacity: 1; transform: none; }
  html:not(.fx-force) .rv-line::after { display: none; }
  html:not(.fx-force) .bar__t i { transition: none; }
  html:not(.fx-force) .scene { animation: none; }
  html:not(.fx-force) .fx--grain,
  html:not(.fx-force) .fx--sweep,
  html:not(.fx-force) .bg-floor i { display: none; }
}

@media print {
  .hud, .fx, #boot, .ticker, .reticle, .totop, .bg-floor, #field { display: none !important; }
  body { background: #fff; color: #000; }
  .rv { opacity: 1 !important; transform: none !important; }
  .rv-line::after { display: none !important; }
  .is-hidden { display: block !important; }
  .panel, .skill, .gal__it { break-inside: avoid; }
}
