﻿/* ══════════════════════════════════════════════════════════════
   伊蒂亚斯 · 世界纪事
   A hand-bound codex for a world that is still being written.
   ══════════════════════════════════════════════════════════════ */

/* ── 01. Tokens ─────────────────────────────────────────────── */
:root {
  --ink: #07100f;
  --ink-2: #0a1513;
  --ink-3: #0e1c19;
  --ink-4: #13231f;
  --surface: rgba(16, 30, 26, 0.72);
  --surface-solid: #0e1b18;
  --surface-soft: rgba(23, 39, 34, 0.52);
  --gold: #c7a76b;
  --gold-bright: #ecd29b;
  --gold-dim: #8c7448;
  --paper: #e9e0cc;
  --paper-dim: #bcb5a4;
  --mist: #8fa39a;
  --mist-dark: #63776f;
  --cyan: #8bd9d2;
  --cyan-deep: #3a857f;
  --forest: #8ca978;
  --ember: #cb8d5b;
  --blood: #b56a63;
  --violet: #a98bbd;
  --rose: #cb9293;
  --stone: #a8a393;
  --void: #8c83a9;
  --line: rgba(199, 167, 107, 0.18);
  --line-strong: rgba(199, 167, 107, 0.34);
  --line-faint: rgba(226, 216, 191, 0.08);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.28);
  --radius: 3px;
  --radius-md: 8px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --display: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 82px;
  --gutter: clamp(22px, 4.8vw, 70px);
  --max: 1460px;
}

* { box-sizing: border-box; }
*::selection { background: rgba(199, 167, 107, 0.32); color: #fff9e9; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--gold-dim) var(--ink);
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }
html:not(.entry-seen) body { overflow: hidden; }
html.entry-seen .entry-film { display: none !important; }

/* ── Entry film ─────────────────────────────────────────────── */
.entry-film {
  position: fixed;
  inset: 0;
  z-index: 800;
  overflow: hidden;
  background: #020707;
  color: var(--paper);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.entry-film.is-leaving { opacity: 0; visibility: hidden; }
#entryCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.entry-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
.entry-frame { position: absolute; z-index: 3; inset: 18px; border: 1px solid rgba(199, 167, 107, 0.16); pointer-events: none; }
.entry-frame::before, .entry-frame::after { content: ""; position: absolute; width: 42px; height: 42px; border-color: rgba(199, 167, 107, 0.5); border-style: solid; }
.entry-frame::before { left: -1px; top: -1px; border-width: 1px 0 0 1px; }
.entry-frame::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }
.entry-topline {
  position: absolute;
  z-index: 5;
  top: 38px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: rgba(233, 224, 204, 0.4);
}
.entry-start {
  position: absolute;
  z-index: 6;
  left: var(--gutter);
  bottom: clamp(58px, 11vh, 130px);
  width: min(760px, calc(100vw - 2 * var(--gutter)));
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.entry-film.is-playing .entry-start { opacity: 0; transform: translateY(18px); pointer-events: none; }
.entry-eyebrow { font-family: var(--sans); font-size: 10px; letter-spacing: 0.22em; color: var(--gold); }
.entry-start h1 {
  margin: 20px 0 18px;
  font-family: var(--serif);
  font-size: clamp(68px, 10.3vw, 150px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: 0.05em;
  color: #eee2c8;
  text-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}
.entry-lede {
  max-width: 590px;
  font-family: var(--serif);
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 2;
  letter-spacing: 0.04em;
  color: rgba(235, 226, 207, 0.68);
}
.entry-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 9px; margin-top: 33px; }
.entry-begin {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 52px;
  padding: 0 21px;
  border: 1px solid transparent;
  background: linear-gradient(120deg, #e4ca93, #c3a265);
  color: #121410;
  text-align: left;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.entry-begin:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(188, 152, 91, 0.2); }
.entry-begin span { font-size: 13px; letter-spacing: 0.16em; }
.entry-begin small { font-size: 8px; letter-spacing: 0.08em; color: rgba(19, 23, 17, 0.6); }
.entry-silent {
  min-height: 52px;
  padding: 0 19px;
  border: 1px solid rgba(199, 167, 107, 0.3);
  background: rgba(3, 11, 9, 0.26);
  color: var(--paper-dim);
  font-size: 10px;
  letter-spacing: 0.1em;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.entry-silent:hover { color: var(--gold-bright); border-color: var(--gold-dim); background: rgba(199, 167, 107, 0.04); }
.entry-credit { margin-top: 19px; font-size: 8px; letter-spacing: 0.1em; color: rgba(233, 224, 204, 0.3); }
.entry-hud {
  position: absolute;
  z-index: 6;
  top: calc(38px + 34px);
  right: var(--gutter);
  display: flex;
  align-items: baseline;
  gap: 18px;
  text-align: right;
}
.entry-phase { font-family: var(--display); font-size: 8px; letter-spacing: 0.18em; color: var(--gold); }
.entry-year { font-family: var(--serif); font-size: 13px; letter-spacing: 0.08em; color: rgba(236, 226, 204, 0.5); }
.entry-progress {
  position: absolute;
  z-index: 6;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.entry-progress::before { content: ""; position: absolute; left: 0; right: 80px; top: 50%; height: 1px; background: rgba(233, 224, 204, 0.12); }
.entry-progress i { position: relative; z-index: 1; display: block; width: 0%; height: 1px; background: var(--gold); box-shadow: 0 0 9px rgba(199, 167, 107, 0.3); }
.entry-progress span { margin-left: auto; font-family: var(--display); font-size: 8px; letter-spacing: 0.12em; color: rgba(233, 224, 204, 0.35); white-space: nowrap; }
.entry-skip {
  position: absolute;
  z-index: 8;
  right: var(--gutter);
  bottom: 57px;
  padding: 8px 11px;
  border: 1px solid rgba(199, 167, 107, 0.13);
  background: rgba(3, 10, 8, 0.18);
  color: rgba(233, 224, 204, 0.42);
  font-size: 9px;
  letter-spacing: 0.08em;
  transition: color 0.25s, border-color 0.25s;
}
.entry-skip:hover { color: var(--gold-bright); border-color: rgba(199, 167, 107, 0.35); }
.entry-film.is-playing .entry-hud, .entry-film.is-playing .entry-progress { display: flex; }
.entry-film:not(.is-playing) .entry-hud, .entry-film:not(.is-playing) .entry-progress { display: none; }
.entry-end {
  position: absolute;
  z-index: 7;
  left: var(--gutter);
  bottom: clamp(75px, 13vh, 145px);
  width: min(620px, calc(100vw - 2 * var(--gutter)));
  text-align: left;
  animation: entry-end-in 1.3s var(--ease) both;
}
@keyframes entry-end-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.entry-end h2 {
  margin: 16px 0 17px;
  font-family: var(--serif);
  font-size: clamp(49px, 6.5vw, 92px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  color: #eee2c8;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}
.entry-end > p:not(.entry-eyebrow) { font-family: var(--serif); font-size: 14px; line-height: 1.9; letter-spacing: 0.05em; color: rgba(235, 226, 207, 0.55); }
.entry-end-actions { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.entry-enter { align-items: flex-start; flex-direction: column; gap: 3px; }
.entry-film.is-complete .entry-hud { opacity: 0.3; }
.entry-film.is-complete .entry-progress { opacity: 0; }

.music-toggle { position: relative; color: var(--gold-dim); }
.music-toggle:not(.is-enabled) { color: var(--mist-dark); opacity: 0.75; }
.music-toggle.is-playing { color: var(--gold-bright); border-color: var(--line-strong); background: rgba(199, 167, 107, 0.045); }
.music-toggle svg { width: 16px; height: 16px; }
.music-pulse { position: absolute; right: 8px; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); opacity: 0; box-shadow: 0 0 7px var(--cyan); }
.music-toggle.is-playing .music-pulse { opacity: 1; animation: blink 1.8s ease-in-out infinite; }
.music-toggle.is-error { color: var(--blood); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; align-items: center; margin-top: 5px; }
.footer-links a, .footer-links button { font-size: 8px; letter-spacing: 0.05em; color: var(--mist-dark); border: 0; background: none; padding: 0; transition: color 0.25s; }
.footer-links a:hover, .footer-links button:hover { color: var(--gold); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #07100f; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold-dim), #55452b);
  border: 3px solid #07100f;
  border-radius: 8px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { display: block; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 4px;
}

.nojs-banner { position: relative; z-index: 999; padding: 12px 20px; background: #4c3123; color: #f4e4c9; text-align: center; font-size: 12px; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.svg-defs symbol { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg use { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.button-play svg use, .play-button svg use, .cinema-play svg use { fill: currentColor; stroke: none; }

/* ── 02. Atmosphere ─────────────────────────────────────────── */
.site-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 85% at 76% 0%, rgba(32, 77, 67, 0.25), transparent 56%),
    radial-gradient(90% 70% at 0% 40%, rgba(85, 63, 39, 0.13), transparent 66%),
    linear-gradient(180deg, #07100f 0%, #08110f 38%, #07100f 100%);
}

.ambient-glow {
  position: absolute;
  width: 55vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
}
.ambient-glow-a {
  top: -30vw;
  right: -5vw;
  background: radial-gradient(circle, rgba(47, 110, 97, 0.34), transparent 66%);
}
.ambient-glow-b {
  bottom: -36vw;
  left: -16vw;
  background: radial-gradient(circle, rgba(112, 83, 43, 0.22), transparent 66%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(197, 173, 119, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(197, 173, 119, 0.06) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 20%, transparent 100%);
}

.ambient-stars {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(236, 210, 155, 0.9), transparent 1.5px),
    radial-gradient(1px 1px at 38% 8%, rgba(139, 217, 210, 0.8), transparent 1.5px),
    radial-gradient(1.5px 1.5px at 66% 17%, rgba(236, 210, 155, 0.7), transparent 2px),
    radial-gradient(1px 1px at 84% 33%, rgba(236, 210, 155, 0.8), transparent 1.5px),
    radial-gradient(1px 1px at 21% 63%, rgba(139, 217, 210, 0.6), transparent 1.5px),
    radial-gradient(1.2px 1.2px at 74% 58%, rgba(236, 210, 155, 0.7), transparent 2px),
    radial-gradient(1px 1px at 91% 78%, rgba(139, 217, 210, 0.6), transparent 1.5px),
    radial-gradient(1px 1px at 8% 86%, rgba(236, 210, 155, 0.6), transparent 1.5px);
  background-size: 620px 620px, 480px 480px, 700px 700px, 540px 540px, 660px 660px, 520px 520px, 600px 600px, 460px 460px;
  animation: star-drift 90s linear infinite alternate;
}

.ambient-grain {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

@keyframes star-drift {
  to { background-position: 120px 60px, -80px 40px, 90px -30px, -50px 70px, 40px -90px, -110px 30px, 80px 80px, -60px -40px; }
}

/* ── 03. Global type ────────────────────────────────────────── */
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.24em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow-line { width: 32px; height: 1px; background: var(--gold-dim); display: inline-block; }

.fineprint {
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: var(--mist-dark);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 4px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.3s, color 0.3s, gap 0.3s;
}
.text-link svg { width: 14px; height: 14px; }
.text-link:hover { color: #fff1cf; border-color: var(--gold); gap: 14px; }

.text-button {
  border: 0;
  background: none;
  color: var(--mist);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 4px;
  transition: color 0.25s;
}
.text-button:hover { color: var(--gold-bright); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.button svg { width: 16px; height: 16px; }
.button:hover { transform: translateY(-2px); }
.button-primary {
  color: #101410;
  background: linear-gradient(120deg, #e1c68f, #c3a265 58%, #d7bb83);
  box-shadow: 0 12px 30px rgba(174, 139, 81, 0.14);
}
.button-primary:hover { box-shadow: 0 18px 36px rgba(174, 139, 81, 0.24); }
.button-ghost {
  color: var(--paper);
  border-color: var(--line-strong);
  background: rgba(9, 18, 16, 0.32);
  backdrop-filter: blur(8px);
}
.button-ghost:hover { border-color: var(--gold); background: rgba(199, 167, 107, 0.07); }
.button-play {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-bright);
}
.button-play svg { width: 9px; height: 9px; fill: currentColor; stroke: none; margin-left: 2px; }
.button-quiet {
  border-color: var(--line);
  background: rgba(8, 17, 15, 0.36);
  color: var(--paper-dim);
  letter-spacing: 0.08em;
  min-height: 40px;
  padding: 0 16px;
}
.button-quiet:hover { color: var(--gold-bright); border-color: var(--line-strong); }
.button-small { min-height: 38px; padding: 0 15px; font-size: 11px; gap: 7px; }
.button-small svg { width: 13px; height: 13px; }

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(7, 16, 15, 0.28);
  color: var(--paper-dim);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.icon-button svg { width: 17px; height: 17px; }
.icon-button:hover { color: var(--gold-bright); border-color: var(--line-strong); background: rgba(199, 167, 107, 0.06); }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.dot-church { background: var(--blood); box-shadow: 0 0 8px rgba(181, 106, 99, 0.7); }
.dot-demon { background: var(--ember); box-shadow: 0 0 8px rgba(203, 141, 91, 0.65); }
.dot-forest { background: var(--forest); box-shadow: 0 0 8px rgba(140, 169, 120, 0.65); }

/* ── 04. Topbar and nav ─────────────────────────────────────── */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, height 0.4s, backdrop-filter 0.4s;
}
.topbar.is-scrolled {
  height: 68px;
  background: rgba(6, 14, 12, 0.82);
  border-bottom-color: var(--line-faint);
  backdrop-filter: blur(22px) saturate(120%);
}
.brand { display: inline-flex; align-items: center; gap: 13px; flex: 0 0 auto; }
.brand-mark { display: block; width: 34px; height: 34px; color: var(--gold); }
.brand-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 0.9; }
.brand-mark circle { fill: var(--cyan); stroke: none; filter: drop-shadow(0 0 6px rgba(139, 217, 210, 0.6)); }
.brand-type { display: flex; flex-direction: column; line-height: 1; gap: 6px; }
.brand-type strong { font-family: var(--serif); font-weight: 500; font-size: 17px; letter-spacing: 0.18em; color: var(--paper); }
.brand-type em { font-family: var(--display); font-style: normal; font-size: 8px; letter-spacing: 0.46em; color: var(--gold-dim); }

.main-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 38px); }
.main-nav a {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--mist);
  padding: 12px 0;
  transition: color 0.3s;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width 0.35s var(--ease);
}
.main-nav a:hover { color: var(--paper); }
.main-nav a.is-active { color: var(--gold-bright); }
.main-nav a.is-active::after { width: 18px; }

.topbar-tools { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.year-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: rgba(9, 18, 16, 0.4);
  transition: border-color 0.3s, background 0.3s;
}
.year-chip:hover { border-color: var(--line-strong); background: rgba(199, 167, 107, 0.05); }
.year-chip-eyebrow { font-family: var(--display); font-size: 7px; letter-spacing: 0.2em; color: var(--mist-dark); }
.year-chip-value { display: flex; align-items: baseline; gap: 3px; }
.year-chip-value strong { font-family: var(--display); font-weight: 400; font-size: 16px; line-height: 1; color: var(--gold-bright); letter-spacing: 0.04em; }
.year-chip-value small { font-size: 9px; color: var(--mist); }
.menu-toggle { display: none; }

.mobile-menu {
  position: fixed;
  z-index: 99;
  inset: var(--nav-h) 0 auto;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  flex-direction: column;
  padding: 28px var(--gutter) 34px;
  background: rgba(5, 12, 10, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(24px);
}
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-faint);
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.12em;
}
.mobile-menu nav a span { font-family: var(--display); font-size: 9px; letter-spacing: 0.2em; color: var(--gold-dim); }
.mobile-menu nav a.is-active { color: var(--gold-bright); }
.mobile-menu p { margin-top: auto; padding-top: 24px; font-family: var(--serif); color: var(--mist-dark); font-size: 13px; line-height: 2; }

/* ── 05. Views & hero ───────────────────────────────────────── */
.view { display: none; }
.view.is-active { display: block; animation: view-in 0.7s var(--ease) both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ── 08a. 13-second opening trailer ────────────────────────── */
.trailer-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(96px, 12vh, 150px) clamp(20px, 5vw, 70px) clamp(48px, 7vw, 80px);
  background:
    radial-gradient(70% 60% at 50% 35%, rgba(30, 55, 48, 0.24), transparent 70%),
    #020606;
  border-bottom: 1px solid var(--line-faint);
  scroll-margin-top: 80px;
}
.trailer-inner { width: min(1180px, 100%); margin: 0 auto; }
.trailer-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 26px;
}
.trailer-heading h2 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: clamp(54px, 8vw, 92px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  color: var(--paper);
}
.trailer-heading .section-side-copy { max-width: 300px; text-align: right; }
.trailer-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}
.trailer-stage::before,
.trailer-stage::after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(199, 167, 107, 0.35);
  pointer-events: none;
}
.trailer-stage::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.trailer-stage::after { right: 10px; bottom: 10px; border-width: 0 1px 1px 0; }
.trailer-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.trailer-play {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 20px;
  border: 1px solid rgba(231, 220, 197, 0.4);
  background: rgba(4, 7, 7, 0.64);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.14em;
  backdrop-filter: blur(8px);
  transition: opacity 0.3s, background 0.3s, border-color 0.3s;
}
.trailer-play:hover { background: rgba(199, 167, 107, 0.16); border-color: var(--gold); }
.trailer-play svg { width: 15px; height: 15px; }
.trailer-stage.is-playing .trailer-play,
.trailer-stage.is-ended .trailer-play { opacity: 0; pointer-events: none; }
.trailer-stamp {
  position: absolute;
  z-index: 4;
  top: 17px;
  right: 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: rgba(235, 226, 207, 0.5);
  pointer-events: none;
}
.trailer-stamp span { font-family: var(--display); font-size: 8px; letter-spacing: 0.18em; }
.trailer-stamp strong { font-family: var(--serif); font-size: 14px; font-weight: 400; color: var(--gold); }
.trailer-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-top: 15px;
}
.trailer-meta p { max-width: 640px; color: var(--mist-dark); font-size: 11px; line-height: 1.9; }
.trailer-chapters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 17px; padding-top: 2px; }
.trailer-chapters span { display: inline-flex; align-items: baseline; gap: 6px; color: var(--mist); font-size: 9px; letter-spacing: 0.05em; white-space: nowrap; }
.trailer-chapters i { font-family: var(--display); font-style: normal; font-size: 7px; color: var(--gold-dim); }
@media (max-width: 760px) {
  .trailer-section { min-height: auto; padding-top: 104px; }
  .trailer-heading { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
  .trailer-heading .section-side-copy { text-align: left; max-width: none; }
  .trailer-meta { flex-direction: column; gap: 13px; }
  .trailer-chapters { justify-content: flex-start; }
  .trailer-stamp { top: 12px; right: 13px; }
  .trailer-stamp span { display: none; }
}

.hero {
  position: relative;
  min-height: 100svh;
  max-width: 1540px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 74px) var(--gutter) 116px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
  align-items: center;
  gap: clamp(20px, 4vw, 80px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 84%;
  background:
    radial-gradient(56% 72% at 72% 47%, rgba(43, 104, 93, 0.13), transparent 70%),
    linear-gradient(90deg, transparent 0%, transparent 66%, rgba(199, 167, 107, 0.02) 100%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; max-width: 730px; }
.hero-title { display: flex; flex-direction: column; gap: 10px; margin: 34px 0 18px; }
.hero-title-cn {
  display: block;
  font-family: var(--serif);
  font-size: clamp(74px, 9.6vw, 148px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: 0.035em;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(110deg, #a9a28f 2%, #f4e5c4 31%, #cbb078 58%, #f0dfbd 77%, #7f735c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.38));
}
.hero-title-en {
  align-self: flex-end;
  padding-right: 0.1em;
  font-family: var(--display);
  font-size: clamp(17px, 2.3vw, 33px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.42em;
  line-height: 1;
  color: var(--gold-dim);
}
.hero-subtitle {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.52em;
  color: var(--gold-dim);
  margin-bottom: 34px;
}
.hero-intro {
  max-width: 620px;
  padding-left: 20px;
  border-left: 1px solid var(--line-strong);
  color: #beb7a6;
  font-size: 14px;
  line-height: 2.15;
  letter-spacing: 0.04em;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 38px; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 3.2vw, 52px);
  margin-top: 66px;
  padding-top: 24px;
  border-top: 1px solid var(--line-faint);
}
.hero-stats div { display: flex; flex-direction: column; gap: 8px; }
.hero-stats dt { font-size: 9px; letter-spacing: 0.15em; color: var(--mist-dark); }
.hero-stats dd { display: flex; align-items: baseline; gap: 4px; }
.hero-stats strong { font-family: var(--display); font-size: 28px; font-weight: 400; line-height: 1; color: var(--paper); }
.hero-stats span { font-size: 9px; letter-spacing: 0.08em; color: var(--mist); }

.hero-art {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.22, 0.7, 0.18, 1);
  will-change: transform;
}
.hero-lights {
  position: absolute;
  inset: 6%;
  z-index: 1;
  width: 88%;
  height: 88%;
  pointer-events: none;
  opacity: 0.75;
  mix-blend-mode: screen;
}
.hero-art .seal-wrap { transform: translateZ(32px); }
.hero-art-label { z-index: 3; }
.hero-art-label,
.hero-side-note { transform: translateZ(18px); }
.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
  background: var(--line-faint);
}
.hero-art::before { top: 7%; bottom: 7%; left: 50%; width: 1px; }
.hero-art::after { left: 8%; right: 8%; top: 50%; height: 1px; }
.hero-art-label {
  position: absolute;
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
}
.hero-art-label-top { top: 7%; left: 13%; }
.hero-art-label-bottom { bottom: 7%; right: 13%; }
.seal-wrap { position: relative; width: min(100%, 560px); aspect-ratio: 1; z-index: 2; }
.world-seal { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 24px 70px rgba(0, 0, 0, 0.24)); }
.seal-orbit-a { transform-origin: 280px 280px; animation: spin 90s linear infinite; }
.seal-orbit-b { transform-origin: 280px 280px; animation: spin-reverse 64s linear infinite; }
.seal-lines { animation: seal-breathe 9s ease-in-out infinite; transform-origin: 280px 280px; }
.seal-crown { filter: drop-shadow(0 0 18px rgba(236, 210, 155, 0.24)); }
.seal-nodes text { fill: var(--gold-dim); font-size: 8px; letter-spacing: 0.16em; font-family: var(--sans); }
.seal-nodes circle { filter: drop-shadow(0 0 8px currentColor); }
.seal-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 25%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(236, 210, 155, 0.2), rgba(139, 217, 210, 0.08) 38%, transparent 70%);
  filter: blur(20px);
  animation: pulse-soft 7s ease-in-out infinite;
}
.hero-side-note {
  position: absolute;
  right: 2%;
  bottom: 17%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
  writing-mode: vertical-rl;
  z-index: 3;
}
.hero-side-note span { font-size: 8px; letter-spacing: 0.22em; color: var(--mist-dark); }
.hero-side-note strong { font-family: var(--serif); font-weight: 400; font-size: 12px; letter-spacing: 0.18em; color: var(--gold); }
.hero-scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 34px;
  display: none;
  align-items: center;
  align-items: center;
  gap: 13px;
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.25em;
  color: var(--mist-dark);
  writing-mode: vertical-rl;
}
.hero-scroll i { width: 1px; height: 40px; background: linear-gradient(var(--gold-dim), transparent); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }
@keyframes seal-breathe { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes pulse-soft { 0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.92); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } }

