/* 荒野猎境 · 剧情档案 */
:root {
  --s-bg: #060c08;
  --s-paper: #eee6d2;
  --s-dim: #cfc8b6;
  --s-muted: #8f998b;
  --s-gold: #e3bc6d;
  --s-cyan: #80e5d8;
  --s-red: #d1785f;
  --s-line: rgba(232, 224, 200, 0.14);
  --s-display: "Bodoni 72", "Didot", "Songti SC", "STSong", "SimSun", serif;
  --s-ui: "Bahnschrift", "DIN Alternate", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --s-mono: "Cascadia Mono", "Consolas", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.story-body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(36, 64, 46, 0.35), transparent 42%),
    radial-gradient(circle at 10% 30%, rgba(44, 36, 18, 0.28), transparent 45%),
    var(--s-bg);
  color: var(--s-paper);
  font-family: var(--s-ui);
  line-height: 1.7;
  overflow-x: hidden;
  overflow-y: auto;
}
.story-body a { color: inherit; text-decoration: none; }
.story-grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.story-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(4, 9, 6, 0.78);
  border-bottom: 1px solid rgba(232, 224, 200, 0.08);
  backdrop-filter: blur(14px);
}
.story-brand { display: flex; align-items: center; gap: 9px; font-family: var(--s-mono); font-size: 10px; letter-spacing: 0.18em; color: var(--s-dim); white-space: nowrap; }
.story-brand em { font-family: var(--s-display); font-size: 15px; font-style: normal; letter-spacing: 0.08em; color: var(--s-muted); }
.story-brand .hud-reticle { width: 13px; height: 13px; border: 1px solid var(--s-cyan); border-radius: 50%; position: relative; }
.story-brand .hud-reticle::after { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--s-gold); left: 4px; top: 4px; }
.story-links { display: flex; align-items: center; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.story-links a { color: var(--s-muted); font-size: 9px; letter-spacing: 0.12em; transition: color 0.2s; }
.story-links a:hover { color: var(--s-paper); }
.story-links .story-play { padding: 7px 13px; border: 1px solid var(--s-gold); color: var(--s-gold); }
.story-account { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding-left: 14px; border-left: 1px solid var(--s-line); }
.story-account span { font-size: 9px; color: var(--s-dim); }
.story-account a { font-size: 7.5px; color: var(--s-muted); letter-spacing: 0.06em; }
.story-account a:hover { color: var(--s-cyan); }

.story-hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.story-hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: saturate(0.62) brightness(0.52); transform: scale(1.02);
}
.story-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3, 8, 5, 0.94), rgba(3, 8, 5, 0.62) 55%, rgba(3, 8, 5, 0.88)),
    linear-gradient(0deg, var(--s-bg), transparent 30%, transparent 80%, rgba(3, 8, 5, 0.7));
}
.story-hero-inner { position: relative; z-index: 2; width: min(1260px, 90vw); margin: 0 auto; padding: 130px 0 90px; }
.story-eyebrow { color: var(--s-cyan); font-family: var(--s-mono); font-size: 8px; letter-spacing: 0.24em; margin-bottom: 26px; }
.story-hero h1 {
  margin: 0 0 24px; font-family: var(--s-display); font-size: clamp(54px, 8vw, 110px);
  font-weight: 400; line-height: 0.98; letter-spacing: 0.08em;
}
.story-hero h1 span { color: transparent; -webkit-text-stroke: 1px rgba(238, 230, 210, 0.42); }
.story-hero p { max-width: 660px; margin: 0 0 30px; color: rgba(238, 230, 210, 0.7); font-size: 12px; line-height: 2; }
.story-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.primary-btn, .ghost-btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 13px 22px;
  border: 1px solid var(--s-line); background: none; color: var(--s-paper);
  font-size: 10px; letter-spacing: 0.12em; cursor: pointer;
}
.primary-btn { background: var(--s-paper); color: #07100c; border-color: var(--s-paper); }
.primary-btn .btn-label, .primary-btn .btn-arrow, .primary-btn span { color: #07100c; }
.ghost-btn:hover, .primary-btn:hover { filter: brightness(1.06); }
.story-hero-stats {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: 46px; max-width: 760px;
  border-top: 1px solid var(--s-line); border-bottom: 1px solid var(--s-line);
}
.story-hero-stats > div { padding: 13px 26px 13px 0; margin-right: 26px; border-right: 1px solid var(--s-line); }
.story-hero-stats > div:last-child { border-right: none; }
.story-hero-stats span { display: block; color: var(--s-muted); font-size: 8px; letter-spacing: 0.14em; }
.story-hero-stats strong { display: block; margin-top: 4px; color: var(--s-dim); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; }
.story-hero-stats b { color: var(--s-gold); font-weight: 500; }
.story-scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--s-muted); font-family: var(--s-mono); font-size: 8px; letter-spacing: 0.2em; }

