/* 原 Google Fonts @import 已移除：fonts.googleapis.com 国内不可达会阻塞首屏。
   font-family 栈保留，已装 Noto 字体的设备仍生效，其余回退系统宋体/黑体。 */
:root {
  --bg: #050508;
  --surface: #0e0e14;
  --elevated: #16161e;
  --fg: #ebe8e2;
  --muted: #8a8580;
  --accent: #9b1c1c;
  --cream: #c9b896;
  --line: #2a2a32;
  --gold: #b8975a;
  --cyan: #6a8a9a;
  --font-display: "STLiti", "LiSu", "隶书", "KaiTi", "STKaiti", "楷体", "Songti SC", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --radius: 12px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100dvh;
}
a { color: var(--cream); text-decoration: none; }
a:hover { color: #e8d7b0; }
img { max-width: 100%; display: block; height: auto; }

/* 黑金渐变标题：logo / 页头大标题 / 区块标题（不支持的浏览器回退原金色） */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .nav-brand, .act h1, .act h2, h2 {
    background: linear-gradient(165deg, #3d2f14 0%, #8a6f3c 30%, #e8d5a0 50%, #b8975a 68%, #2e2310 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

#fog {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.35;
}

/* Nav — transparent, solidifies on scroll via class */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.5rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s, backdrop-filter .35s;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-brand {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
}
.nav-brand span {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.28em;
  color: var(--muted);
  font-family: var(--font-sans);
  font-weight: 500;
  margin-top: 0.15rem;
}
.nav-links {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.15rem;
  list-style: none; margin: 0; padding: 0;
  font-size: 0.88rem;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-cta {
  padding: 0.45rem 0.95rem;
  border: 1px solid color-mix(in oklab, var(--accent) 70%, var(--gold));
  background: color-mix(in oklab, var(--accent) 35%, transparent);
  border-radius: 4px;
  color: var(--fg) !important;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

/* Full-screen acts */
.act {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.act-bg {
  position: absolute; inset: 0;
  background: center/cover no-repeat;
  filter: brightness(0.42) saturate(0.85);
  z-index: -2;
  transform: scale(1.05);
}
.act-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5,5,8,0.55) 0%,
    rgba(5,5,8,0.25) 40%,
    rgba(5,5,8,0.85) 100%
  );
}
.act-content {
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  max-width: 720px;
}
.act-seal {
  display: inline-block;
  border: 1px solid color-mix(in oklab, var(--accent) 80%, transparent);
  color: color-mix(in oklab, var(--accent) 90%, #fff);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}
.act h1, .act h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  margin: 0 0 0.6rem;
  color: var(--gold);
  text-shadow: 0 4px 40px rgba(0,0,0,0.8);
}
.act h1 { font-size: clamp(2.6rem, 8vw, 4.2rem); }
.act h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); color: var(--fg); }
/* 幽冥质感：页头大标题隔雾微虚 + 金辉/青绿阴气多层光晕 */
.act h1 {
  filter: blur(.3px);
  text-shadow:
    0 0 14px rgba(232,213,160,.35),
    0 0 40px rgba(78,168,160,.28),
    0 4px 40px rgba(0,0,0,.8);
}
h2 {
  text-shadow:
    0 0 10px rgba(232,213,160,.22),
    0 0 28px rgba(78,168,160,.16);
}
.act .en {
  letter-spacing: 0.42em;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}
.act .tagline {
  color: var(--cream);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
.act .hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 2rem;
}
.act-actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.35rem;
  border-radius: 4px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.btn-primary {
  background: var(--accent);
  border-color: #b02525;
  color: #fff !important;
}
.btn-primary:hover { background: #b02525; }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted) !important;
}
.btn-ghost:hover { color: var(--fg) !important; border-color: var(--muted); }
.btn.is-disabled, a.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.scroll-cue {
  position: absolute;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  z-index: 3;
}

/* Content sections */
.section {
  position: relative;
  z-index: 2;
  padding: 4.5rem 0;
}
.section.tint-hq { background: linear-gradient(180deg, #0a080c 0%, #120a10 100%); }
.section.tint-wc { background: linear-gradient(180deg, #080c10 0%, #0a1014 100%); }
.section.tint-nh { background: linear-gradient(180deg, #0c0c10 0%, #101018 100%); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.section-title {
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  font-size: 1.55rem;
  margin: 0 0 0.5rem;
  color: var(--cream);
}
.section-sub {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 36rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: color-mix(in oklab, var(--gold) 40%, var(--line)); transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; background: #0a0a0e; }
.card img.landscape { aspect-ratio: 16/10; }
.card-body { padding: 1rem 1.1rem 1.2rem; }
.card-body h3 {
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.card-body p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.card-body .meta {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

/* Map nodes */
.map-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 700px) { .map-board { grid-template-columns: 1fr 1fr; } }
.map-node {
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  transition: border-color .2s, background .2s;
}
.map-node:hover {
  border-color: var(--gold);
  background: color-mix(in oklab, var(--elevated) 80%, #2a2010);
}
.map-node strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  margin-bottom: 0.25rem;
}
.map-node span { color: var(--muted); font-size: 0.82rem; }
.map-node .stars { color: var(--accent); letter-spacing: 0.05em; font-size: 0.8rem; margin-top: 0.35rem; }

/* 生死簿 */
.ledger {
  max-width: 420px;
  margin: 0 auto;
  background: #12100e;
  border: 2px solid color-mix(in oklab, var(--accent) 60%, #3a2010);
  border-radius: 4px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 0 0 1px #1a1008, 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
}
.ledger::before {
  content: "阴司";
  position: absolute;
  top: 1rem; right: 1rem;
  width: 3rem; height: 3rem;
  border: 2px solid color-mix(in oklab, var(--accent) 70%, transparent);
  color: color-mix(in oklab, var(--accent) 85%, #fff);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  display: grid; place-items: center;
  transform: rotate(-12deg);
  opacity: 0.85;
}
.ledger h3 {
  font-family: var(--font-display);
  text-align: center;
  letter-spacing: 0.4em;
  margin: 0 0 1.5rem;
  color: var(--gold);
}
.ledger dl {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.55rem 0.75rem;
  margin: 0;
  font-size: 0.95rem;
}
.ledger dt { color: var(--muted); }
.ledger dd { margin: 0; border-bottom: 1px dashed #2a2a28; padding-bottom: 0.2rem; color: var(--cream); }
.ledger .footer-note {
  text-align: center;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

/* Download box */
.download-box {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
@media (max-width: 700px) { .download-box { grid-template-columns: 1fr; } }

.footer {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}
.footer .credit { color: var(--cream); letter-spacing: 0.12em; margin-bottom: 0.35rem; }

code {
  font-size: 0.85em;
  color: var(--gold);
  background: #16161c;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.story {
  border-bottom: 1px solid var(--line);
  padding: 2rem 0;
}
.story h2 {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  margin: 0 0 0.35rem;
}
.story .meta { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.1em; margin-bottom: 1rem; }
.story .end { color: var(--muted); font-size: 0.9rem; margin-top: 1.25rem; }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.list time { color: var(--muted); font-size: 0.85rem; }

.progress-row {
  display: flex; justify-content: space-between;
  font-size: 0.9rem; margin-bottom: 0.4rem;
}
.bar {
  height: 6px; background: #1a1a22; border-radius: 3px; overflow: hidden; margin-bottom: 0.85rem;
}
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); }

.page > .section:first-of-type,
.page > header { position: relative; z-index: 2; }