/* ── 06. World banner & shared sections ─────────────────────── */
.world-banner {
  position: relative;
  max-width: calc(var(--max) + 2 * var(--gutter));
  height: clamp(420px, 52vw, 680px);
  margin: 0 auto;
  overflow: hidden;
  border-top: 1px solid var(--line-faint);
  border-bottom: 1px solid var(--line-faint);
}
.world-banner-media { position: absolute; inset: 0; }
.world-banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  filter: saturate(0.78) brightness(0.68) contrast(1.04);
  transform: scale(1.055) translate3d(var(--banner-x, 0px), var(--banner-y, 0px), 0);
  transition: transform 0.7s cubic-bezier(0.22, 0.7, 0.18, 1);
  will-change: transform;
}
.world-banner-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 12, 10, 0.85) 0%, rgba(5, 12, 10, 0.44) 38%, transparent 66%),
    linear-gradient(0deg, rgba(5, 12, 10, 0.86) 0%, transparent 48%),
    linear-gradient(180deg, rgba(5, 12, 10, 0.4), transparent 28%);
}
.world-banner-copy {
  position: absolute;
  left: clamp(28px, 7vw, 110px);
  bottom: clamp(40px, 8vw, 100px);
  max-width: 680px;
}
.world-banner-copy h2 {
  max-width: 780px;
  margin: 18px 0 22px;
  font-size: clamp(24px, 3.4vw, 44px);
  line-height: 1.45;
  letter-spacing: 0.035em;
  color: #f2e8d3;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}
.world-banner-copy > p:last-child { font-family: var(--serif); font-size: 12px; letter-spacing: 0.2em; color: var(--gold); }
.world-banner-coords {
  position: absolute;
  right: clamp(24px, 5vw, 68px);
  bottom: clamp(36px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  font-family: var(--display);
  text-align: right;
  color: rgba(236, 226, 204, 0.72);
}
.world-banner-coords span { font-size: 8px; letter-spacing: 0.28em; color: var(--gold); }
.world-banner-coords strong { font-size: 22px; font-weight: 400; letter-spacing: 0.08em; }
.world-banner-coords small { font-size: 7px; letter-spacing: 0.18em; color: rgba(236, 226, 204, 0.42); }
@keyframes banner-drift { to { transform: scale(1.06) translate3d(-1.2%, -0.8%, 0); } }

.section {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(88px, 10vw, 150px) var(--gutter);
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
}
.section-heading h2 {
  font-size: clamp(32px, 4.6vw, 62px);
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--paper);
  margin-top: 15px;
}
.section-side-copy {
  max-width: 360px;
  font-size: 12px;
  line-height: 2;
  color: var(--mist-dark);
  text-align: right;
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ── 07. Preface ────────────────────────────────────────────── */
.section-index {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 46px;
  color: var(--gold-dim);
}
.section-index span { font-family: var(--display); font-size: 11px; letter-spacing: 0.1em; }
.section-index i { width: 64px; height: 1px; background: var(--line); }
.section-index small { font-family: var(--display); font-size: 7px; letter-spacing: 0.3em; }
.preface-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.preface-lead .eyebrow { margin-bottom: 22px; }
.preface-lead h2 {
  font-size: clamp(35px, 5vw, 65px);
  line-height: 1.32;
  letter-spacing: 0.04em;
  color: #ece2ce;
}
.lead-copy {
  margin-top: 34px;
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 2.05;
  letter-spacing: 0.03em;
  color: #cfc6b2;
}
.body-copy {
  margin-top: 22px;
  max-width: 570px;
  font-size: 13px;
  line-height: 2.1;
  color: var(--mist);
}
.preface-lead .text-link { margin-top: 34px; }
.preface-cards { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.preface-card {
  position: relative;
  padding: 31px 0 31px 26px;
  border-bottom: 1px solid var(--line-faint);
  transition: padding 0.45s var(--ease), background 0.45s, transform 0.45s var(--ease);
  transform: perspective(900px) rotateX(var(--card-x, 0deg)) rotateY(var(--card-y, 0deg));
  transform-style: preserve-3d;
}
.preface-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 31px;
  bottom: 31px;
  width: 1px;
  background: var(--line);
  transition: background 0.4s, top 0.4s, bottom 0.4s;
}
.preface-card:hover { padding-left: 34px; background: linear-gradient(90deg, rgba(199, 167, 107, 0.04), transparent 70%); }
.preface-card:hover::before { background: var(--gold); top: 22px; bottom: 22px; }
.preface-card-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.preface-card-top span { font-family: var(--display); font-size: 11px; color: var(--gold-dim); }
.preface-card-top small { font-family: var(--display); font-size: 7px; letter-spacing: 0.24em; color: var(--mist-dark); }
.preface-card h3 { margin: 13px 0 10px; font-size: 22px; letter-spacing: 0.08em; color: var(--paper); }
.preface-card p { max-width: 490px; font-size: 12px; line-height: 1.95; color: var(--mist); }
.card-corner { display: block; margin-top: 14px; font-size: 9px; letter-spacing: 0.1em; color: var(--gold-dim); }

/* ── 08. Cinema ─────────────────────────────────────────────── */
.cinema-section { padding-top: clamp(20px, 4vw, 60px); }
.cinema-heading { margin-bottom: 30px; }
.cinema-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #030908;
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.42);
  isolation: isolate;
}
.cinema-shell::before,
.cinema-shell::after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-color: var(--gold-dim);
  border-style: solid;
  pointer-events: none;
  opacity: 0.55;
}
.cinema-shell::before { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.cinema-shell::after { right: 12px; bottom: 12px; border-width: 0 1px 1px 0; }
#originCanvas { width: 100%; height: 100%; display: block; }
.cinema-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 48%, transparent 36%, rgba(0, 0, 0, 0.36) 100%);
}
.cinema-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, 0.06) 2px 3px);
  mix-blend-mode: overlay;
}
.cinema-title {
  position: absolute;
  z-index: 3;
  top: clamp(25px, 4vw, 52px);
  left: clamp(25px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
  transition: opacity 1.2s;
}
.cinema-title span { font-family: var(--display); font-size: 7px; letter-spacing: 0.38em; color: var(--gold); }
.cinema-title strong { font-family: var(--serif); font-weight: 400; font-size: clamp(19px, 2.6vw, 31px); letter-spacing: 0.14em; color: rgba(243, 234, 213, 0.9); }
.cinema-subtitle {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(76px, 11vw, 120px);
  width: min(76%, 820px);
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(14px, 1.7vw, 21px);
  line-height: 1.9;
  text-align: center;
  letter-spacing: 0.08em;
  color: #f1e7d4;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.8);
  transition: opacity 0.45s;
  pointer-events: none;
}
.cinema-subtitle.is-changing { opacity: 0; }
.cinema-controls {
  position: absolute;
  z-index: 5;
  left: clamp(20px, 3vw, 42px);
  right: clamp(20px, 3vw, 42px);
  bottom: clamp(17px, 2.5vw, 27px);
  display: flex;
  align-items: center;
  gap: 17px;
  padding-top: 12px;
  border-top: 1px solid rgba(199, 167, 107, 0.14);
}
.cinema-play, .cinema-replay {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(4, 10, 9, 0.55);
  color: var(--gold-bright);
  backdrop-filter: blur(6px);
}
.cinema-play svg, .cinema-replay svg { width: 13px; height: 13px; }
.cinema-play svg { fill: currentColor; stroke: none; margin-left: 2px; }
.cinema-track { flex: 1; position: relative; height: 12px; display: flex; align-items: center; }
.cinema-track::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: rgba(233, 224, 204, 0.16); }
.cinema-track-fill { position: absolute; left: 0; top: 50%; width: 0%; height: 1px; background: var(--gold); transform: translateY(-50%); box-shadow: 0 0 9px rgba(199, 167, 107, 0.5); }
.cinema-chapters { position: absolute; inset: 0; }
.cinema-chapters i { position: absolute; top: 50%; width: 1px; height: 5px; background: rgba(233, 224, 204, 0.26); transform: translateY(-50%); }
.cinema-time { font-family: var(--display); font-size: 9px; letter-spacing: 0.13em; color: rgba(233, 224, 204, 0.48); white-space: nowrap; }
.cinema-replay { width: 27px; height: 27px; border-color: transparent; color: rgba(233, 224, 204, 0.46); }
.cinema-replay:hover { color: var(--gold-bright); }
.cinema-section > .fineprint { margin-top: 16px; text-align: right; }