main { position: relative; z-index: 1; }
.story-campaign, .story-codex, .story-legendary, .story-scenes, .story-tips {
  width: min(1260px, 90vw); margin: 0 auto; padding: 90px 0 20px;
}
.story-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 34px; border-bottom: 1px solid var(--s-line); padding-bottom: 20px; }
.story-kicker { display: block; color: var(--s-gold); font-family: var(--s-mono); font-size: 8px; letter-spacing: 0.2em; }
.story-section-head h2 { margin: 8px 0 0; font-family: var(--s-display); font-size: clamp(30px, 4vw, 52px); font-weight: 400; letter-spacing: 0.08em; }
.story-section-head p { max-width: 460px; margin: 0; color: var(--s-muted); font-size: 10px; line-height: 1.9; }

.story-chapter-nav { position: sticky; top: 63px; z-index: 20; display: flex; gap: 4px; overflow-x: auto; padding: 10px 0; margin-bottom: 22px; background: rgba(6, 12, 8, 0.9); backdrop-filter: blur(10px); scrollbar-width: none; }
.story-chapter-nav::-webkit-scrollbar { display: none; }
.chapter-pill {
  flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--s-line); color: var(--s-muted);
  font-size: 8px; letter-spacing: 0.06em; cursor: pointer; background: none; white-space: nowrap;
}
.chapter-pill b { color: var(--s-gold); font-family: var(--s-mono); font-weight: 400; margin-right: 5px; }
.chapter-pill:hover, .chapter-pill.is-active { border-color: var(--s-gold); color: var(--s-paper); }
.chapter-block { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px; padding: 28px 0 46px; border-top: 1px solid var(--s-line); scroll-margin-top: 120px; }
.chapter-block:first-child { border-top: none; }
.chapter-side { position: sticky; top: 120px; align-self: start; }
.chapter-side .chapter-number { font-family: var(--s-display); font-size: 72px; line-height: 0.8; color: rgba(227, 188, 109, 0.25); }
.chapter-side h3 { margin: 10px 0 5px; font-family: var(--s-display); font-size: 28px; font-weight: 400; letter-spacing: 0.08em; }
.chapter-side .chapter-en { color: var(--s-muted); font-family: var(--s-mono); font-size: 7.5px; letter-spacing: 0.14em; }
.chapter-side .chapter-story { margin: 18px 0 0; color: rgba(238, 230, 210, 0.7); font-size: 10.5px; line-height: 2; white-space: pre-line; }
.chapter-side .chapter-quote { margin: 20px 0 0; padding-left: 12px; border-left: 2px solid var(--s-gold); color: var(--s-gold); font-family: var(--s-display); font-size: 13px; line-height: 1.8; }
.chapter-side .chapter-scene { margin-top: 16px; display: inline-flex; padding: 4px 8px; border: 1px solid var(--s-line); color: var(--s-muted); font-size: 8px; letter-spacing: 0.08em; }
.chapter-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start; }
.story-level {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 104px;
  padding: 11px 12px; border: 1px solid var(--s-line); background: linear-gradient(145deg, rgba(12, 22, 16, 0.9), rgba(6, 12, 9, 0.45));
  text-align: left; cursor: pointer; color: var(--s-dim); transition: border-color 0.2s, transform 0.2s;
}
.story-level::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--scene-color, var(--s-cyan)); opacity: 0.5; }
.story-level:hover { transform: translateY(-2px); border-color: rgba(227, 188, 109, 0.45); }
.story-level.is-locked { opacity: 0.44; cursor: not-allowed; }
.story-level.is-boss { background: linear-gradient(145deg, rgba(58, 32, 16, 0.55), rgba(10, 10, 8, 0.6)); }
.story-level-top { display: flex; justify-content: space-between; gap: 6px; color: var(--s-muted); font-family: var(--s-mono); font-size: 7.5px; }
.story-level-top b { color: var(--s-gold); font-weight: 400; }
.story-level-name { display: block; color: var(--s-paper); font-family: var(--s-display); font-size: 16px; letter-spacing: 0.05em; }
.story-level-beat { display: block; color: var(--s-muted); font-size: 8px; line-height: 1.6; flex: 1; }
.story-level-foot { display: flex; justify-content: space-between; align-items: center; color: var(--s-gold); font-size: 8px; letter-spacing: 0.08em; }
.story-level-foot span:last-child { font-family: var(--s-mono); color: var(--s-muted); }
.story-level .lock-ico { position: absolute; right: 10px; bottom: 10px; color: var(--s-muted); font-size: 11px; }

