/* ============================================================
   A.C.S.S — Skin 02 "POSTER" 复古航天丝网海报
   纸张留边 · 套准标记 · 分版印刷 · 硬边色块 · 无光晕
   ============================================================ */

:root {
  --paper: #e9dfc8;
  --paperDim: #d8cbae;
  --sky: #14161f;
  --skyDeep: #0e1017;
  --red: #c8402e;
  --redDeep: #8f2b1e;
  --orange: #d97b34;
  --orangeLit: #e08a42;
  --teal: #3f8e9b;
  --tealDeep: #2c6570;
  --mustard: #c9a94f;
  --cream: #e9dfc8;
  --inkDark: #2a251d;
  --disp: "Oswald", "Arial Narrow", sans-serif;
  --zhFont: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --margin: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--paper);
  font-family: var(--zhFont);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 纸张颗粒（整页，含留边） ---------- */

#paperGrain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: multiply;
  opacity: 0.09;
}

/* ---------- 套准标记与留边注记 ---------- */

.regMark {
  position: fixed; z-index: 45; width: 13px; height: 13px;
  color: var(--inkDark); opacity: 0;
}
.regMark.on { opacity: 0.55; }
body.splashing .regMark.on { animation: regStamp 0.18s steps(2) both; }
@keyframes regStamp {
  from { opacity: 0; transform: scale(1.7); }
  to   { opacity: 0.55; transform: scale(1); }
}
.regMark.tl { top: 4px; left: 5px; }
.regMark.tr { top: 4px; right: 5px; }
.regMark.bl { bottom: 4px; left: 5px; }
.regMark.br { bottom: 4px; right: 5px; }

#marginNote {
  position: fixed; z-index: 45;
  left: 26px; bottom: 4px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.22em;
  color: var(--inkDark); opacity: 0.62;
}

#passLabel {
  position: fixed; z-index: 45;
  right: 26px; bottom: 4px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.22em;
  color: var(--inkDark); opacity: 0.62;
  text-align: right;
}

/* ---------- 画芯：印刷分版 ---------- */

#art {
  position: fixed; z-index: 10;
  inset: var(--margin);
  overflow: hidden;
  background: transparent;
}

.plate { position: absolute; inset: 0; visibility: hidden; }
.plate.on { visibility: visible; }

/* 刮印动画：四个方向，硬切步进 */
body.splashing #layerSky.on   { animation: wipeDown 0.34s steps(8) both; }
body.splashing #layerHero.on  { animation: wipeRight 0.34s steps(8) both; }
body.splashing #layerField.on { animation: wipeLeft 0.3s steps(8) both; }
body.splashing #layerText.on  { animation: wipeUp 0.32s steps(8) both; }

@keyframes wipeDown  { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes wipeUp    { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
@keyframes wipeRight { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes wipeLeft  { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }

/* 第4版套印错位：位移 + 红青重影，摘除类名即硬对位 */
#layerText.misreg {
  transform: translate(5px, -4px);
  filter: drop-shadow(3px 0 0 rgba(200, 64, 46, 0.65))
          drop-shadow(-3px 0 0 rgba(63, 142, 155, 0.55));
}

/* ---------- 第1版：深空蓝 ---------- */

#layerSky { background: var(--sky); z-index: 1; }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }

/* 暮色横带（丝印色带，只铺右侧，避开左侧文字区） */
#duskBands { position: absolute; left: 50%; right: 0; top: 46%; }
#duskBands i { display: block; }
#duskBands i:nth-child(1) { height: 20px; background: var(--mustard); opacity: 0.42; margin-bottom: 9px; }
#duskBands i:nth-child(2) { height: 12px; background: var(--orange); opacity: 0.5; margin-bottom: 9px; }
#duskBands i:nth-child(3) { height: 7px;  background: var(--redDeep); opacity: 0.55; }

/* ---------- 第2版：主视觉（?art= 三选一） ---------- */

#layerHero { z-index: 2; }

.hero { position: absolute; display: none; }
.hero { filter: drop-shadow(5px 6px 0 rgba(10, 12, 18, 0.35)); }

body[data-art="arch"]   #heroArch   { display: block; right: -6vw;  top: 15vh; height: 64vh; }
body[data-art="pylons"] #heroPylons { display: block; right: -2vw;  bottom: 15vh; height: 62vh; }
body[data-art="fan"]    #heroFan    { display: block; right: -16vw; top: -6vh; height: 106vh; }

/* ---------- 第3版：步道金 ---------- */

#layerField { z-index: 3; }
#paths { position: absolute; inset: 0; width: 100%; height: 100%; }

#roundel {
  position: absolute;
  left: 2.5vw; top: 3.2vh;
  width: 54px; height: 54px;
}
body[data-art="fan"] #roundel { display: none; }

/* ---------- 第4版：文字版 ---------- */

#layerText { z-index: 4; }

/* 任务清单（导航） */
#menu {
  position: absolute;
  left: 5vw; top: 11vh;
  display: flex; flex-direction: column;
  gap: 3.1vh;
}