/* ── 08b. Interlude CG ──────────────────────────────────────── */
.cg-section { padding-top: clamp(30px, 5vw, 72px); scroll-margin-top: 96px; }
.cg-heading { margin-bottom: 28px; }
.cg-stage {
  position: relative;
  width: min(1080px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  background: #020505;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}
.cg-stage::before,
.cg-stage::after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(199, 167, 107, 0.35);
  pointer-events: none;
}
.cg-stage::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.cg-stage::after { right: 10px; bottom: 10px; border-width: 0 1px 1px 0; }
.cg-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.cg-play {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 19px;
  border: 1px solid rgba(231, 220, 197, 0.38);
  background: rgba(4, 7, 7, 0.62);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.14em;
  backdrop-filter: blur(8px);
  transition: opacity 0.3s, background 0.3s, border-color 0.3s;
}
.cg-play:hover { background: rgba(199, 167, 107, 0.16); border-color: var(--gold); }
.cg-play svg { width: 15px; height: 15px; }
.cg-stage.is-playing .cg-play,
.cg-stage.is-ended .cg-play { opacity: 0; pointer-events: none; }
.cg-stamp {
  position: absolute;
  z-index: 4;
  top: 17px;
  right: 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  pointer-events: none;
  color: rgba(235, 226, 207, 0.48);
}
.cg-stamp span { font-family: var(--display); font-size: 8px; letter-spacing: 0.18em; }
.cg-stamp strong { font-family: var(--serif); font-size: 14px; font-weight: 400; color: var(--gold); }
.cg-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  width: min(1080px, 100%);
  margin: 17px auto 0;
}
.cg-meta p { max-width: 590px; color: var(--mist-dark); font-size: 11px; line-height: 1.9; }
.cg-chapters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 17px; padding-top: 2px; }
.cg-chapters span { display: inline-flex; align-items: baseline; gap: 6px; color: var(--mist); font-size: 9px; letter-spacing: 0.06em; white-space: nowrap; }
.cg-chapters i { font-family: var(--display); font-style: normal; font-size: 7px; color: var(--gold-dim); }
@media (max-width: 720px) {
  .cg-meta { flex-direction: column; gap: 14px; }
  .cg-chapters { justify-content: flex-start; }
  .cg-play { padding: 11px 15px; font-size: 10px; }
  .cg-stamp { top: 12px; right: 13px; }
  .cg-stamp span { display: none; }
}

/* ── 09. Prologue reading ───────────────────────────────────── */
.chapter-section {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}
.chapter-visual { position: relative; }
.chapter-visual-frame {
  position: relative;
  aspect-ratio: 4 / 5.3;
  max-height: 700px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 35% at 48% 77%, rgba(178, 88, 45, 0.45), transparent 66%),
    radial-gradient(48% 40% at 50% 24%, rgba(92, 135, 128, 0.3), transparent 70%),
    linear-gradient(180deg, #0b1816 0%, #0b1513 48%, #10100d 100%);
  box-shadow: var(--shadow);
}
.chapter-visual-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 12, 10, 0.08), transparent 50%, rgba(5, 10, 9, 0.72)),
    radial-gradient(ellipse at 50% 42%, transparent 30%, rgba(0, 0, 0, 0.3) 100%);
}
.chapter-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
.tower {
  position: absolute;
  left: 50%;
  bottom: 22%;
  width: 12%;
  height: 48%;
  transform: translateX(-55%);
  background: linear-gradient(90deg, #050b09, #0a1210 45%, #040807);
  clip-path: polygon(18% 10%, 50% 0, 82% 10%, 90% 100%, 10% 100%);
  box-shadow: 0 0 70px rgba(211, 126, 73, 0.12);
  z-index: 2;
}
.tower::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 17%;
  height: 8%;
  transform: translateX(-50%);
  background: rgba(215, 154, 86, 0.44);
  box-shadow: 0 0 17px rgba(226, 153, 83, 0.34);
}
.sea {
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background:
    repeating-linear-gradient(178deg, transparent 0 9px, rgba(152, 177, 166, 0.08) 9px 10px, transparent 10px 20px),
    linear-gradient(180deg, rgba(8, 22, 20, 0.15), #060d0b 80%);
  z-index: 1;
}
.sea::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 17%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194, 141, 84, 0.4) 38%, rgba(235, 196, 131, 0.7) 55%, transparent 86%);
  box-shadow: 0 6px 15px rgba(171, 98, 54, 0.2);
}
.firelight {
  position: absolute;
  z-index: 2;
  left: 42%;
  bottom: 29%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 175, 95, 0.45), rgba(158, 70, 38, 0.16) 35%, transparent 68%);
  filter: blur(9px);
  animation: fire-flicker 4s ease-in-out infinite alternate;
}
.chapter-visual-caption {
  position: absolute;
  z-index: 4;
  left: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.chapter-visual-caption span { font-family: var(--display); font-size: 8px; letter-spacing: 0.28em; color: var(--gold); }
.chapter-visual-caption small { font-family: var(--display); font-size: 7px; letter-spacing: 0.19em; color: rgba(236, 225, 202, 0.4); }
@keyframes fire-flicker { 0% { opacity: 0.7; transform: scale(0.9) translateX(-4px); } 50% { opacity: 1; } 100% { opacity: 0.76; transform: scale(1.15) translateX(5px); } }
.chapter-copy { max-width: 650px; }
.chapter-copy h2 {
  font-size: clamp(31px, 4.1vw, 52px);
  line-height: 1.4;
  letter-spacing: 0.04em;
  margin: 18px 0 29px;
  color: #eee5d1;
}
.prose { color: #bdb6a7; font-family: var(--serif); font-size: 14px; line-height: 2.28; letter-spacing: 0.03em; }
.prose p { margin-bottom: 1.1em; }
.prose p:first-child::first-letter {
  float: left;
  margin: 8px 10px 0 0;
  font-family: var(--serif);
  font-size: 4.2em;
  line-height: 0.7;
  color: var(--gold);
}
.notes-details { margin-top: 30px; border-top: 1px solid var(--line); }
.notes-details summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 0;
  cursor: pointer;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.notes-details summary::-webkit-details-marker { display: none; }
.notes-details summary small { color: var(--mist-dark); font-size: 10px; }
.notes-details summary i { margin-left: auto; width: 9px; height: 9px; border-right: 1px solid var(--gold-dim); border-bottom: 1px solid var(--gold-dim); transform: rotate(45deg); transition: transform 0.3s; }
.notes-details[open] summary i { transform: rotate(225deg); }
.notes-details ul { list-style: none; padding: 4px 0 20px; margin: 0; display: flex; flex-direction: column; gap: 15px; }
.notes-details li { position: relative; padding-left: 20px; color: var(--mist); font-size: 12px; line-height: 1.9; }
.notes-details li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 7px; height: 1px; background: var(--gold-dim); }
.editorial-stamp { margin-top: 18px; font-size: 9px; letter-spacing: 0.16em; color: var(--mist-dark); text-transform: uppercase; }

/* ── 10. Secrets ────────────────────────────────────────────── */
.secrets-section { padding-top: 20px; }
.secret-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-faint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.secret-card {
  position: relative;
  min-height: 275px;
  padding: 29px 28px 24px;
  background: var(--ink);
  cursor: pointer;
  transition: background 0.4s;
}
.secret-card:hover { background: #0b1714; }
.secret-card::after {
  content: "◇";
  position: absolute;
  right: 25px;
  bottom: 21px;
  color: var(--gold-dim);
  font-size: 13px;
  transition: transform 0.4s, color 0.3s;
}
.secret-card:hover::after { transform: rotate(45deg); color: var(--gold-bright); }
.secret-status { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; letter-spacing: 0.15em; color: var(--gold); }
.secret-status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }
.secret-card h3 { margin: 28px 0 13px; font-size: 25px; letter-spacing: 0.06em; color: var(--paper); }
.secret-card p { max-width: 390px; font-size: 12px; line-height: 1.95; color: var(--mist); }
.secret-card .secret-tag { position: absolute; top: 27px; right: 27px; font-family: var(--display); font-size: 8px; letter-spacing: 0.2em; color: var(--mist-dark); }

/* ── 11. Next chapter CTA ───────────────────────────────────── */
.next-section {
  position: relative;
  overflow: hidden;
  padding-top: clamp(110px, 14vw, 190px);
  padding-bottom: clamp(100px, 13vw, 180px);
  border-top: 1px solid var(--line-faint);
  text-align: center;
}
.next-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, 90vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(199, 167, 107, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(199, 167, 107, 0.012), 0 0 0 160px rgba(199, 167, 107, 0.008);
  pointer-events: none;
}
.next-section .eyebrow { justify-content: center; }
.next-section h2 {
  position: relative;
  margin: 20px 0 24px;
  font-size: clamp(43px, 6.6vw, 94px);
  line-height: 1.22;
  letter-spacing: 0.05em;
  color: #eee4cf;
}
.next-section p:not(.eyebrow) { position: relative; max-width: 560px; margin: 0 auto 34px; color: var(--mist); font-size: 13px; line-height: 2; }
.next-section .button { position: relative; }

/* ── 12. Inner page scaffold ────────────────────────────────── */
.inner-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 68px) var(--gutter) 100px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.page-head h1 {
  margin: 12px 0 15px;
  font-size: clamp(50px, 7.1vw, 91px);
  line-height: 1;
  letter-spacing: 0.06em;
  color: #eee4cf;
}
.page-lede { max-width: 670px; color: var(--mist); font-size: 13px; line-height: 2; }
.page-head-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 22px; flex: 0 0 auto; }
.live-date { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.live-date span { font-size: 8px; letter-spacing: 0.2em; color: var(--mist-dark); }
.live-date strong { font-family: var(--serif); font-size: 16px; font-weight: 500; letter-spacing: 0.12em; color: var(--gold); }
.live-date em { font-style: normal; font-family: var(--display); font-size: 10px; letter-spacing: 0.11em; color: var(--paper-dim); }
.score-now { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; max-width: 270px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 9px; line-height: 1.7; letter-spacing: 0.09em; color: var(--mist-dark); text-align: right; transition: color 0.25s; }
.score-now[hidden] { display: none; }
.score-now:hover { color: var(--gold); }
.score-now span { flex: 0 0 auto; color: var(--mist-dark); }
.score-now strong { font-family: var(--display); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; color: var(--gold-dim); overflow-wrap: anywhere; }
.score-now i { font-style: normal; font-size: 8px; color: var(--mist-dark); transform: translateY(-1px); }
.score-audio-bank { display: none; }
.music-track-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.music-track {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: rgba(8, 15, 14, 0.42);
  color: var(--paper-dim);
  text-align: left;
  transition: border-color 0.25s, background 0.25s;
}
.music-track:hover { border-color: var(--line-strong); background: rgba(19, 27, 24, 0.7); }
.music-track.is-selected { border-color: rgba(199, 167, 107, 0.55); background: rgba(199, 167, 107, 0.07); }
.music-track-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.music-track-copy strong { font-family: var(--serif); font-size: 13px; font-weight: 500; letter-spacing: 0.05em; color: var(--paper); }
.music-track-copy em { font-style: normal; font-family: var(--display); font-size: 9px; letter-spacing: 0.06em; color: var(--gold-dim); }
.music-track-copy small { font-size: 9px; line-height: 1.7; letter-spacing: 0.04em; color: var(--mist-dark); }
.music-track-state { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 8px; letter-spacing: 0.08em; color: var(--mist-dark); }
.music-track-state b { font-weight: 400; color: var(--gold); }
.music-picker-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-faint); }
.music-picker-actions button, .music-picker-actions a { border: 1px solid var(--line); background: none; color: var(--mist); padding: 9px 12px; font-size: 9px; letter-spacing: 0.08em; }
.music-picker-actions button:hover, .music-picker-actions a:hover { border-color: var(--gold-dim); color: var(--gold); }
@media (max-width: 720px) {
  .page-head-aside .score-now { max-width: none; justify-content: flex-start; text-align: left; }
  .music-track-list { grid-template-columns: 1fr; }
}

/* ── 13. Timeline: era tabs & layout ────────────────────────── */
.era-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line-faint);
  border: 1px solid var(--line-faint);
  margin-bottom: 30px;
}
.era-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  background: var(--ink);
  text-align: left;
  border: 0;
  transition: background 0.3s;
  overflow: hidden;
}
.era-tab::before { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: transparent; transition: background 0.3s; }
.era-tab:hover { background: #0b1714; }
.era-tab.is-active { background: #0d1b17; }
.era-tab.is-active::before { background: var(--era-color, var(--gold)); }
.era-tab small { font-family: var(--display); font-size: 7px; letter-spacing: 0.14em; color: var(--mist-dark); }
.era-tab span { font-family: var(--serif); font-size: 15px; letter-spacing: 0.07em; color: var(--paper-dim); }
.era-tab em { font-family: var(--display); font-style: normal; font-size: 8px; letter-spacing: 0.12em; color: var(--gold-dim); }
.era-tab.is-active span { color: var(--era-color, var(--gold-bright)); }

.timeline-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr); gap: clamp(22px, 3vw, 44px); align-items: start; }

.event-reader { min-width: 0; }
.event-reader-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.event-hotkey { margin-left: auto; font-family: var(--display); font-size: 8px; letter-spacing: 0.08em; color: var(--mist-dark); white-space: nowrap; }
.event-progress { height: 2px; margin-top: -1px; background: rgba(199, 167, 107, 0.08); overflow: hidden; }
.event-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); transition: width 0.35s var(--ease); }
.event-visual { position: relative; margin: 24px 0 0; overflow: hidden; border: 1px solid var(--line); background: #050b0a; }
.event-visual[hidden] { display: none; }
.event-visual img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: saturate(0.92) contrast(1.03); }
.event-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(3, 8, 7, 0.76)); pointer-events: none; }
.event-visual figcaption { position: absolute; z-index: 2; left: 13px; right: 13px; bottom: 10px; font-size: 9px; letter-spacing: 0.06em; color: rgba(236, 228, 211, 0.64); }
@media (max-width: 720px) { .event-hotkey { display: none; } }
.chapter-label { display: inline-flex; align-items: center; gap: 9px; font-size: 10px; letter-spacing: 0.16em; color: var(--gold); }
.chapter-label::before { content: ""; width: 18px; height: 1px; background: var(--gold-dim); }
.event-count { font-family: var(--display); font-size: 9px; letter-spacing: 0.12em; color: var(--mist-dark); }
.event-yearline { display: flex; align-items: flex-end; gap: 25px; padding: 25px 0 23px; }
.event-year {
  font-family: var(--display);
  font-size: clamp(66px, 8.4vw, 118px);
  line-height: 0.8;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: transparent;
  background: linear-gradient(180deg, #f0e1c1, #b0925e 78%, #7c673e);
  -webkit-background-clip: text;
  background-clip: text;
  transition: opacity 0.3s;
}
.event-date-block { display: flex; flex-direction: column; gap: 7px; padding-bottom: 4px; }
.event-date-block span { font-family: var(--sans); font-size: 11px; letter-spacing: 0.1em; color: var(--paper-dim); }
.event-date-block em { font-style: normal; font-family: var(--serif); font-size: 13px; letter-spacing: 0.1em; color: var(--gold); }
.event-card {
  position: relative;
  padding: clamp(24px, 3.3vw, 42px);
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(28, 50, 43, 0.35), transparent 45%),
    rgba(10, 21, 18, 0.7);
  box-shadow: var(--shadow-soft);
}
.event-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(199, 167, 107, 0.06);
  pointer-events: none;
}
.event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background: repeating-linear-gradient(0deg, rgba(127, 201, 194, 0.4) 0 1px, transparent 1px 5px);
}
.event-card { box-shadow: 0 0 34px rgba(72, 160, 140, 0.07); }
.event-card h2 { max-width: 640px; font-size: clamp(27px, 3vw, 40px); line-height: 1.4; letter-spacing: 0.04em; color: #f0e5d0; }
.event-summary { margin-top: 18px; font-family: var(--serif); font-size: clamp(15px, 1.35vw, 18px); line-height: 1.95; color: #cbc1ae; }
.event-body { margin-top: 20px; color: var(--mist); font-size: 13px; line-height: 2.05; }
.event-body p { margin-top: 12px; }
.event-body p:first-child { margin-top: 0; }
.event-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 23px; }
.event-tags span, .modal-tags span, .codex-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--mist);
  background: rgba(6, 14, 12, 0.3);
}
.event-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--line-faint);
}
.event-place { display: flex; align-items: center; gap: 7px; border: 0; padding: 0; background: none; font-size: 11px; letter-spacing: 0.06em; color: var(--gold); text-align: left; }
.event-place svg { width: 13px; height: 13px; }
.event-place.is-clickable { cursor: pointer; transition: color 0.25s; }
.event-place.is-clickable:hover { color: var(--gold-bright); }
.event-people { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.person-chip {
  border: 1px solid rgba(199, 167, 107, 0.16);
  background: transparent;
  color: var(--paper-dim);
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.person-chip:hover { color: var(--gold-bright); border-color: var(--line-strong); background: rgba(199, 167, 107, 0.06); }
.person-chip.has-avatar { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 3px; }
.person-chip.has-avatar img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(199, 167, 107, 0.25); filter: saturate(0.9); }
.event-note { margin-top: 18px; padding: 12px 15px; border-left: 1px solid var(--gold-dim); background: rgba(199, 167, 107, 0.035); font-size: 10px; line-height: 1.85; color: var(--mist-dark); }
.event-note strong { color: var(--gold); font-weight: 400; letter-spacing: 0.08em; }
.event-reader-actions { display: flex; align-items: center; gap: 12px; margin-top: 19px; }
.event-reader-actions .text-link { margin-left: auto; border: 0; font-size: 10px; }
.event-reader-actions .button { min-height: 36px; padding: 0 14px; font-size: 10px; }
.event-reader-actions .button svg { width: 13px; height: 13px; }
.event-reader.is-changing .event-card,
.event-reader.is-changing .event-yearline { animation: reader-fade 0.55s var(--ease) both; }
@keyframes reader-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── 14. Interactive map ────────────────────────────────────── */
.timeline-map-panel {
  position: sticky;
  top: calc(var(--nav-h) + 12px);
  padding: 19px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 15, 0.66);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.map-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 14px; pointer-events: none; }