.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.codex-card { position: relative; padding: 18px; border: 1px solid var(--s-line); background: linear-gradient(150deg, rgba(13, 24, 17, 0.92), rgba(6, 12, 9, 0.5)); overflow: hidden; }
.codex-card::before { content: attr(data-glyph); position: absolute; right: 6px; top: -16px; font-family: var(--s-display); font-size: 92px; color: rgba(238, 230, 210, 0.045); line-height: 1; }
.codex-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.codex-name { font-family: var(--s-display); font-size: 23px; letter-spacing: 0.06em; }
.codex-en { color: var(--s-muted); font-family: var(--s-mono); font-size: 7px; letter-spacing: 0.1em; }
.codex-desc { margin: 10px 0 12px; color: rgba(238, 230, 210, 0.66); font-size: 9px; line-height: 1.85; }
.codex-stats { display: flex; gap: 14px; padding-top: 9px; border-top: 1px solid var(--s-line); color: var(--s-muted); font-size: 7.5px; flex-wrap: wrap; }
.codex-stats b { color: var(--s-dim); font-weight: 500; }
.danger-pips { color: var(--s-red); letter-spacing: 0.14em; }
.codex-hint { margin-top: 8px; color: var(--s-cyan); font-size: 8px; line-height: 1.65; }
.codex-card.danger { border-color: rgba(209, 120, 95, 0.35); }
.codex-card.danger .codex-name { color: #f0c1ae; }
.codex-art { position: relative; margin: -8px -8px 10px; height: 150px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: radial-gradient(ellipse at 50% 88%, rgba(227, 188, 109, 0.1), transparent 68%); }
.codex-art img { height: 100%; width: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5)); }
.codex-art.is-empty { align-items: center; }
.codex-art.is-empty span { font-family: var(--s-display); font-size: 64px; color: rgba(238, 230, 210, 0.12); }

.legend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.legend-card { position: relative; padding: 20px; border: 1px solid rgba(227, 188, 109, 0.3); background: linear-gradient(140deg, rgba(52, 33, 13, 0.55), rgba(8, 9, 7, 0.6)); overflow: hidden; }
.legend-card .legend-aura { position: absolute; inset: -40%; background: radial-gradient(circle, rgba(227, 188, 109, 0.14), transparent 62%); pointer-events: none; }
.legend-card.is-locked { filter: grayscale(0.6); opacity: 0.62; }
.legend-top { display: flex; justify-content: space-between; gap: 8px; color: var(--s-gold); font-family: var(--s-mono); font-size: 7px; letter-spacing: 0.12em; }
.legend-card h3 { margin: 10px 0 2px; font-family: var(--s-display); font-size: 26px; font-weight: 400; color: #f2d79b; letter-spacing: 0.06em; }
.legend-title { color: rgba(238, 230, 210, 0.55); font-size: 8px; letter-spacing: 0.06em; }
.legend-tagline { margin: 13px 0 9px; color: var(--s-gold); font-family: var(--s-display); font-size: 12px; line-height: 1.75; }
.legend-desc { margin: 0; color: rgba(238, 230, 210, 0.62); font-size: 9px; line-height: 1.85; }
.legend-foot { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 9px; border-top: 1px solid rgba(227, 188, 109, 0.18); color: var(--s-muted); font-size: 7.5px; }
.legend-foot b { color: var(--s-gold); font-weight: 500; }

.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.scene-card { position: relative; min-height: 210px; padding: 20px; border: 1px solid var(--s-line); overflow: hidden; background: var(--scene-gradient); }
.scene-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 9, 6, 0.92), rgba(4, 9, 6, 0.18)); }
.scene-card > * { position: relative; z-index: 1; }
.scene-glyph { position: absolute; right: 12px; top: 8px; z-index: 1; font-family: var(--s-display); font-size: 80px; color: rgba(238, 230, 210, 0.16); line-height: 1; }
.scene-card .scene-en { color: rgba(238, 230, 210, 0.5); font-family: var(--s-mono); font-size: 7.5px; letter-spacing: 0.14em; }
.scene-card h3 { margin: 5px 0 8px; font-family: var(--s-display); font-size: 30px; font-weight: 400; letter-spacing: 0.08em; }
.scene-card p { margin: 0 0 12px; max-width: 92%; color: rgba(238, 230, 210, 0.72); font-size: 9px; line-height: 1.9; }
.scene-features { display: flex; flex-wrap: wrap; gap: 4px; }
.scene-features span { padding: 3px 7px; border: 1px solid rgba(238, 230, 210, 0.22); font-size: 7.5px; color: var(--s-dim); }