.entry {
  display: flex; align-items: baseline; gap: 16px;
  text-decoration: none;
  cursor: pointer;
  width: fit-content;
}

.entryIdx {
  font-family: var(--disp); font-weight: 600; font-size: 15px;
  color: var(--red);
  letter-spacing: 0.08em;
  min-width: 30px;
}

.entryBody { position: relative; }

.entryZh {
  display: block;
  font-weight: 700; font-size: 23px;
  color: var(--cream);
  letter-spacing: 0.34em;
  line-height: 1.15;
}

.entryEn {
  display: block;
  font-family: var(--disp); font-weight: 400; font-size: 12px;
  color: var(--mustard);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-top: 2px;
}

.entryBar {
  position: absolute; left: 0; bottom: -7px;
  height: 4px; width: 0;
  background: var(--red);
}

.entry:hover .entryBar, .entry.sel .entryBar {
  width: 100%;
  transition: width 0.22s steps(5);
}
.entry:hover .entryZh, .entry.sel .entryZh {
  text-shadow: 2px 0 0 rgba(200, 64, 46, 0.55), -2px 0 0 rgba(63, 142, 155, 0.5);
}
.entry:hover .entryIdx, .entry.sel .entryIdx {
  background: var(--red); color: var(--paper);
  padding: 0 4px; margin-left: -4px;
}

/* 标题块 */
#masthead {
  position: absolute;
  left: 5vw; bottom: 9vh;
}

#mastRedBar { width: 64px; height: 6px; background: var(--red); margin-bottom: 18px; }

#mastZh {
  font-weight: 900; font-size: clamp(30px, 3.6vw, 44px);
  color: var(--cream);
  letter-spacing: 0.18em;
  line-height: 1.2;
}

#mastEn {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(14px, 1.55vw, 19px);
  color: var(--mustard);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 8px;
}

#mastSub {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--paperDim);
  letter-spacing: 0.3em;
  margin-top: 14px;
}

/* 状态行与色条 */
#status {
  position: absolute;
  right: 3.2vw; bottom: calc(9vh + 4px);
  text-align: right;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--paperDim);
  line-height: 2.1;
}
#statusMsg { display: block; color: var(--mustard); min-height: 22px; }
#replay { color: inherit; text-decoration: none; cursor: pointer; }
#replay:hover { color: var(--cream); }

#stripes {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
}
#stripes i { display: block; height: 7px; }
#stripes i:nth-child(1) { background: var(--teal); }
#stripes i:nth-child(2) { background: var(--mustard); }
#stripes i:nth-child(3) { background: var(--red); }
#stripes i:nth-child(4) { background: var(--redDeep); }

/* ---------- 开屏遮罩 ---------- */

#splash { position: fixed; inset: 0; z-index: 40; }
body.homeReady #splash { display: none; }

#skipBtn {
  position: fixed; right: 30px; bottom: 34px; z-index: 46;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.3em;
  color: var(--inkDark); opacity: 0;
  cursor: pointer; user-select: none;
}
body.splashing #skipBtn { animation: fadeIn 0.4s 0.9s both; }
#skipBtn:hover { color: var(--red); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 0.8; } }

/* ---------- 响应式 ---------- */

@media (max-width: 1019px) {
  #marginNote { display: none; }
  body[data-art="arch"]   #heroArch   { height: 42vh; right: -24vw; top: 12vh; }
  body[data-art="pylons"] #heroPylons { height: 40vh; right: -20vw; bottom: 22vh; }
  body[data-art="fan"]    #heroFan    { height: 72vh; right: -34vw; top: -2vh; }
  #menu { top: 9vh; gap: 2.6vh; }
  .entryZh { font-size: 20px; }
  #masthead { bottom: 11vh; }
  #status { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