.map-panel-head span:first-child { font-size: 8px; letter-spacing: 0.2em; color: var(--gold-dim); }
.map-panel-head h2 { margin-top: 6px; font-size: 19px; letter-spacing: 0.05em; color: var(--paper); }
.map-live { display: inline-flex; align-items: center; gap: 6px; font-size: 8px; letter-spacing: 0.1em; color: var(--mist-dark); white-space: nowrap; }
.map-live i { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 7px var(--cyan); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.timeline-map {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid rgba(199, 167, 107, 0.18);
  background: #0a1816;
}
.timeline-map .map-hint { display: none; }
.map-active-place {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line-faint);
  background: rgba(8, 18, 15, 0.4);
}
.map-active-pin { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line-strong); color: var(--gold); }
.map-active-pin svg { width: 13px; height: 13px; }
.map-active-place div { display: flex; flex-direction: column; gap: 2px; }
.map-active-place strong { font-size: 11px; letter-spacing: 0.07em; color: var(--paper-dim); font-weight: 500; }
.map-active-place small { font-size: 8px; letter-spacing: 0.08em; color: var(--mist-dark); }
.map-legend { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 13px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 8px; letter-spacing: 0.05em; color: var(--mist-dark); }
.legend-swatch { width: 15px; height: 2px; display: inline-block; }
.map-year-events { min-height: 70px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-faint); }
.map-year-label { font-family: var(--display); font-size: 8px; letter-spacing: 0.14em; color: var(--gold-dim); }
.map-year-empty { margin-top: 8px; font-size: 9px; color: var(--mist-dark); }
.map-year-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.map-year-list button { padding: 4px 7px; border: 1px solid var(--line); background: transparent; color: var(--mist); font-size: 9px; line-height: 1.4; text-align: left; }
.map-year-list button:hover { color: var(--gold); border-color: var(--line-strong); background: rgba(199, 167, 107, 0.05); }

.world-map-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0a1514;
  isolation: isolate;
  transform-origin: 50% 50%;
  transition: transform 0.85s cubic-bezier(0.22, 0.7, 0.18, 1);
  will-change: transform;
}
.world-map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.82) brightness(0.78) contrast(1.05);
  user-select: none;
  pointer-events: none;
}
.world-map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(4, 12, 10, 0.3), transparent 25%, transparent 75%, rgba(4, 12, 10, 0.32)),
    radial-gradient(ellipse at 50% 50%, transparent 48%, rgba(3, 9, 8, 0.42) 100%);
  mix-blend-mode: multiply;
}
.map-frame-border {
  position: absolute;
  z-index: 7;
  inset: 10px;
  border: 1px solid rgba(199, 167, 107, 0.12);
  pointer-events: none;
}
.map-gridlines {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(224, 208, 173, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 208, 173, 0.2) 1px, transparent 1px);
  background-size: 12.5% 12.5%;
  mix-blend-mode: overlay;
}
.map-compass {
  position: absolute;
  z-index: 4;
  left: 3.2%;
  top: 4.5%;
  width: 11%;
  aspect-ratio: 1;
  border: 1px solid rgba(230, 214, 180, 0.18);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.7;
}
.map-compass::before, .map-compass::after { content: ""; position: absolute; background: rgba(230, 214, 180, 0.2); }
.map-compass::before { left: 50%; top: 6%; bottom: 6%; width: 1px; }
.map-compass::after { top: 50%; left: 6%; right: 6%; height: 1px; }
.map-compass span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  font-family: var(--display);
  font-size: clamp(6px, 1vw, 10px);
  letter-spacing: 0.12em;
  color: rgba(236, 222, 191, 0.58);
}
.map-marker {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: none;
  display: flex;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
}
.map-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.marker-dot {
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  border: 1px solid var(--marker-color, var(--gold-bright));
  border-radius: 50%;
  background: var(--marker-color, var(--gold));
  box-shadow: 0 0 0 4px rgba(7, 16, 15, 0.5), 0 0 12px var(--marker-color, var(--gold));
  transition: transform 0.25s, box-shadow 0.25s;
  flex: 0 0 auto;
}
.marker-dot::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: #08110f; opacity: 0.55; }
.timeline-map .marker-label { font-size: 7px; letter-spacing: 0.04em; }
.marker-label {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 5px;
  white-space: nowrap;
  background: rgba(6, 15, 13, 0.84);
  border: 1px solid rgba(199, 167, 107, 0.16);
  font-size: clamp(6px, 0.55vw, 8px);
  line-height: 1.4;
  letter-spacing: 0.07em;
  color: rgba(240, 231, 211, 0.82);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.map-marker.has-label .marker-label { opacity: 1; }
.map-marker:hover .marker-dot,
.map-marker.is-active .marker-dot { transform: scale(1.45); }
.map-marker.is-active .marker-dot { box-shadow: 0 0 0 5px rgba(236, 210, 155, 0.1), 0 0 22px var(--marker-color, var(--gold)); }
.map-marker:hover .marker-label { opacity: 1; transform: translateY(-50%) translateX(2px); }
.map-marker.is-active .marker-dot::before {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid var(--marker-color, var(--gold-bright));
  border-radius: 50%;
  animation: marker-ring 2.4s ease-out infinite;
}
@keyframes marker-ring { 0% { transform: scale(0.7); opacity: 0.8; } 100% { transform: scale(1.8); opacity: 0; } }
.map-marker.is-active .marker-label { color: var(--gold-bright); border-color: var(--line-strong); opacity: 1; transform: translateY(-50%) translateX(2px); }
.map-marker.is-hidden { opacity: 0; pointer-events: none; visibility: hidden; }
.map-marker[data-kind="ruin"] .marker-dot, .map-marker[data-kind="relic"] .marker-dot { border-radius: 1px; transform: rotate(45deg); }
.map-marker[data-kind="ruin"]:hover .marker-dot, .map-marker[data-kind="relic"]:hover .marker-dot,
.map-marker[data-kind="ruin"].is-active .marker-dot, .map-marker[data-kind="relic"].is-active .marker-dot { transform: rotate(45deg) scale(1.35); }
.map-marker[data-kind="ruin"] .marker-dot::after, .map-marker[data-kind="relic"] .marker-dot::after { border-radius: 1px; }
.marker-dot.marker-city { --marker-color: var(--cyan); }
.marker-dot.marker-forest { --marker-color: var(--forest); }
.marker-dot.marker-ruin { --marker-color: var(--violet); }
.marker-dot.marker-relic { --marker-color: var(--gold-bright); }
.marker-dot.marker-rift { --marker-color: var(--void); }
.marker-dot.marker-altar { --marker-color: var(--gold); }
.marker-dot.marker-fortress { --marker-color: var(--ember); }
.marker-dot.marker-temple { --marker-color: var(--gold); }
.marker-dot.marker-region { --marker-color: var(--mist); }
.marker-dot.marker-academy { --marker-color: var(--rose); }
.map-marker.marker-label-hidden .marker-label { display: none; }

.faction-glow {
  position: absolute;
  z-index: 1;
  width: 23%;
  aspect-ratio: 1.3;
  transform: translate(-50%, -50%);
  border-radius: 45%;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.8s;
  pointer-events: none;
  mix-blend-mode: screen;
}
.faction-glow.is-visible { opacity: 0.3; }
.faction-glow.church { background: radial-gradient(ellipse, rgba(159, 57, 64, 0.7), transparent 68%); }
.faction-glow.demon { background: radial-gradient(ellipse, rgba(188, 104, 50, 0.66), transparent 68%); }
.faction-glow.forest { background: radial-gradient(ellipse, rgba(83, 133, 84, 0.68), transparent 68%); }
.faction-glow.violet { background: radial-gradient(ellipse, rgba(124, 82, 158, 0.55), transparent 68%); }

.journey-route {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.journey-route.is-visible { opacity: 1; }
.journey-route path { fill: none; stroke: rgba(236, 210, 155, 0.7); stroke-width: 1.7; stroke-dasharray: 5 8; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(236, 210, 155, 0.4)); }
.journey-route circle { fill: var(--gold-bright); }

/* ── 15. Timeline dock ──────────────────────────────────────── */
.timeline-dock {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(168px, 0.46fr) auto minmax(260px, 1.54fr);
  align-items: center;
  gap: clamp(16px, 2.7vw, 38px);
  margin-top: 28px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 14, 0.88);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(22px) saturate(130%);
}
.dock-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.dock-eyebrow { font-family: var(--display); font-size: 7px; letter-spacing: 0.22em; color: var(--gold-dim); }
.dock-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-weight: 400; font-size: 12px; letter-spacing: 0.05em; color: var(--paper-dim); }
.dock-controls { position: relative; display: flex; align-items: center; gap: 8px; }
.dock-controls::before { content: ""; position: absolute; z-index: 0; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; opacity: 0.55; border: 1px solid rgba(199, 167, 107, 0.35); background: repeating-conic-gradient(from 0deg, rgba(199, 167, 107, 0.65) 0 0.8deg, transparent 0.8deg 18deg), repeating-conic-gradient(from 9deg, rgba(127, 201, 194, 0.3) 0 0.4deg, transparent 0.4deg 36deg); animation: spin 24s linear infinite; }
.dock-controls > * { position: relative; z-index: 1; }
.round-button { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); background: transparent; color: var(--mist); transition: color 0.25s, border-color 0.25s; }
.round-button svg { width: 13px; height: 13px; }
.round-button:hover { color: var(--gold-bright); border-color: var(--line-strong); }
.play-button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--gold-dim); border-radius: 50%; background: rgba(199, 167, 107, 0.08); color: var(--gold-bright); }
.play-button svg { width: 12px; height: 12px; fill: currentColor; stroke: none; margin-left: 1px; }
.play-button.is-playing svg { margin-left: 0; }
.play-ring { position: absolute; inset: -4px; border: 1px solid transparent; border-top-color: var(--gold); border-radius: 50%; opacity: 0; }
.play-button.is-playing .play-ring { opacity: 1; animation: spin 2.8s linear infinite; }
.timeline-scrub { position: relative; min-width: 0; padding: 5px 0 2px; }
.timeline-map { transition: filter 0.6s ease; }
.timeline-map::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -18%;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background:
    radial-gradient(22% 14% at 22% 30%, rgba(4, 12, 11, 0.7), transparent 70%),
    radial-gradient(18% 12% at 68% 58%, rgba(4, 12, 11, 0.55), transparent 70%),
    radial-gradient(26% 16% at 48% 78%, rgba(4, 12, 11, 0.5), transparent 70%);
  animation: cloud-drift 42s linear infinite alternate;
}
@keyframes cloud-drift { from { transform: translate3d(-3%, -1%, 0) scale(1.02); } to { transform: translate3d(4%, 2%, 0) scale(1.08); } }
.timeline-map.is-war { filter: sepia(0.34) saturate(1.32) contrast(1.08) brightness(0.78); }
.timeline-map.is-night { filter: saturate(0.7) brightness(0.76) hue-rotate(-12deg); }
.timeline-map.is-fire { filter: sepia(0.2) saturate(1.35) contrast(1.12) brightness(0.78); }

}
.timeline-map::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(60% 80% at 50% 50%, transparent 35%, rgba(116, 30, 20, 0.28) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 4px);
  transition: opacity 0.6s;
}
.timeline-map.is-war::after, .timeline-map.is-fire::after { opacity: 1; }
.timeline-scrub input[type="range"] { position: relative; z-index: 3; width: 100%; height: 18px; margin: 0; appearance: none; background: transparent; cursor: grab; }
.timeline-scrub input[type="range"]:active { cursor: grabbing; }
.timeline-scrub input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, var(--gold-dim), rgba(199, 167, 107, 0.24)); }
.timeline-scrub input[type="range"]::-moz-range-track { height: 1px; background: linear-gradient(90deg, var(--gold-dim), rgba(199, 167, 107, 0.24)); }
.timeline-scrub input[type="range"]::-webkit-slider-thumb { appearance: none; width: 8px; height: 8px; margin-top: -4px; border: 1px solid var(--gold-bright); border-radius: 50%; background: var(--ink); box-shadow: 0 0 10px rgba(236, 210, 155, 0.6); }
.timeline-scrub input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 1px solid var(--gold-bright); border-radius: 50%; background: var(--ink); box-shadow: 0 0 10px rgba(236, 210, 155, 0.6); }
.timeline-ticks { position: absolute; left: 0; right: 0; top: 9px; height: 6px; pointer-events: none; z-index: 2; }
.timeline-tick { position: absolute; top: 0; width: 1px; height: 4px; background: rgba(199, 167, 107, 0.25); transform: translateX(-50%); }
.timeline-tick.major { height: 7px; background: var(--gold-dim); }
.timeline-scale { display: flex; justify-content: space-between; margin-top: 3px; pointer-events: none; }
.timeline-scale span { white-space: nowrap; font-family: var(--display); font-size: 7px; letter-spacing: 0.05em; color: var(--mist-dark); }
.timeline-tick.is-current { height: 8px; background: var(--gold-bright); box-shadow: 0 0 8px rgba(236, 210, 155, 0.6); }

.chronicle-drawer {
  position: fixed;
  z-index: 90;
  top: 88px;
  right: var(--gutter);
  bottom: 92px;
  width: min(540px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  background: rgba(7, 16, 14, 0.97);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(25px);
  animation: drawer-in 0.4s var(--ease) both;
}
@keyframes drawer-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.chronicle-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.chronicle-drawer-head span { font-family: var(--display); font-size: 7px; letter-spacing: 0.25em; color: var(--gold-dim); }
.chronicle-drawer-head h2 { margin-top: 6px; font-size: 24px; letter-spacing: 0.08em; }
.chronicle-list { overflow: auto; padding: 8px 24px 25px; }
.chronicle-entry { width: 100%; display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line-faint); background: none; text-align: left; transition: background 0.25s; }
.chronicle-entry:hover { background: rgba(199, 167, 107, 0.035); }
.chronicle-entry.is-active { background: rgba(199, 167, 107, 0.07); }
.chronicle-entry time { font-family: var(--display); font-size: 10px; letter-spacing: 0.05em; color: var(--gold-dim); padding-top: 3px; }
.chronicle-entry div { display: flex; flex-direction: column; gap: 4px; }
.chronicle-entry strong { font-family: var(--serif); font-weight: 400; font-size: 14px; letter-spacing: 0.04em; color: var(--paper-dim); }
.chronicle-entry small { font-size: 9px; color: var(--mist-dark); }
.chronicle-entry.is-active strong { color: var(--gold-bright); }