.story-tips { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding-bottom: 90px; }
.story-tips h2 { margin: 8px 0 0; font-family: var(--s-display); font-size: 42px; font-weight: 400; letter-spacing: 0.08em; }
.story-tips ol { margin: 0; padding: 0; list-style: none; counter-reset: tips; }
.story-tips li { position: relative; counter-increment: tips; padding: 13px 0 13px 42px; border-bottom: 1px solid var(--s-line); color: rgba(238, 230, 210, 0.7); font-size: 10px; line-height: 1.8; }
.story-tips li::before { content: counter(tips, decimal-leading-zero); position: absolute; left: 0; top: 13px; color: var(--s-gold); font-family: var(--s-mono); font-size: 10px; }
.story-tips b { color: var(--s-paper); font-weight: 500; }
.story-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px clamp(16px, 4vw, 48px); border-top: 1px solid var(--s-line); color: var(--s-muted); font-family: var(--s-mono); font-size: 8px; letter-spacing: 0.1em; }
.story-footer a { color: var(--s-gold); }
.story-footer .story-brand a { text-decoration: none; border-bottom: 1px solid rgba(227, 188, 109, 0.35); }
.story-footer .story-brand a:hover { color: var(--s-paper); border-bottom-color: var(--s-gold); }

@media (max-width: 1040px) {
  .story-links { gap: 12px; }
  .story-account { display: none; }
  .chapter-block { grid-template-columns: 1fr; gap: 18px; }
  .chapter-side { position: static; display: grid; grid-template-columns: 74px 1fr; column-gap: 14px; }
  .chapter-side .chapter-number { grid-row: span 2; font-size: 56px; }
  .chapter-side .chapter-story, .chapter-side .chapter-quote { grid-column: 1 / -1; }
  .story-tips { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 720px) {
  .story-nav { padding: 10px 14px; gap: 12px; }
  .story-brand em { display: none; }
  .story-links a { font-size: 8px; }
  .story-links a:nth-child(2), .story-links a:nth-child(3), .story-links a:nth-child(4) { display: none; }
  .story-hero-inner { padding: 104px 0 64px; width: calc(100vw - 44px); }
  .story-hero h1 { font-size: 38px; line-height: 1.02; }
  .story-hero p { font-size: 10px; line-height: 1.85; width: 100%; max-width: 100%; overflow-wrap: anywhere; }
  .story-hero-actions { gap: 8px; }
  .story-hero-actions .primary-btn, .story-hero-actions .ghost-btn { padding: 10px 16px; font-size: 9px; }
  .story-hero-stats { margin-top: 30px; max-width: 100%; }
  .story-hero-stats > div { flex: 1 1 45%; padding: 9px 10px 9px 0; margin-right: 10px; }
  .story-hero-stats span { font-size: 7px; }
  .story-hero-stats strong { font-size: 9.5px; }
  .story-section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .story-section-head h2 { font-size: 28px; }
  .story-section-head p { font-size: 9px; line-height: 1.8; }
  .story-campaign, .story-codex, .story-legendary, .story-scenes, .story-tips { padding-top: 56px; }
  .story-chapter-nav { top: 55px; }
  .chapter-side h3 { font-size: 22px; }
  .chapter-side .chapter-story { font-size: 9.5px; line-height: 1.85; }
  .chapter-side .chapter-quote { font-size: 11px; }
  .chapter-levels { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px; }
  .story-level { min-height: 92px; padding: 9px 10px; }
  .story-level-name { font-size: 14px; }
  .story-level-beat { font-size: 7.5px; }
  .codex-grid, .legend-grid, .scene-grid { grid-template-columns: 1fr; gap: 8px; }
  .codex-name { font-size: 21px; }
  .codex-desc { font-size: 8.5px; }
  .legend-card { padding: 16px; }
  .legend-card h3 { font-size: 23px; }
  .legend-tagline { font-size: 11px; }
  .legend-desc { font-size: 8.5px; }
  .scene-card { min-height: 190px; padding: 16px; }
  .scene-card h3 { font-size: 26px; }
  .scene-card p { font-size: 8.5px; }
  .story-tips { padding-bottom: 56px; }
  .story-tips h2 { font-size: 32px; }
  .story-tips li { font-size: 9px; padding: 11px 0 11px 36px; }
  .story-footer { flex-direction: column; gap: 7px; align-items: flex-start; }
}