/* ── 16. Atlas ──────────────────────────────────────────────── */
.atlas-legend-inline { display: flex; flex-wrap: wrap; gap: 15px; justify-content: flex-end; }
.atlas-legend-inline span { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; letter-spacing: 0.08em; color: var(--mist); }
.atlas-layout { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.58fr); gap: 24px; align-items: start; }
.atlas-map-card { border: 1px solid var(--line); background: rgba(8, 18, 15, 0.62); box-shadow: var(--shadow-soft); }
.atlas-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line-faint); }
.layer-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.layer-tabs button { border: 0; background: transparent; color: var(--mist-dark); padding: 7px 11px; font-size: 10px; letter-spacing: 0.06em; transition: color 0.25s, background 0.25s; }
.layer-tabs button:hover { color: var(--paper-dim); }
.layer-tabs button.is-active { color: var(--gold-bright); background: rgba(199, 167, 107, 0.08); }
.map-tools { display: flex; align-items: center; gap: 5px; }
.map-tools .icon-button { width: 28px; height: 28px; border-color: transparent; }
.map-tools .icon-button svg { width: 13px; height: 13px; }
.map-tools span { min-width: 40px; text-align: center; font-family: var(--display); font-size: 9px; color: var(--mist-dark); }
.atlas-viewport { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #07110f; cursor: grab; touch-action: none; }
.atlas-viewport.is-dragging { cursor: grabbing; }
.atlas-map-inner { position: absolute; inset: 0; transition: transform 0.25s var(--ease); transform-origin: center; }
.atlas-map-inner.is-dragging { transition: none; }
.atlas-viewport > .map-hint { position: absolute; z-index: 8; left: 14px; bottom: 11px; font-size: 8px; letter-spacing: 0.08em; color: rgba(230, 221, 200, 0.45); background: rgba(4, 12, 10, 0.55); padding: 4px 7px; backdrop-filter: blur(6px); pointer-events: none; }
.atlas-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 12px 15px; border-top: 1px solid var(--line-faint); }
.atlas-legend { display: flex; flex-wrap: wrap; gap: 13px; }
.atlas-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 8px; color: var(--mist-dark); }
.map-disclaimer { font-size: 8px; letter-spacing: 0.08em; color: var(--mist-dark); text-align: right; white-space: nowrap; }
.map-place-index { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; padding: 11px 15px 13px; border-top: 1px solid var(--line-faint); }
.place-index-label { margin-right: 5px; font-family: var(--display); font-size: 7px; letter-spacing: 0.16em; color: var(--gold-dim); }
.map-place-index button { padding: 2px 6px; border: 1px solid var(--line); background: transparent; color: var(--mist); font-size: 9px; line-height: 1.5; }
.map-place-index button:hover, .map-place-index button.is-active { color: var(--gold); border-color: var(--line-strong); background: rgba(199, 167, 107, 0.06); }
.atlas-detail {
  position: sticky;
  top: calc(var(--nav-h) + 12px);
  min-height: 560px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(28, 50, 43, 0.26), rgba(7, 16, 14, 0.68));
  padding: 27px;
}
.atlas-detail-empty { min-height: 500px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.empty-sigil { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); font-size: 19px; margin-bottom: 25px; }
.atlas-detail-empty h2 { font-size: 26px; letter-spacing: 0.08em; margin-bottom: 13px; }
.atlas-detail-empty p { color: var(--mist-dark); font-size: 12px; line-height: 1.9; max-width: 290px; }
.place-detail-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.place-kind { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; letter-spacing: 0.13em; color: var(--gold); }
.place-kind::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.place-detail-top h2 { margin-top: 11px; font-size: clamp(27px, 3vw, 38px); letter-spacing: 0.06em; }
.place-en { margin-top: 5px; font-family: var(--display); font-size: 8px; letter-spacing: 0.2em; color: var(--mist-dark); }
.place-coordinates { flex: 0 0 auto; margin-top: 3px; font-family: var(--display); font-size: 8px; color: var(--mist-dark); border: 1px solid var(--line-faint); padding: 2px 6px; }
.place-close { width: 28px; height: 28px; flex: 0 0 auto; }
.place-close svg { width: 14px; height: 14px; }
.place-scene-link { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 18px; padding: 10px 11px; border: 1px solid var(--line-faint); background: rgba(199, 167, 107, 0.035); color: var(--paper-dim); font-size: 10px; text-align: left; transition: 0.25s; }
.place-scene-link:hover { color: var(--gold-bright); border-color: var(--line); }
.place-scene-link svg { width: 14px; height: 14px; color: var(--gold); }
.place-summary { margin-top: 22px; font-family: var(--serif); font-size: 17px; line-height: 1.9; color: #d1c7b4; }
.place-detail { margin-top: 17px; font-size: 12px; line-height: 2.05; color: var(--mist); }
.place-meta { display: flex; flex-direction: column; gap: 9px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-faint); }
.place-meta div { display: flex; justify-content: space-between; gap: 15px; font-size: 10px; }
.place-meta span { color: var(--mist-dark); }
.place-meta strong { font-weight: 400; color: var(--paper-dim); text-align: right; }
.place-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.place-tags span { border: 1px solid var(--line-faint); padding: 2px 7px; font-size: 8px; color: var(--mist-dark); }
.place-related { margin-top: 23px; }
.place-related h3 { font-size: 10px; letter-spacing: 0.16em; color: var(--gold-dim); margin-bottom: 10px; }
.related-event-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line-faint); background: transparent; text-align: left; color: var(--paper-dim); font-size: 11px; }
.related-event-btn:hover { color: var(--gold-bright); }
.related-event-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-event-btn time { flex: 0 0 auto; font-family: var(--display); font-size: 8px; color: var(--gold-dim); }

.region-section { margin-top: clamp(64px, 8vw, 106px); }
.region-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.region-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #040908;
  text-align: left;
}
.region-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 6, 0) 38%, rgba(2, 6, 6, 0.78) 100%);
  pointer-events: none;
}
.region-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92); transition: transform 0.8s ease, filter 0.5s ease; }
.region-card:hover img { transform: scale(1.035); filter: saturate(1.02) brightness(1.06); }
.region-card:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
.region-copy { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.region-copy small { font-family: var(--display); font-size: 7px; letter-spacing: 0.18em; color: var(--gold-dim); }
.region-copy strong { font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: 0.06em; color: var(--paper); }
.region-copy em { font-style: normal; font-size: 9px; letter-spacing: 0.05em; color: var(--mist); }
.region-section > .fineprint { margin-top: 14px; }
@media (max-width: 980px) { .region-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .region-grid { grid-template-columns: 1fr; }
  .region-copy strong { font-size: 16px; }
}
.scenes-section, .archive-section { margin-top: clamp(80px, 10vw, 130px); }
.scene-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.scene-card {
  position: relative;
  grid-column: span 4;
  min-height: 350px;
  overflow: hidden;
  border: 1px solid var(--line-faint);
  background: #0a1513;
  cursor: pointer;
  transition: border-color 0.35s, transform 0.5s var(--ease);
}
.scene-card:nth-child(1) { grid-column: span 7; min-height: 480px; }
.scene-card:nth-child(2) { grid-column: span 5; min-height: 480px; }
.scene-card:nth-child(3), .scene-card:nth-child(4) { min-height: 390px; }
.scene-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.scene-art { position: absolute; inset: 0; overflow: hidden; }
.scene-art svg { width: 100%; height: 100%; transition: transform 1.2s var(--ease); }
.scene-card:hover .scene-art svg { transform: scale(1.035); }
.scene-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); filter: saturate(0.8) brightness(0.78); }
.scene-card:hover .scene-art img { transform: scale(1.035); }
.scene-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 11, 9, 0.92) 0%, rgba(4, 11, 9, 0.1) 62%), linear-gradient(90deg, rgba(4, 11, 9, 0.2), transparent); }
.scene-card:nth-child(1) .scene-art::after { background: linear-gradient(0deg, rgba(4, 11, 9, 0.94) 0%, rgba(4, 11, 9, 0.05) 58%); }
.scene-info { position: absolute; z-index: 3; left: 24px; right: 24px; bottom: 22px; }
.scene-index { display: block; margin-bottom: 9px; font-family: var(--display); font-size: 8px; letter-spacing: 0.24em; color: var(--gold); }
.scene-info h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(20px, 2vw, 26px); letter-spacing: 0.06em; color: #f0e6d2; }
.scene-sub { margin-top: 4px; font-size: 9px; letter-spacing: 0.1em; color: rgba(233, 223, 203, 0.55); }
.scene-caption { max-width: 540px; margin-top: 12px; font-size: 11px; line-height: 1.8; color: rgba(222, 213, 194, 0.67); opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s; }
.scene-card:hover .scene-caption { opacity: 1; transform: none; }
.scene-open { position: absolute; top: 17px; right: 17px; z-index: 3; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(236, 221, 191, 0.24); border-radius: 50%; background: rgba(4, 11, 9, 0.35); color: var(--gold); font-size: 14px; opacity: 0; transform: rotate(-45deg); transition: 0.35s; }
.scene-card:hover .scene-open { opacity: 1; transform: none; }

.archive-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 13px; }
.archive-card { grid-column: span 3; position: relative; overflow: hidden; min-height: 230px; border: 1px solid var(--line-faint); background: #0a1513; cursor: pointer; }
.archive-card:nth-child(1) { grid-column: span 6; min-height: 340px; }
.archive-card:nth-child(7) { grid-column: span 6; min-height: 340px; }
.archive-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; filter: saturate(0.8) brightness(0.78); transition: transform 0.9s var(--ease), filter 0.5s; }
.archive-card:nth-child(7) img { object-position: center 47%; }
.archive-card:hover img { transform: scale(1.04); filter: saturate(0.95) brightness(0.9); }
.archive-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 11, 9, 0.91), transparent 68%); }
.archive-info { position: absolute; z-index: 2; left: 17px; right: 17px; bottom: 15px; }
.archive-info span { display: block; font-family: var(--display); font-size: 7px; letter-spacing: 0.14em; color: var(--gold-dim); margin-bottom: 5px; }
.archive-info h3 { font-size: 16px; letter-spacing: 0.04em; color: var(--paper); }
.archive-info p { margin-top: 3px; font-size: 9px; color: rgba(222, 213, 194, 0.45); }
.archive-open { position: absolute; z-index: 2; top: 12px; right: 12px; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(236, 221, 191, 0.2); border-radius: 50%; color: var(--gold); opacity: 0; transition: opacity 0.3s; }
.archive-card:hover .archive-open { opacity: 1; }

/* ── 17. 1700 年后补全 ──────────────────────────────────────── */
.after-head { margin-bottom: 30px; }
.after-hero { position: relative; height: clamp(260px, 38vw, 480px); overflow: hidden; border: 1px solid var(--line); background: #040a09; }
.after-hero > img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; filter: saturate(0.78) contrast(1.05); }
.after-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 6, 6, 0.06), rgba(2, 6, 6, 0.86)), linear-gradient(90deg, rgba(2, 6, 6, 0.7), transparent 55%); }
.after-hero-copy { position: absolute; z-index: 2; left: clamp(20px, 4vw, 48px); bottom: 28px; display: flex; flex-direction: column; gap: 5px; }
.after-hero-copy span { font-family: var(--display); font-size: 8px; letter-spacing: 0.18em; color: var(--gold); }
.after-hero-copy strong { font-family: var(--serif); font-size: clamp(34px, 5vw, 58px); font-weight: 500; letter-spacing: 0.08em; color: var(--paper); }
.after-hero-copy small { font-size: 10px; letter-spacing: 0.05em; color: var(--mist); }
.after-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); margin-top: 46px; }
.after-toc { position: sticky; top: 104px; align-self: start; padding-top: 4px; }
.after-toc > p { font-family: var(--display); font-size: 8px; letter-spacing: 0.18em; color: var(--gold-dim); }
.after-toc nav { display: flex; flex-direction: column; gap: 2px; margin-top: 13px; }
.after-toc nav button { display: flex; align-items: baseline; gap: 9px; padding: 7px 0; border: 0; border-bottom: 1px solid var(--line-faint); background: none; color: var(--mist); font-size: 10px; line-height: 1.5; text-align: left; }
.after-toc nav button:hover { color: var(--gold); }
.after-toc nav button span { font-family: var(--display); font-size: 7px; color: var(--gold-dim); }
.after-toc > small { display: block; margin-top: 18px; font-size: 9px; line-height: 1.8; color: var(--mist-dark); }
.after-section { margin-bottom: clamp(70px, 9vw, 120px); scroll-margin-top: 105px; }
.after-section-head { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 18px; align-items: start; }
.after-index { font-family: var(--display); font-size: clamp(40px, 6vw, 66px); line-height: 1; color: rgba(199, 167, 107, 0.38); }
.after-section-head h2 { margin: 10px 0 12px; font-family: var(--serif); font-size: clamp(32px, 4.5vw, 52px); font-weight: 500; line-height: 1.25; color: var(--paper); }
.after-note { max-width: 680px; font-size: 12px; line-height: 1.9; color: var(--mist); }
.after-banner { position: relative; margin: 26px 0 0; overflow: hidden; border: 1px solid var(--line); background: #050b0a; }
.after-banner img { display: block; width: 100%; aspect-ratio: 16 / 6.5; object-fit: cover; filter: saturate(0.85); }
.after-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(3, 8, 7, 0.82)); pointer-events: none; }
.after-banner figcaption { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 11px; font-size: 9px; letter-spacing: 0.06em; color: rgba(236, 228, 211, 0.6); }
.after-group { margin-top: 36px; }
.after-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.after-group-head span { width: 22px; height: 1px; background: var(--gold-dim); }
.after-group-head h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; letter-spacing: 0.05em; color: var(--paper-dim); }
.after-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.after-card { padding: 19px 20px 17px; border: 1px solid var(--line); background: linear-gradient(140deg, rgba(24, 44, 37, 0.3), transparent 55%), rgba(9, 19, 16, 0.58); }
.after-card-meta { font-family: var(--display); font-size: 8px; letter-spacing: 0.09em; color: var(--gold-dim); }
.after-card h4 { margin: 7px 0 9px; font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: 0.04em; color: var(--paper); }
.after-card > p:not(.after-card-meta) { font-size: 11px; line-height: 1.95; color: var(--mist); }
.after-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.after-card-tags span { padding: 2px 6px; border: 1px solid var(--line); font-size: 8px; letter-spacing: 0.03em; color: var(--mist-dark); }
@media (max-width: 900px) {
  .after-layout { grid-template-columns: 1fr; gap: 26px; }
  .after-toc { position: static; }
  .after-toc nav { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .after-toc nav button { border-bottom: 0; padding: 4px 0; }
  .after-toc > small { max-width: 620px; }
}
@media (max-width: 620px) {
  .after-hero { height: 260px; }
  .after-section-head { grid-template-columns: 46px minmax(0, 1fr); gap: 10px; }
  .after-index { font-size: 36px; }
  .after-cards { grid-template-columns: 1fr; }
  .after-banner img { aspect-ratio: 16 / 10; }
}

/* ── 18. Codex ──────────────────────────────────────────────── */
.character-art-section { margin: 34px 0 44px; }
.character-art-heading { margin-bottom: 17px; }
.character-art-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.character-art-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #050b0a;
  text-align: left;
}
.character-art-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 6, 0) 42%, rgba(2, 6, 6, 0.82) 100%);
  pointer-events: none;
}
.character-art-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) contrast(1.03); transition: transform 0.7s ease, filter 0.4s ease; }
.character-art-card:hover img { transform: scale(1.04); filter: saturate(1.04) brightness(1.05); }
.character-art-card:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
.character-art-copy { position: absolute; z-index: 2; left: 13px; right: 13px; bottom: 11px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.character-art-copy small { font-family: var(--display); font-size: 7px; letter-spacing: 0.15em; color: var(--gold-dim); }
.character-art-copy strong { font-family: var(--serif); font-size: 16px; font-weight: 500; letter-spacing: 0.04em; color: var(--paper); }
.character-art-copy em { font-style: normal; font-size: 9px; letter-spacing: 0.04em; color: var(--mist); }
@media (max-width: 980px) { .character-art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .character-art-grid { grid-template-columns: 1fr; } }

.codex-toolbar { display: flex; align-items: center; gap: 20px; margin: 0 0 13px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(370px, 100%);
  padding: 0 13px;
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 15, 0.65);
  transition: border-color 0.25s, background 0.25s;
}
.search-field:focus-within { border-color: var(--line-strong); background: rgba(199, 167, 107, 0.035); }
.search-field svg { width: 15px; height: 15px; color: var(--mist-dark); flex: 0 0 auto; }
.search-field input { width: 100%; border: 0; background: none; outline: none; color: var(--paper); font-size: 12px; letter-spacing: 0.04em; }
.search-field input::placeholder { color: var(--mist-dark); }
.search-field kbd { font-family: var(--display); font-size: 9px; color: var(--mist-dark); border: 1px solid var(--line-faint); padding: 1px 5px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.filter-tab { display: inline-flex; align-items: baseline; gap: 7px; border: 1px solid transparent; background: transparent; color: var(--mist-dark); padding: 7px 12px; font-size: 10px; letter-spacing: 0.06em; transition: 0.25s; }
.filter-tab:hover { color: var(--paper-dim); }
.filter-tab.is-active { color: var(--gold-bright); border-color: var(--line); background: rgba(199, 167, 107, 0.05); }
.filter-tab em { font-family: var(--display); font-style: normal; font-size: 8px; letter-spacing: 0; color: var(--gold-dim); }
.filter-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 2px 18px; border-bottom: 1px solid var(--line-faint); }
.filter-meta p { font-size: 9px; letter-spacing: 0.09em; color: var(--mist-dark); }
.codex-counts { display: flex; gap: 22px; }
.codex-counts div { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.codex-counts strong { font-family: var(--display); font-size: 22px; font-weight: 400; color: var(--paper); line-height: 1; }
.codex-counts span { font-size: 8px; letter-spacing: 0.1em; color: var(--mist-dark); }
.magic-primer { border: 1px solid var(--line); border-bottom: 0; background: linear-gradient(135deg, rgba(20, 43, 37, 0.72), rgba(7, 17, 15, 0.9)); }
.magic-primer[hidden] { display: none; }
.magic-primer-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line-faint); }
.magic-primer-head p { font-family: var(--display); font-size: 1.2vw; letter-spacing: 0.16em; color: var(--gold-dim); }
.magic-primer-head h3 { font-family: var(--serif); font-weight: 400; font-size: 18px; letter-spacing: 0.05em; color: var(--paper); }
.magic-primer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.magic-primer-grid div { padding: 15px 22px 17px; border-right: 1px solid var(--line-faint); }
.magic-primer-grid div:last-child { border-right: 0; }
.magic-primer-grid span { display: block; margin-bottom: 6px; font-family: var(--display); font-size: 7px; letter-spacing: 0.13em; color: var(--gold-dim); }
.magic-primer-grid p { font-size: 10px; line-height: 1.8; color: var(--mist); }
@media (max-width: 760px) {
  .magic-primer-head { display: block; padding: 15px 16px 10px; }
  .magic-primer-head p { font-size: 7px; }
  .magic-primer-head h3 { margin-top: 6px; font-size: 16px; }
  .magic-primer-grid { grid-template-columns: 1fr; }
  .magic-primer-grid div { border-right: 0; border-bottom: 1px solid var(--line-faint); padding: 12px 16px 14px; }
  .magic-primer-grid div:last-child { border-bottom: 0; }
}
.codex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 1px; background: var(--line-faint); border: 1px solid var(--line-faint); border-top: 0; }
.codex-card {
  position: relative;
  display: flex;
  align-self: start;
  flex-direction: column;
  min-height: 245px;
  padding: 24px 23px 20px;
  background: var(--ink);
  border: 0;
  text-align: left;
  transition: background 0.35s;
  overflow: hidden;
}
.codex-card:hover { background: #0b1714; }
.codex-card::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--gold-dim); transition: height 0.5s var(--ease); }
.codex-card:hover::after { height: 100%; }
.codex-card-art { margin: -24px -23px 18px; aspect-ratio: 16 / 9; overflow: hidden; background: #050b0a; }
.codex-card-art img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.88) contrast(1.03); transition: transform 0.6s ease; }
.codex-card:hover .codex-card-art img { transform: scale(1.035); }
.codex-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.codex-glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--gold);
  transition: border-color 0.3s, background 0.3s;
}
.codex-card:hover .codex-glyph { border-color: var(--line-strong); background: rgba(199, 167, 107, 0.05); }
.codex-kind { font-size: 8px; letter-spacing: 0.15em; color: var(--mist-dark); }
.codex-card h3 { margin: 20px 0 5px; font-family: var(--serif); font-weight: 500; font-size: 21px; letter-spacing: 0.05em; color: var(--paper); }
.codex-epithet { font-size: 9px; letter-spacing: 0.09em; color: var(--gold); }
.codex-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 14px; font-size: 11px; line-height: 1.85; color: var(--mist); }
.codex-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 18px; }
.codex-tags span { border-color: transparent; background: rgba(199, 167, 107, 0.045); min-height: 20px; font-size: 8px; }
.codex-more { position: absolute; right: 20px; bottom: 17px; font-family: var(--display); font-size: 8px; letter-spacing: 0.08em; color: var(--gold-dim); opacity: 0; transition: opacity 0.3s; }
.codex-card:hover .codex-more { opacity: 1; }
.codex-card.kind-truth { background: #0a1613; }
.codex-card.kind-truth .codex-glyph { color: var(--violet); border-color: rgba(169, 139, 189, 0.25); }
.empty-state { padding: 90px 20px; text-align: center; border-bottom: 1px solid var(--line-faint); }
.empty-state > span { display: block; font-size: 24px; color: var(--gold-dim); margin-bottom: 15px; }
.empty-state h3 { font-size: 25px; letter-spacing: 0.06em; color: var(--paper-dim); }
.empty-state p { margin-top: 9px; font-size: 12px; color: var(--mist-dark); }

/* ── 18. Studio ─────────────────────────────────────────────── */
.studio-status { display: flex; align-items: center; gap: 12px; padding: 9px 13px; border: 1px solid var(--line); background: rgba(8, 18, 15, 0.5); align-self: flex-end; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.studio-status.is-dirty .status-dot { background: var(--gold); box-shadow: 0 0 9px var(--gold); }
.studio-status div { display: flex; flex-direction: column; gap: 2px; }
.studio-status strong { font-size: 10px; font-weight: 400; letter-spacing: 0.08em; color: var(--paper-dim); }
.studio-status small { font-size: 8px; color: var(--mist-dark); }
.studio-layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: clamp(24px, 4vw, 55px); align-items: start; min-width: 0; }
.studio-sidebar { position: sticky; top: calc(var(--nav-h) + 18px); min-width: 0; }
.studio-main { min-width: 0; }
.studio-sidebar-title { display: flex; flex-direction: column; gap: 5px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.studio-sidebar-title span { font-family: var(--display); font-size: 7px; letter-spacing: 0.2em; color: var(--gold-dim); }
.studio-sidebar-title strong { font-family: var(--serif); font-weight: 400; font-size: 14px; letter-spacing: 0.1em; color: var(--paper-dim); }
.studio-nav { display: flex; flex-direction: column; padding-top: 8px; }
.studio-nav button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 9px; border: 0; border-bottom: 1px solid var(--line-faint); background: transparent; color: var(--mist-dark); font-size: 11px; letter-spacing: 0.04em; text-align: left; transition: 0.25s; }
.studio-nav button:hover { color: var(--paper-dim); padding-left: 13px; }
.studio-nav button.is-active { color: var(--gold-bright); padding-left: 13px; background: linear-gradient(90deg, rgba(199, 167, 107, 0.06), transparent); }
.studio-nav button em { font-style: normal; font-family: var(--display); font-size: 9px; color: var(--mist-dark); }
.studio-sidebar-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-faint); }
.studio-sidebar-footer p { font-size: 10px; line-height: 1.8; color: var(--mist-dark); }
.save-indicator { margin-top: 13px; font-size: 9px; letter-spacing: 0.06em; color: var(--gold-dim); }
.studio-main { min-width: 0; }
.studio-dashboard { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 13px; margin-bottom: 48px; }
.dashboard-card { border: 1px solid var(--line-faint); background: rgba(8, 18, 15, 0.42); padding: 27px; }
.dashboard-stats { position: relative; overflow: hidden; background: linear-gradient(145deg, rgba(33, 62, 52, 0.33), rgba(8, 18, 15, 0.54)); }
.dashboard-stats::after { content: "◇"; position: absolute; right: -5px; bottom: -40px; font-family: var(--serif); font-size: 190px; color: rgba(199, 167, 107, 0.05); line-height: 1; }
.dashboard-eyebrow { font-family: var(--display); font-size: 7px; letter-spacing: 0.24em; color: var(--gold-dim); }
.dashboard-stats h2 { margin: 17px 0 9px; font-size: 30px; letter-spacing: 0.06em; color: var(--paper); }
.dashboard-stats > p { max-width: 430px; font-size: 11px; line-height: 1.9; color: var(--mist); }
.dashboard-numbers { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 27px; position: relative; z-index: 2; }
.dashboard-numbers div { display: flex; flex-direction: column; gap: 2px; }
.dashboard-numbers strong { font-family: var(--display); font-size: 22px; font-weight: 400; color: var(--gold-bright); line-height: 1; }
.dashboard-numbers span { font-size: 8px; letter-spacing: 0.08em; color: var(--mist-dark); }
.dashboard-portrait { display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 12px 22px; }
.quick-action { display: grid; grid-template-columns: 18px 1fr 13px; align-items: center; gap: 11px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line-faint); background: transparent; text-align: left; color: var(--mist); }
.quick-action:last-child { border-bottom: 0; }
.quick-action > svg { width: 16px; height: 16px; color: var(--gold-dim); }
.quick-action span { display: flex; flex-direction: column; gap: 3px; }
.quick-action strong { font-weight: 400; font-size: 11px; color: var(--paper-dim); }
.quick-action small { font-size: 9px; color: var(--mist-dark); }
.quick-action:hover strong, .quick-action:hover > svg:last-child { color: var(--gold-bright); }
.quick-action > svg:last-child { justify-self: end; width: 12px; height: 12px; color: var(--mist-dark); }
.studio-objects, .studio-panel { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 20px; }
.studio-table-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin-bottom: 17px; }
.studio-table-head h2 { margin-top: 7px; font-size: 25px; letter-spacing: 0.06em; color: var(--paper); }
.studio-table-actions { display: flex; align-items: center; gap: 8px; }
.studio-search { display: flex; align-items: center; gap: 7px; padding: 0 10px; height: 38px; border: 1px solid var(--line); background: rgba(8, 18, 15, 0.5); }
.studio-search svg { width: 13px; height: 13px; color: var(--mist-dark); }
.studio-search input { width: 125px; background: none; border: 0; outline: none; font-size: 10px; color: var(--paper); }
.studio-search input::placeholder { color: var(--mist-dark); }
.studio-table { border-top: 1px solid var(--line); }
.studio-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 95px 70px; align-items: center; gap: 15px; padding: 12px 4px; border-bottom: 1px solid var(--line-faint); transition: background 0.25s; }
.studio-row:hover { background: rgba(199, 167, 107, 0.025); }
.studio-row-date { font-family: var(--display); font-size: 9px; color: var(--gold-dim); line-height: 1.5; }
.studio-row-main { min-width: 0; }
.studio-row-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-size: 13px; font-weight: 400; color: var(--paper-dim); }
.studio-row-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; font-size: 9px; color: var(--mist-dark); }
.studio-row-type { font-size: 8px; letter-spacing: 0.08em; color: var(--mist-dark); }
.studio-row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.studio-row-actions button { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid transparent; background: transparent; color: var(--mist-dark); transition: 0.25s; }
.studio-row-actions button svg { width: 13px; height: 13px; }
.studio-row-actions button:hover { color: var(--gold-bright); border-color: var(--line); }
.studio-row-actions button[data-delete]:hover { color: var(--blood); border-color: rgba(181, 106, 99, 0.3); }
.studio-row.is-character { grid-template-columns: 40px minmax(0, 1fr) 95px 70px; }
.studio-row.is-character .studio-row-date { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; font-family: var(--serif); font-size: 11px; color: var(--gold); }
.studio-empty { padding: 50px 20px; text-align: center; color: var(--mist-dark); font-size: 12px; }
.meta-form { display: flex; flex-direction: column; gap: 15px; }
.meta-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.meta-form label, .editor-form label { display: flex; flex-direction: column; gap: 7px; }
.meta-form label > span, .editor-form label > span { font-size: 9px; letter-spacing: 0.08em; color: var(--gold-dim); }
.meta-form input, .meta-form textarea, .editor-form input, .editor-form textarea, .editor-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 16, 14, 0.7);
  padding: 10px 11px;
  color: var(--paper);
  font-size: 12px;
  line-height: 1.7;
  outline: none;
  transition: border-color 0.25s, background 0.25s;
  border-radius: 0;
}
.meta-form textarea, .editor-form textarea { resize: vertical; min-height: 76px; }
.meta-form input:focus, .meta-form textarea:focus, .editor-form input:focus, .editor-form textarea:focus, .editor-form select:focus { border-color: var(--line-strong); background: rgba(199, 167, 107, 0.03); }
.studio-panel .panel-badge { font-family: var(--display); font-size: 9px; letter-spacing: 0.1em; color: var(--gold-dim); border: 1px solid var(--line); padding: 4px 8px; }
.panel-intro { max-width: 760px; margin-bottom: 20px; font-size: 11px; line-height: 1.9; color: var(--mist); }
.notes-list { display: flex; flex-direction: column; }
.note-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 110px; gap: 18px; align-items: start; padding: 15px 2px; border-top: 1px solid var(--line-faint); }
.note-row h3 { font-size: 13px; font-weight: 400; letter-spacing: 0.04em; color: var(--paper-dim); }
.note-row p { margin-top: 4px; font-size: 10px; line-height: 1.8; color: var(--mist-dark); }
.note-row .note-original { font-family: var(--display); font-size: 9px; color: var(--mist-dark); }
.note-row .note-canon { margin-top: 4px; font-size: 10px; color: var(--gold); }
.note-level { justify-self: end; font-size: 8px; letter-spacing: 0.06em; color: var(--gold-dim); border: 1px solid var(--line-faint); padding: 2px 6px; white-space: nowrap; }
.note-level.is-core { color: var(--blood); border-color: rgba(181, 106, 99, 0.25); }
.data-action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.data-action { display: flex; align-items: flex-start; gap: 12px; padding: 15px; border: 1px solid var(--line-faint); background: rgba(8, 18, 15, 0.34); text-align: left; color: var(--mist); transition: 0.25s; }
.data-action:hover { border-color: var(--line); background: rgba(199, 167, 107, 0.035); }
.data-action svg { width: 16px; height: 16px; color: var(--gold-dim); margin-top: 1px; flex: 0 0 auto; }
.data-action span { display: flex; flex-direction: column; gap: 4px; }
.data-action strong { font-weight: 400; font-size: 11px; color: var(--paper-dim); }
.data-action small { font-size: 9px; line-height: 1.6; color: var(--mist-dark); }
.usage-bar { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-faint); }
.usage-bar > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 9px; color: var(--mist-dark); }
.usage-bar strong { font-weight: 400; color: var(--paper-dim); font-family: var(--display); }
.usage-track { height: 2px; background: rgba(199, 167, 107, 0.12); }
.usage-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); transition: width 0.4s; }
.data-panel .fineprint { margin-top: 11px; }

/* ── 19. Modal & editor ─────────────────────────────────────── */
.modal { position: fixed; z-index: 200; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none !important; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 7, 6, 0.82); backdrop-filter: blur(9px); animation: fade-in 0.3s both; }
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(950px, 100%);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(100% 70% at 100% 0%, rgba(37, 73, 62, 0.26), transparent 58%),
    #0a1613;
  box-shadow: 0 50px 150px rgba(0, 0, 0, 0.65);
  animation: modal-in 0.45s var(--ease) both;
}
.modal-panel.is-narrow { width: min(760px, 100%); }
.modal-panel {
  border-color: rgba(127, 201, 194, 0.32);
  box-shadow:
    0 0 0 1px rgba(127, 201, 194, 0.1) inset,
    0 0 42px rgba(72, 160, 140, 0.14),
    0 50px 150px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(18px) saturate(120%);
}
.modal-panel::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background: repeating-linear-gradient(0deg, rgba(172, 235, 218, 0.18) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}
.modal-panel::after {
  content: "◇";
  position: absolute;
  z-index: 5;
  right: 18px;
  bottom: 13px;
  color: rgba(127, 201, 194, 0.45);
  font-size: 12px;
  pointer-events: none;
}
.cursor-spark {
  position: fixed;
  z-index: 9999;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(236, 210, 155, 0.9);
  box-shadow: 0 0 8px rgba(127, 201, 194, 0.9);
  animation: spark-fade 0.72s ease-out forwards;
}
@keyframes spark-fade {
  0% { opacity: 0.9; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0.2); }
}
.place-burst {
  position: fixed;
  z-index: 9998;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 1px solid rgba(236, 210, 155, 0.9);
  border-radius: 50%;
  pointer-events: none;
  animation: place-burst 0.7s ease-out forwards;
}
@keyframes place-burst {
  from { opacity: 0.9; transform: scale(0.4); }
  to { opacity: 0; transform: scale(9); }
}
@keyframes modal-in { from { opacity: 0; transform: translateY(22px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-close { position: sticky; z-index: 5; top: 14px; margin: 14px 14px -48px auto; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); background: rgba(5, 13, 11, 0.7); color: var(--mist); backdrop-filter: blur(8px); transition: 0.25s; }
.modal-close:hover { color: var(--gold-bright); border-color: var(--line-strong); }
.modal-close svg { width: 15px; height: 15px; }
.modal-content { clear: none; }
.modal-hero { position: relative; min-height: 220px; padding: 48px 50px 28px; overflow: hidden; border-bottom: 1px solid var(--line-faint); }
.modal-hero.has-art { min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; }
.modal-hero-art { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.62; filter: saturate(0.88) contrast(1.04); }
.modal-hero.has-art::before { z-index: 1; background: linear-gradient(180deg, rgba(4, 9, 8, 0.08), rgba(4, 9, 8, 0.86) 78%), radial-gradient(90% 120% at 85% 0%, rgba(57, 110, 95, 0.32), transparent 58%); }
.modal-hero.has-art .modal-kicker,
.modal-hero.has-art .modal-title,
.modal-hero.has-art .modal-meta { z-index: 2; }
.modal-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(85% 130% at 88% 5%, rgba(57, 110, 95, 0.3), transparent 58%), linear-gradient(140deg, rgba(26, 48, 41, 0.2), transparent); pointer-events: none; }
.modal-kicker { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; font-size: 9px; letter-spacing: 0.16em; color: var(--gold); }
.modal-kicker::before { content: ""; width: 20px; height: 1px; background: var(--gold-dim); }
.modal-title { position: relative; z-index: 1; max-width: 700px; margin: 18px 0 13px; font-family: var(--serif); font-size: clamp(32px, 4.5vw, 52px); font-weight: 500; line-height: 1.25; letter-spacing: 0.05em; color: #f0e5d0; }
.modal-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px 16px; font-size: 10px; color: var(--mist-dark); }
.modal-meta span { display: inline-flex; align-items: center; gap: 6px; }
.modal-meta i { width: 3px; height: 3px; background: var(--gold-dim); border-radius: 50%; }
.modal-cover { position: absolute; z-index: 0; right: 42px; bottom: -35px; width: 165px; height: 210px; overflow: hidden; opacity: 0.55; mask-image: linear-gradient(90deg, transparent, #000 30%); }
.modal-cover img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7) saturate(0.8); }
.modal-body { padding: 33px 50px 45px; }
.modal-summary { max-width: 760px; font-family: var(--serif); font-size: 19px; line-height: 1.95; letter-spacing: 0.02em; color: #d4c9b5; }
.modal-detail { max-width: 760px; margin-top: 22px; font-size: 13px; line-height: 2.05; color: var(--mist); }
.modal-detail p + p { margin-top: 13px; }
.modal-section { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line-faint); }
.modal-section h3 { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.11em; color: var(--gold); font-weight: 400; }
.modal-section h3::before { content: "◇"; color: var(--gold-dim); font-size: 9px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.modal-relations { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }
.modal-relations div { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-faint); font-size: 12px; color: var(--paper-dim); }
.modal-relations span { color: var(--mist-dark); font-size: 9px; flex: 0 0 auto; }
.modal-related-events { display: flex; flex-direction: column; margin-top: 9px; }
.modal-event-link { display: grid; grid-template-columns: 90px 1fr auto; gap: 15px; align-items: center; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line-faint); background: transparent; text-align: left; color: var(--paper-dim); }
.modal-event-link:hover { color: var(--gold-bright); }
.modal-event-link time { font-family: var(--display); font-size: 9px; color: var(--gold-dim); }
.modal-event-link span { font-size: 12px; }
.modal-event-link em { font-style: normal; font-family: var(--display); font-size: 9px; color: var(--mist-dark); }
.modal-split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.modal-split .modal-section { margin-top: 26px; }
.modal-placeholder { padding: 60px 25px; text-align: center; color: var(--mist-dark); }

.editor-form { padding: 0 50px 42px; display: flex; flex-direction: column; gap: 17px; }
.editor-form .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.editor-form .field-wide { grid-column: 1 / -1; }
.editor-form label > span, .editor-form .field-label { display: flex; justify-content: space-between; gap: 10px; }
.editor-form label > span em, .editor-form .field-label em { font-style: normal; color: var(--mist-dark); font-size: 8px; letter-spacing: 0.02em; }
.editor-form .editor-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.editor-form .field-help { font-size: 9px; font-weight: 400; line-height: 1.65; color: var(--mist-dark); }
.editor-form .checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 9px; border: 1px solid var(--line); max-height: 160px; overflow: auto; background: rgba(7, 16, 14, 0.55); }
.editor-form .checkbox-grid label { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 10px; color: var(--mist); }
.editor-form .checkbox-grid input { width: 12px; height: 12px; accent-color: var(--gold); padding: 0; }
.editor-form .editor-check { justify-content: flex-start; gap: 8px; }
.editor-form .boolean-row { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--mist); }
.editor-form .boolean-row input { width: 13px; height: 13px; accent-color: var(--gold); }
.editor-form .field-wide { grid-column: 1 / -1; }
.editor-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 9px; margin-top: 5px; padding: 15px 0 0; background: linear-gradient(transparent, #0a1613 30%); }
.editor-help { margin: 0 50px 28px; padding: 12px 15px; border-left: 1px solid var(--gold-dim); background: rgba(199, 167, 107, 0.035); font-size: 10px; line-height: 1.8; color: var(--mist-dark); }
.modal-error { padding: 10px 13px; border: 1px solid rgba(181, 106, 99, 0.3); background: rgba(181, 106, 99, 0.06); color: var(--blood); font-size: 11px; }

.scene-modal-art { position: relative; aspect-ratio: 16 / 9; max-height: 62vh; overflow: hidden; background: #07110f; }
.scene-modal-art img, .scene-modal-art svg { width: 100%; height: 100%; object-fit: cover; }
.scene-modal-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #0a1613, transparent 45%); }
.scene-modal-title { position: relative; margin-top: -74px; z-index: 2; padding: 0 50px; }
.scene-modal-title h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: 0.05em; color: #f1e7d3; }
.scene-modal-title p { margin-top: 6px; font-size: 10px; letter-spacing: 0.13em; color: var(--gold); }
.scene-modal-copy { padding: 26px 50px 42px; }
.scene-modal-copy .modal-summary { font-size: 17px; }
.scene-upload-row { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.scene-upload-row .fineprint { flex: 1 1 260px; }
.upload-label { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--line); color: var(--paper-dim); font-size: 10px; cursor: pointer; }
.upload-label:hover { border-color: var(--line-strong); color: var(--gold-bright); }
.upload-label svg { width: 13px; height: 13px; }
.upload-label input { display: none; }
.lightbox-panel { width: min(1100px, 100%); background: #050d0b; }
.lightbox-image-wrap { display: flex; align-items: center; justify-content: center; min-height: 260px; max-height: 78vh; overflow: hidden; background: #030807; }
.lightbox-image { width: 100%; max-height: 78vh; object-fit: contain; }
.lightbox-caption { padding: 16px 22px 22px; border-top: 1px solid var(--line-faint); }
.lightbox-caption h2 { font-size: 22px; letter-spacing: 0.05em; }
.lightbox-caption p { margin-top: 6px; font-size: 11px; line-height: 1.8; color: var(--mist); }

/* ── 20. Footer, toast, utility ─────────────────────────────── */
.site-footer {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 30px;
  padding: 34px var(--gutter);
  border-top: 1px solid var(--line-faint);
  background: rgba(4, 11, 9, 0.46);
}
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-brand .brand-mark { width: 27px; height: 27px; }
.footer-brand div { display: flex; flex-direction: column; gap: 4px; }
.footer-brand strong { font-family: var(--serif); font-weight: 500; font-size: 13px; letter-spacing: 0.14em; color: var(--paper-dim); }
.footer-brand span { font-family: var(--display); font-size: 6px; letter-spacing: 0.18em; color: var(--mist-dark); }
.footer-quote { font-family: var(--serif); font-size: 12px; letter-spacing: 0.06em; text-align: center; color: var(--mist-dark); }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 8px; letter-spacing: 0.05em; color: var(--mist-dark); }

.toast-stack { position: fixed; z-index: 950; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { min-width: 220px; max-width: 360px; padding: 11px 15px; border: 1px solid var(--line-strong); background: rgba(7, 16, 14, 0.96); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4); color: var(--paper-dim); font-size: 11px; line-height: 1.7; animation: toast-in 0.35s var(--ease) both; }
.toast.is-error { border-color: rgba(181, 106, 99, 0.4); color: #dfb0aa; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.is-faded { opacity: 0.35; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ── 21. Responsive ─────────────────────────────────────────── */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1.08fr 0.92fr; }
  .hero-art { min-height: 520px; }
  .hero-stats { gap: 26px; }
  .timeline-grid { grid-template-columns: minmax(0, 1fr) minmax(390px, 0.86fr); }
  .codex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-row { grid-template-columns: 68px minmax(0, 1fr) 82px 64px; gap: 10px; }
}

@media (max-width: 980px) {
  :root { --nav-h: 68px; }
  .main-nav { display: none; }
  .menu-toggle { display: grid; }
  .year-chip { display: none; }
  .entry-start { bottom: 82px; }
  .entry-start h1 { font-size: clamp(62px, 13vw, 110px); }
  .entry-hud { top: 72px; }
  .entry-progress { bottom: 19px; }
  .entry-frame { inset: 11px; }
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 68px);
    padding-bottom: 84px;
  }
  .hero-copy { max-width: 790px; }
  .hero-art { min-height: 420px; margin-top: 18px; }
  .seal-wrap { width: min(76vw, 450px); }
  .hero-side-note { right: 4%; bottom: 10%; }
  .hero-scroll { display: none; }
  .preface-grid { grid-template-columns: 1fr; gap: 50px; }
  .preface-cards { max-width: 700px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .section-side-copy { text-align: left; max-width: 520px; }
  .chapter-section { grid-template-columns: 1fr; gap: 40px; }
  .chapter-visual { max-width: 540px; }
  .chapter-visual-frame { aspect-ratio: 4 / 3.8; }
  .secret-grid { grid-template-columns: 1fr; }
  .secret-card { min-height: auto; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 26px; }
  .page-head-aside { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .timeline-grid { grid-template-columns: 1fr; }
  .timeline-map-panel { position: relative; top: 0; order: 2; }
  .event-reader { order: 1; }
  .timeline-dock { grid-template-columns: auto 1fr; gap: 12px; padding: 12px 15px; }
  .dock-info { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; }
  .dock-controls { justify-self: start; }
  .timeline-scrub { min-width: 0; }
  .era-tabs { grid-template-columns: repeat(3, 1fr); }
  .era-tab { border-bottom: 1px solid var(--line-faint); }
  .atlas-layout { grid-template-columns: 1fr; }
  .atlas-detail { position: relative; top: 0; min-height: auto; }
  .atlas-detail-empty { min-height: 220px; }
  .scene-grid { grid-template-columns: repeat(2, 1fr); }
  .scene-card, .scene-card:nth-child(1), .scene-card:nth-child(2), .scene-card:nth-child(3), .scene-card:nth-child(4) { grid-column: span 1; min-height: 350px; }
  .scene-card:nth-child(1) { grid-column: span 2; min-height: 440px; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-card, .archive-card:nth-child(1), .archive-card:nth-child(7) { grid-column: span 1; min-height: 260px; }
  .archive-card:nth-child(1) { grid-column: span 2; min-height: 360px; }
  .codex-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .search-field { width: 100%; }
  .filter-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .filter-tab { flex: 0 0 auto; }
  .studio-layout { grid-template-columns: minmax(0, 1fr); }
  .studio-sidebar { position: relative; top: 0; width: 100%; min-width: 0; overflow: hidden; }
  .studio-nav { flex-direction: row; overflow-x: auto; width: 100%; max-width: 100%; min-width: 0; gap: 2px; padding: 10px 0; }
  .studio-nav button { flex: 0 0 auto; border: 1px solid var(--line-faint); padding: 8px 12px; }
  .studio-nav button:hover, .studio-nav button.is-active { padding-left: 12px; }
  .studio-sidebar-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; }
  .studio-sidebar-footer p { max-width: 470px; }
  .save-indicator { flex: 0 0 auto; margin-top: 0; }
  .studio-dashboard { grid-template-columns: 1fr; }
  .dashboard-portrait { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 18px; align-items: center; }
  .dashboard-portrait .dashboard-eyebrow { grid-column: 1 / -1; }
  .quick-action { border-bottom: 0; border-right: 1px solid var(--line-faint); }
  .quick-action:last-child { border-right: 0; }
  .site-footer { grid-template-columns: 1fr; gap: 17px; text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-meta { align-items: center; }
}

@media (max-width: 720px) {
  body { font-size: 14px; }
  .entry-topline { top: 25px; font-size: 7px; letter-spacing: 0.15em; }
  .entry-topline span:last-child { display: none; }
  .entry-start { bottom: 76px; left: 25px; width: calc(100vw - 50px); }
  .entry-start h1 { margin: 15px 0 14px; font-size: clamp(58px, 15.5vw, 92px); }
  .entry-lede { font-size: 14px; line-height: 1.95; }
  .entry-lede br { display: none; }
  .entry-actions { flex-direction: column; align-items: stretch; margin-top: 24px; }
  .entry-begin, .entry-silent { width: 100%; justify-content: space-between; }
  .entry-begin { gap: 10px; }
  .entry-credit { margin-top: 14px; font-size: 7px; line-height: 1.7; }
  .entry-skip { top: auto; bottom: 14px; right: 25px; padding: 7px 9px; }
  .entry-film.is-playing .entry-skip { bottom: 48px; }
  .entry-hud { top: 61px; right: 25px; gap: 10px; }
  .entry-phase { font-size: 7px; }
  .entry-year { font-size: 11px; }
  .entry-progress { left: 25px; right: 25px; bottom: 16px; gap: 10px; }
  .entry-progress span { font-size: 7px; }
  .entry-end { left: 25px; bottom: 78px; width: calc(100vw - 50px); }
  .entry-end h2 { font-size: clamp(46px, 13vw, 66px); }
  .entry-end > p:not(.entry-eyebrow) { font-size: 12px; }
  .entry-end-actions { flex-direction: row; align-items: stretch; margin-top: 20px; gap: 6px; }
  .entry-end-actions .entry-begin, .entry-end-actions .entry-silent { width: auto; flex: 1 1 46%; justify-content: center; gap: 2px; }
  .entry-end-actions .entry-begin { align-items: center; text-align: center; padding-left: 12px; padding-right: 12px; }
  .entry-end-actions .entry-begin span { font-size: 12px; letter-spacing: 0.04em; white-space: nowrap; }
  .entry-end-actions .entry-silent { padding-left: 8px; padding-right: 8px; font-size: 9px; }
  .footer-links { justify-content: center; }
  .footer-meta { align-items: center; }
  .hero { padding-bottom: 66px; }
  .hero-title { margin-top: 27px; }
  .hero-title-cn { font-size: clamp(54px, 15.5vw, 96px); letter-spacing: 0.02em; }
  .hero-title-en { font-size: 17px; letter-spacing: 0.34em; }
  .hero-subtitle { font-size: 7px; letter-spacing: 0.34em; margin-bottom: 26px; }
  .hero-intro { font-size: 13px; line-height: 2; }
  .hero-actions { flex-direction: column; align-items: stretch; margin-top: 28px; }
  .button { width: 100%; }
  .hero-actions .button { justify-content: space-between; padding: 0 18px; }
  .hero-actions .button-ghost { justify-content: flex-start; gap: 13px; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 43px; }
  .hero-art { min-height: 340px; }
  .seal-wrap { width: min(86vw, 350px); }
  .hero-art-label { display: none; }
  .hero-side-note { display: none; }
  .world-banner { height: 470px; }
  .world-banner-copy { bottom: 42px; }
  .world-banner-copy h2 { font-size: 27px; }
  .world-banner-coords { display: none; }
  .section { padding-top: 74px; padding-bottom: 74px; }
  .cinema-shell { aspect-ratio: 4 / 3; }
  .cinema-subtitle { width: 82%; bottom: 72px; font-size: 13px; }
  .cinema-title { top: 23px; left: 23px; }
  .cinema-title strong { font-size: 20px; }
  .cinema-time { font-size: 8px; }
  .cinema-controls { gap: 10px; }
  .cinema-play { width: 30px; height: 30px; }
  .cinema-replay { display: none; }
  .preface-lead h2 { font-size: 36px; }
  .preface-card { padding-left: 18px; }
  .preface-card:hover { padding-left: 24px; }
  .chapter-copy h2 { font-size: 29px; }
  .prose { font-size: 13px; line-height: 2.15; }
  .chapter-visual-frame { aspect-ratio: 1 / 1; }
  .section-heading h2 { font-size: 35px; }
  .next-section h2 { font-size: 44px; }
  .inner-page { padding-top: calc(var(--nav-h) + 48px); padding-bottom: 70px; }
  .page-head h1 { font-size: 53px; }
  .page-head { margin-bottom: 24px; }
  .page-lede { font-size: 12px; }
  .page-head-aside { flex-direction: column; align-items: stretch; gap: 14px; }
  .page-head-aside .live-date { align-items: flex-start; }
  .page-head-aside .button { width: 100%; justify-content: center; gap: 9px; }
  .era-tabs { grid-template-columns: repeat(2, 1fr); }
  .era-tab { padding: 11px 12px; }
  .era-tab span { font-size: 14px; }
  .event-yearline { gap: 15px; padding: 22px 0 18px; }
  .event-year { font-size: 72px; }
  .event-date-block span { font-size: 9px; }
  .event-date-block em { font-size: 11px; }
  .event-card { padding: 21px; }
  .event-card h2 { font-size: 26px; }
  .event-summary { font-size: 14px; }
  .event-body { font-size: 12px; }
  .event-reader-actions { flex-wrap: wrap; }
  .event-reader-actions .button { width: auto; flex: 1 1 42%; min-width: 0; }
  .event-reader-actions .text-link { width: 100%; margin-left: 0; margin-top: 5px; }
  .timeline-map-panel { padding: 12px; }
  .timeline-map { aspect-ratio: 3 / 2.25; }
  .marker-label { font-size: 7px; padding: 2px 5px; left: 10px; }
  .timeline-dock { grid-template-columns: 1fr; gap: 10px; bottom: 7px; padding: 12px 14px; }
  .dock-info { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; }
  .dock-info strong { white-space: normal; text-align: right; }
  .dock-controls { grid-column: 1; justify-self: stretch; justify-content: center; }
  .timeline-scrub { grid-column: 1; width: 100%; }
  .timeline-scale span { font-size: 6.5px; }
  .chronicle-drawer { top: 75px; bottom: 12px; right: 12px; left: 12px; width: auto; }
  .chronicle-entry { grid-template-columns: 60px 1fr; }
  .atlas-toolbar { flex-direction: column; align-items: stretch; }
  .map-tools { justify-content: flex-end; }
  .atlas-map-card .atlas-viewport { aspect-ratio: 3 / 2.35; }
  .atlas-bottom { flex-direction: column; gap: 8px; }
  .map-disclaimer { text-align: left; }
  .scene-grid { grid-template-columns: 1fr; }
  .scene-card, .scene-card:nth-child(1), .scene-card:nth-child(2), .scene-card:nth-child(3), .scene-card:nth-child(4) { grid-column: span 1; min-height: 340px; }
  .scene-card:nth-child(1) { min-height: 420px; }
  .scene-caption { opacity: 1; transform: none; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-card, .archive-card:nth-child(1), .archive-card:nth-child(7) { grid-column: span 1; min-height: 280px; }
  .codex-counts { display: none; }
  .codex-grid { grid-template-columns: 1fr; }
  .codex-card { min-height: 220px; }
  .filter-meta { gap: 10px; }
  .studio-table-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .studio-table-actions { width: 100%; }
  .studio-search { flex: 1 1 auto; min-width: 0; }
  .studio-search input { width: 100%; min-width: 0; flex: 1; }
  .studio-table-actions .button { width: auto; flex: 0 0 auto; }
  .studio-sidebar-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .studio-row { grid-template-columns: 52px minmax(0, 1fr) 52px !important; gap: 8px; }
  .studio-row-type { display: none; }
  .studio-row-actions { gap: 0; }
  .studio-row-actions button { width: 24px; height: 24px; }
  .dashboard-portrait { display: flex; padding: 18px 22px; }
  .quick-action { border-right: 0; border-bottom: 1px solid var(--line-faint); padding: 13px 0; }
  .dashboard-numbers { gap: 18px; }
  .note-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .note-row > div:first-child { grid-column: 1 / -1; }
  .note-level { grid-column: 2; grid-row: 2; }
  .data-action-grid { grid-template-columns: 1fr; }
  .meta-form-grid { grid-template-columns: 1fr; }
  .meta-form { padding: 0; }
  .modal { padding: 10px; }
  .modal-panel { max-height: 94vh; }
  .modal-hero { padding: 34px 22px 23px; }
  .modal-title { font-size: 32px; }
  .modal-body { padding: 24px 22px 33px; }
  .modal-summary { font-size: 16px; }
  .modal-split { grid-template-columns: 1fr; gap: 0; }
  .modal-cover { display: none; }
  .editor-form { padding: 0 22px 30px; }
  .editor-help { margin: 0 22px 22px; }
  .editor-form .form-grid { grid-template-columns: 1fr; }
  .editor-form .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
  .scene-modal-title { padding: 0 22px; margin-top: -48px; }
  .scene-modal-copy { padding: 22px 22px 33px; }
  .lightbox-caption { padding: 13px 16px 18px; }
  .site-footer { padding-top: 27px; padding-bottom: 27px; }
  .footer-quote { font-size: 11px; line-height: 1.8; }
  .toast-stack { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; width: 100%; }
}

@media (max-width: 420px) {
  .hero-title-cn { font-size: 62px; }
  .hero-stats { gap: 17px; }
  .event-year { font-size: 62px; }
  .page-head h1 { font-size: 46px; }
  .timeline-map { aspect-ratio: 4 / 3; }
  .marker-label { display: none; }
  .map-marker.has-label .marker-label { display: none; }
  .map-marker.is-active .marker-label { display: block; }
  .filter-tabs { gap: 0; }
  .filter-tab { padding: 7px 9px; }
  .cinema-title span { display: none; }
  .atlas-legend-inline { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}



/* ── Interactive atmosphere (vanilla takes on Atropos / anime.js) ── */
.cursor-aura {
  position: fixed;
  z-index: 9990;
  left: 0;
  top: 0;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(127, 201, 194, 0.12) 0%, rgba(199, 167, 107, 0.08) 32%, transparent 68%);
  mix-blend-mode: screen;
  transition: opacity 0.4s ease;
  will-change: transform;
}
.cursor-aura.is-visible { opacity: 0.8; }
.button { will-change: transform; }
.hero-art, .preface-card { backface-visibility: hidden; }
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-aura { display: none; }
  .hero-art, .preface-card { transform: none !important; }
  .hero-lights { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .world-banner-media img { transition: none; transform: scale(1.02); }
}

/* ── Pointer glow on cards ─────────────────────────────────── */
.codex-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(236, 210, 155, 0.12), transparent 68%);
  transition: opacity 0.35s ease;
}
.codex-card:hover::before { opacity: 1; }
.codex-card > * { position: relative; z-index: 1; }

/* Opening video layer */
.entry-video {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.entry-film.is-playing .entry-video { opacity: 1; }
.entry-film.is-video #entryCanvas { opacity: 0; }

/* ── Opening cuts (four selectable entry films) ─────────────── */
.opening-cuts {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(30px, 4vw, 56px);
}
.opening-cuts-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.opening-cuts-head h2 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--paper);
}
.opening-cuts-head > p {
  max-width: 360px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--mist-dark);
  text-align: right;
}
.opening-cuts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  background: var(--line-faint);
  border: 1px solid var(--line-faint);
}
.opening-cut {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 16px;
  background: var(--ink);
  transition: background 0.35s;
}
.opening-cut:hover { background: #0b1714; }
.opening-cut.is-selected { background: rgba(199, 167, 107, 0.055); box-shadow: inset 0 0 0 1px rgba(199, 167, 107, 0.2); }
.opening-cut video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #020707;
  border: 1px solid var(--line-faint);
}
.opening-cut-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.opening-cut-meta span { font-family: var(--display); font-size: 16px; color: var(--gold-dim); }
.opening-cut-meta small { font-family: var(--display); font-size: 7px; letter-spacing: 0.17em; color: var(--mist-dark); }
.opening-cut h3 { font-family: var(--serif); font-size: 21px; font-weight: 400; letter-spacing: 0.06em; color: var(--paper); }
.opening-cut p { min-height: 38px; font-size: 11px; line-height: 1.8; color: var(--mist); }
.cut-select {
  margin-top: auto;
  padding: 8px 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold-dim);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.08em;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.cut-select:hover, .opening-cut.is-selected .cut-select { color: var(--gold-bright); border-color: var(--line-strong); background: rgba(199, 167, 107, 0.06); }
@media (max-width: 1000px) {
  .opening-cuts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opening-cuts-head { display: block; }
  .opening-cuts-head > p { margin-top: 12px; max-width: none; text-align: left; }
}
@media (max-width: 600px) {
  .opening-cuts-grid { grid-template-columns: 1fr; }
}


/* ── Cinematic opening sequence ────────────────────────────── */
.film-trailer {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 72px) var(--gutter) clamp(34px, 5vw, 70px);
}
.film-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.film-head h2 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--paper);
}
.film-head > p { max-width: 360px; font-size: 12px; line-height: 1.9; color: var(--mist-dark); text-align: right; }
.film-stage {
  position: relative;
  aspect-ratio: 2.05 / 1;
  margin-top: 18px;
  overflow: hidden;
  background: #020707;
  border: 1px solid var(--line);
  isolation: isolate;
}
.film-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.06) brightness(0.82);
  opacity: 0;
  transition: opacity 0.7s ease;
}
.film-stage.is-card video { opacity: 0; }
.film-stage.is-playing:not(.is-card) video { opacity: 1; }
.film-shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 7, 7, 0.52), transparent 20%, transparent 72%, rgba(2, 7, 7, 0.72)),
    radial-gradient(80% 90% at 50% 50%, transparent 40%, rgba(2, 7, 7, 0.55) 100%);
}
.film-card {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 8% 12% 7%;
  background: linear-gradient(90deg, rgba(2, 7, 7, 0.94) 0%, rgba(2, 7, 7, 0.76) 42%, rgba(2, 7, 7, 0.08) 76%, transparent 100%);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}
.film-card::before { content: ""; width: 46px; height: 1px; background: var(--gold); box-shadow: 0 0 12px rgba(236, 210, 155, 0.5); }
.film-stage.is-card .film-card { opacity: 1; }
.film-stage.is-card video { opacity: 1; filter: saturate(0.66) contrast(1.08) brightness(0.5); }
.film-stage.is-end .film-card {
  align-items: center;
  justify-content: center;
  padding: 8% 10%;
  background: rgba(2, 7, 7, 0.84);
  text-align: center;
}
.film-stage.is-end .film-card::before { margin: 0 auto; }
.film-kicker { font-family: var(--display); font-size: 8px; letter-spacing: 0.24em; color: var(--gold-dim); }
.film-lines { display: flex; flex-direction: column; gap: 0.12em; max-width: 880px; }
.film-lines span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(38px, 5.6vw, 86px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.09em;
  color: var(--paper);
  text-wrap: balance;
  text-shadow: 0 4px 34px rgba(0, 0, 0, 0.55);
  animation: film-line-in 0.9s cubic-bezier(0.22, 0.7, 0.18, 1) both;
}
.film-lines span:nth-child(2) { animation-delay: 0.12s; }
@keyframes film-line-in {
  from { opacity: 0; transform: translateY(20px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.film-foot { margin-top: 6px; font-family: var(--display); font-size: 8px; letter-spacing: 0.18em; color: var(--mist-dark); }
.film-topline {
  position: absolute;
  z-index: 4;
  left: 22px;
  right: 22px;
  top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.18em;
  color: rgba(240, 231, 211, 0.5);
}
.film-play {
  position: absolute;
  z-index: 5;
  right: 7%;
  bottom: 12%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(236, 210, 155, 0.48);
  background: rgba(4, 10, 9, 0.72);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: opacity 0.35s, background 0.3s, border-color 0.3s;
}
.film-play svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.film-play:hover { background: rgba(199, 167, 107, 0.14); border-color: var(--gold); }
.film-stage.is-playing .film-play { opacity: 0; pointer-events: none; }
.film-progress { position: absolute; z-index: 5; left: 22px; right: 22px; bottom: 18px; height: 1px; background: rgba(236, 210, 155, 0.18); }
.film-progress i { display: block; width: 0; height: 100%; background: var(--gold); box-shadow: 0 0 10px rgba(236, 210, 155, 0.5); transition: width 0.2s linear; }
.film-controls { margin-top: 1px; border: 1px solid var(--line-faint); border-top: 0; background: var(--ink); }
.film-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-faint); }
.film-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  border: 0;
  background: var(--ink);
  color: var(--mist-dark);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: left;
  transition: color 0.25s, background 0.25s;
}
.film-tab span { font-family: var(--display); font-size: 9px; color: var(--gold-dim); }
.film-tab:hover { color: var(--paper); }
.film-tab.is-active { color: var(--gold-bright); background: rgba(199, 167, 107, 0.06); }
.film-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 16px; }
.film-meta p { font-size: 10px; line-height: 1.7; color: var(--mist-dark); }
.film-use { padding: 7px 10px; border: 1px solid var(--line); background: transparent; color: var(--gold-dim); font-size: 9px; letter-spacing: 0.08em; white-space: nowrap; }
.film-use:hover { color: var(--gold-bright); border-color: var(--line-strong); }
@media (max-width: 1000px) {
  .film-head { display: block; }
  .film-head > p { margin-top: 10px; max-width: none; text-align: left; }
  .film-stage { aspect-ratio: 16 / 9; }
}
@media (max-width: 700px) {
  .film-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .film-tab { padding: 10px 12px; font-size: 9px; }
  .film-meta { align-items: flex-start; flex-direction: column; gap: 10px; }
  .film-lines span { font-size: clamp(27px, 7.6vw, 44px); }
  .film-topline { left: 12px; right: 12px; top: 12px; font-size: 6px; }
  .film-progress { left: 12px; right: 12px; bottom: 12px; }
}
