:root {
  --ink: #092329;
  --deep: #061a1f;
  --deep-2: #0b3034;
  --cream: #f4f0e5;
  --paper: #fbf8ef;
  --gold: #d7ad58;
  --gold-light: #f3d891;
  --aqua: #89d1c4;
  --line: rgba(9, 35, 41, .14);
  --muted: #68777a;
  --shadow: 0 24px 60px rgba(3, 19, 22, .18);
  --serif: "STSong", "SimSun", Georgia, serif;
  --sans: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--sans); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.site-header { height: 76px; padding: 0 4.5vw; display: flex; align-items: center; justify-content: space-between; position: absolute; inset: 0 0 auto; z-index: 20; color: white; border-bottom: 1px solid rgba(255,255,255,.17); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 5px 12px rgba(0,0,0,.28)); }
.brand-logo-wide { width: 218px; height: 76px; object-position: left center; filter: drop-shadow(0 7px 16px rgba(0,0,0,.35)); }
.brand-divider, .brand-caption { display: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--gold-light); color: var(--gold-light); transform: rotate(45deg); font-family: Georgia, serif; font-size: 20px; }
.brand-mark::first-letter { transform: rotate(-45deg); }
.brand b, .brand small { display: block; }
.brand b { font-family: var(--serif); letter-spacing: .12em; font-size: 18px; }
.brand small { margin-top: 3px; opacity: .68; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.main-nav { display: flex; gap: 38px; font-size: 13px; letter-spacing: .12em; }
.main-nav a { position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -11px; height: 1px; background: var(--gold-light); transition: .25s; }
.main-nav a:hover::after { left: 0; right: 0; }
.nav-search { border: 0; color: white; background: rgba(255,255,255,.1); border-radius: 30px; padding: 10px 16px; cursor: pointer; }
.hero { min-height: 820px; height: 100vh; position: relative; overflow: hidden; background: var(--deep); color: white; display: flex; align-items: center; }
.hero-backdrop { position: absolute; inset: 0; background-position: center; background-size: cover; filter: saturate(.75) brightness(.64); transform: scale(1.03); transition: background-image .8s ease; }
.hero-vignette { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(1,17,20,.9) 0%, rgba(3,28,31,.67) 38%, rgba(2,21,24,.18) 70%), linear-gradient(0deg, rgba(1,15,18,.76), transparent 48%); }
.hero-content { position: relative; z-index: 2; width: 55%; padding-left: 9vw; margin-top: -25px; }
.eyebrow { margin: 0 0 25px; font-size: 11px; letter-spacing: .24em; font-weight: 700; color: var(--gold-light); display: flex; align-items: center; gap: 12px; }
.eyebrow span { width: 34px; height: 1px; background: currentColor; }
.eyebrow.dark { color: #8c7139; }
.hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(78px, 9vw, 145px); line-height: .84; letter-spacing: -.06em; font-weight: 500; text-shadow: 0 12px 40px rgba(0,0,0,.25); }
.hero h1 em { color: var(--gold-light); font-style: normal; padding-left: .45em; }
.hero-lead { max-width: 560px; margin: 36px 0 32px 3px; font-family: var(--serif); font-size: 18px; line-height: 1.9; color: rgba(255,255,255,.78); }
.hero-actions { display: flex; gap: 14px; }
.button { border-radius: 2px; padding: 15px 23px; display: inline-flex; align-items: center; gap: 24px; border: 1px solid transparent; font-size: 13px; letter-spacing: .08em; cursor: pointer; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: var(--deep); background: var(--gold-light); }
.button.ghost { border-color: rgba(255,255,255,.36); color: white; background: rgba(255,255,255,.05); }
.button.ink { background: transparent; color: var(--ink); border-color: var(--ink); }
.hero-stats { position: absolute; z-index: 2; right: 5vw; bottom: 36px; display: flex; border-top: 1px solid rgba(255,255,255,.28); }
.hero-stat { width: 130px; padding: 17px 0 0 24px; }
.hero-stat b { display: block; font-family: Georgia, serif; font-weight: 400; color: var(--gold-light); font-size: 30px; }
.hero-stat span { font-size: 10px; color: rgba(255,255,255,.58); letter-spacing: .14em; }
.scroll-hint { position: absolute; z-index: 2; bottom: 38px; left: 4.5vw; font-size: 10px; letter-spacing: .16em; color: rgba(255,255,255,.55); writing-mode: vertical-lr; }
.scroll-hint span { margin-top: 10px; color: var(--gold-light); }
.hero-orbit { position: absolute; z-index: 2; right: 8vw; top: 20%; width: 32vw; height: 50vh; pointer-events: none; }
.orbit-card { position: absolute; width: 230px; height: 280px; border: 1px solid rgba(243,216,145,.35); background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.01)); backdrop-filter: blur(8px); transform: rotate(5deg); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.orbit-card::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.13); }
.orbit-card img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 20px 22px rgba(0,0,0,.3)); }
.orbit-one { top: 5%; right: 2%; animation: float 5s ease-in-out infinite; }
.orbit-two { width: 180px; height: 220px; left: 0; bottom: 0; transform: rotate(-7deg); animation: float 6s ease-in-out -2s infinite; }
@keyframes float { 50% { translate: 0 -12px; } }
.marquee { overflow: hidden; background: var(--gold); color: var(--deep); height: 46px; display: flex; align-items: center; font-family: var(--serif); font-size: 15px; letter-spacing: .12em; white-space: nowrap; }
.marquee div { animation: marquee 28s linear infinite; }
.marquee i { margin: 0 25px; }
@keyframes marquee { to { transform: translateX(-42%); } }
.section { padding: 110px 8vw; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 50px; margin-bottom: 55px; }
.section-heading h2 { margin: 0; font: 500 clamp(42px, 5vw, 72px)/1 var(--serif); letter-spacing: -.04em; }
.section-heading > p { max-width: 480px; margin: 0 0 5px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.section-heading.light { color: white; }
.section-heading.light > p { color: rgba(255,255,255,.6); }
.archive { background: var(--paper); }
.archive-toolbar { display: grid; grid-template-columns: auto 1fr 160px; gap: 18px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.segmented { display: flex; background: #eae4d7; padding: 4px; }
.segmented button { border: 0; padding: 10px 18px; background: transparent; color: var(--muted); cursor: pointer; }
.segmented button.active { background: var(--ink); color: white; }
.segmented b { margin-left: 6px; opacity: .55; font-weight: 500; }
.search-box { height: 42px; display: flex; align-items: center; gap: 10px; border-left: 1px solid var(--line); padding-left: 18px; }
.search-box input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); }
#elementFilter { border: 0; background: transparent; outline: 0; color: var(--ink); }
.result-meta { margin: 24px 0 16px; color: var(--muted); font-size: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.creature-card { min-height: 390px; position: relative; border: 1px solid var(--line); background: #f0ecdf; overflow: hidden; cursor: pointer; transition: transform .28s, box-shadow .28s, border-color .28s; }
.creature-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); border-color: rgba(9,35,41,.3); }
.creature-image { height: 280px; position: relative; background: radial-gradient(circle at 50% 65%, rgba(255,255,255,.95), rgba(214,208,190,.55) 42%, rgba(207,199,180,.2) 68%); }
.creature-image::before { content: ""; position: absolute; inset: 25px; border: 1px solid rgba(9,35,41,.08); border-radius: 50%; }
.creature-image img { width: 100%; height: 100%; object-fit: contain; padding: 18px; position: relative; transition: transform .35s; filter: drop-shadow(0 17px 15px rgba(9,35,41,.18)); }
.creature-card:hover img { transform: scale(1.06); }
.creature-id { position: absolute; top: 13px; left: 13px; font: 10px/1 Georgia, serif; letter-spacing: .1em; color: rgba(9,35,41,.48); }
.element-pill { position: absolute; top: 12px; right: 12px; padding: 6px 9px; border-radius: 18px; background: rgba(9,35,41,.86); color: white; font-size: 10px; }
.creature-info { padding: 18px 18px 20px; }
.creature-info h3 { margin: 0 0 8px; font: 500 24px/1.1 var(--serif); }
.creature-info p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creature-info .card-foot { margin-top: 15px; display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--muted); }
.status-chip { color: #42675f; }
.center { text-align: center; margin-top: 40px; }
.world { background: var(--deep); color: white; }
.map-stage { position: relative; min-height: 620px; }
.map-image-wrap { height: 620px; overflow: hidden; background: #0b262b; }
.map-image-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3,22,25,.82), transparent 48%); pointer-events: none; }
.map-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s, transform .7s; }
.map-stage:hover .map-image-wrap img { transform: scale(1.015); }
.map-status { position: absolute; top: 24px; left: 24px; z-index: 2; padding: 7px 11px; background: rgba(4,28,31,.78); border: 1px solid rgba(255,255,255,.25); font-size: 10px; letter-spacing: .08em; }
.map-caption { position: absolute; z-index: 2; left: 55px; bottom: 42px; max-width: 620px; }
.map-caption > p:first-child { margin: 0 0 9px; color: var(--gold-light); font: 12px Georgia, serif; letter-spacing: .18em; }
.map-caption h3 { margin: 0 0 12px; font: 500 48px var(--serif); }
.map-caption p:last-child { margin: 0; max-width: 560px; font-size: 12px; color: rgba(255,255,255,.67); line-height: 1.7; }
.map-arrow { position: absolute; z-index: 4; top: 50%; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.4); color: white; background: rgba(3,23,25,.45); cursor: pointer; }
.map-arrow.prev { left: 16px; }.map-arrow.next { right: 16px; }
.map-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 4px; scrollbar-width: thin; }
.map-thumb { min-width: 150px; width: 150px; border: 1px solid transparent; padding: 4px; background: transparent; color: white; cursor: pointer; text-align: left; }
.map-thumb.active { border-color: var(--gold-light); }
.map-thumb img { width: 100%; height: 72px; object-fit: cover; opacity: .65; }
.map-thumb.active img, .map-thumb:hover img { opacity: 1; }
.map-thumb span { display: block; margin-top: 7px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.systems { background: #eee9dc; }
.element-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 44px; align-items: stretch; }
.element-wheel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.element-button { min-height: 92px; border: 1px solid var(--line); background: rgba(255,255,255,.38); color: var(--ink); cursor: pointer; position: relative; overflow: hidden; transition: .25s; }
.element-button::before { content: ""; position: absolute; inset: auto -25% -80% 25%; height: 130px; border-radius: 50%; background: var(--element-color, var(--aqua)); opacity: .16; }
.element-button:hover, .element-button.active { color: white; background: var(--ink); transform: translateY(-3px); }
.element-button b { display: block; position: relative; font: 500 24px var(--serif); }
.element-button small { position: relative; opacity: .55; letter-spacing: .12em; }
.element-detail { background: var(--ink); color: white; padding: 42px; min-height: 390px; position: relative; overflow: hidden; }
.element-detail::after { content: attr(data-symbol); position: absolute; right: -20px; bottom: -60px; font: 220px var(--serif); color: rgba(255,255,255,.035); }
.element-detail .big-element { font: 500 78px var(--serif); color: var(--gold-light); }
.element-detail h3 { margin: 20px 0 10px; font: 500 15px var(--sans); letter-spacing: .12em; }
.counter-list { display: flex; flex-wrap: wrap; gap: 8px; }
.counter-list span { border: 1px solid rgba(255,255,255,.2); padding: 8px 12px; font-size: 12px; }
.element-note { margin-top: 32px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.5); font-size: 11px; line-height: 1.7; }
.chronicle { background: #0b2b30; color: white; }
.story-archive { margin-bottom: 82px; padding: 34px; border: 1px solid rgba(240,212,138,.2); background: rgba(3,25,30,.72); box-shadow: 0 24px 70px rgba(0,0,0,.18); }
.story-overview { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: end; }
.story-overview h3, .chronicle-subhead h3 { margin: 8px 0 12px; font: 500 32px var(--serif); }
.story-overview > div > p:last-child { max-width: 680px; color: rgba(255,255,255,.6); font-size: 12px; line-height: 1.8; }
.story-stats { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid rgba(240,212,138,.2); }
.story-stats div { padding: 18px 12px; border-right: 1px solid rgba(240,212,138,.15); }
.story-stats div:last-child { border-right: 0; }
.story-stats b { display: block; color: var(--gold-light); font: 28px Georgia,serif; }
.story-stats span { color: rgba(255,255,255,.52); font-size: 9px; }
.story-toolbar { display: grid; grid-template-columns: auto minmax(260px,1fr); gap: 18px; margin: 30px 0 14px; }
.story-tabs { display: flex; gap: 7px; }
.story-tabs button { padding: 10px 16px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: rgba(255,255,255,.68); cursor: pointer; }
.story-tabs button.active { color: var(--deep); background: var(--gold-light); border-color: var(--gold-light); }
.story-search { display: flex; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid rgba(255,255,255,.2); }
.story-search input { width: 100%; padding: 10px 0; border: 0; outline: 0; color: white; background: transparent; }
.story-search input::placeholder { color: rgba(255,255,255,.38); }
.story-result-meta { margin: 14px 0; color: rgba(255,255,255,.45); font-size: 10px; }
.story-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.story-card { min-height: 210px; padding: 22px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.035); cursor: pointer; transition: .25s; }
.story-card:hover, .story-card:focus { translate: 0 -4px; border-color: rgba(240,212,138,.4); outline: none; }
.story-card.superseded { border-color: rgba(205,104,84,.48); background: rgba(92,35,30,.22); }
.story-card-meta, .story-card-foot { display: flex; justify-content: space-between; gap: 12px; color: var(--gold-light); font-size: 9px; letter-spacing: .08em; }
.story-card h4 { margin: 18px 0 10px; font: 500 21px var(--serif); }
.story-card p { min-height: 68px; margin: 0 0 20px; color: rgba(255,255,255,.58); font-size: 11px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.story-card-foot { padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.38); }
.legacy-index { border-top: 1px solid rgba(240,212,138,.18); }
.legacy-index summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px 0; color: rgba(255,255,255,.72); cursor: pointer; list-style: none; }
.legacy-index summary::-webkit-details-marker { display: none; }
.legacy-index summary span { color: var(--gold-light); font-size: 9px; letter-spacing: .18em; }
.legacy-index summary b { font: 500 18px var(--serif); }
.legacy-index[open] .chronicle-layout { padding-top: 28px; }
.story-dialog-head { padding: 54px 64px 34px; background: var(--paper); }
.story-dialog-head h2 { margin: 12px 0; font: 500 42px var(--serif); }
.story-dialog-head > p:last-child { color: var(--muted); }
.evidence-alert { margin: 0 0 28px; padding: 16px 18px; border-left: 3px solid #b85e4e; background: #f7e8df; color: #6d352d; font-size: 12px; line-height: 1.7; }
.chronicle-layout { display: grid; grid-template-columns: .7fr 1.3fr; gap: 70px; }
.timeline { border-left: 1px solid rgba(255,255,255,.2); padding-left: 30px; }
.timeline-item { position: relative; margin-bottom: 38px; }
.timeline-item::before { content: ""; position: absolute; left: -35px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 0 5px rgba(243,216,145,.1); }
.timeline-item time { color: var(--gold-light); font: 11px Georgia, serif; letter-spacing: .12em; }
.timeline-item h3 { margin: 7px 0; font: 500 21px var(--serif); }
.timeline-item p { margin: 0; color: rgba(255,255,255,.54); font-size: 11px; line-height: 1.7; }
.core-tabs { display: flex; gap: 7px; margin-bottom: 20px; flex-wrap: wrap; }
.core-tabs button { padding: 8px 12px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: rgba(255,255,255,.66); cursor: pointer; font-size: 11px; }
.core-tabs button.active { color: var(--deep); background: var(--gold-light); border-color: var(--gold-light); }
#coreCards { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.core-card { border: 1px solid rgba(255,255,255,.12); padding: 22px; background: rgba(255,255,255,.035); min-height: 150px; }
.core-card small { color: var(--gold-light); font-size: 9px; letter-spacing: .1em; }
.core-card h3 { margin: 11px 0 8px; font: 500 20px var(--serif); }
.core-card p { margin: 0; color: rgba(255,255,255,.58); font-size: 11px; line-height: 1.7; }
.evidence { margin-top: 16px; font-size: 9px; color: rgba(255,255,255,.4); }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; background: var(--paper); }
.about h2 { margin: 0 0 30px; font: 500 48px/1.25 var(--serif); }
.about-copy > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 2; }
.legend { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 20px; font-size: 10px; color: var(--muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; }
.dot.verified { background: #3e8f7d; }.dot.candidate { background: var(--gold); }.dot.missing { background: #a9acad; }
.archive-numbers { display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.archive-number { padding: 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.archive-number b { display: block; font: 500 45px Georgia, serif; color: #9b7837; }
.archive-number span { font-size: 11px; color: var(--muted); }
footer { padding: 42px 6vw; background: #041519; color: white; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
footer p { max-width: 570px; color: rgba(255,255,255,.42); font-size: 10px; line-height: 1.7; text-align: center; }
footer > a { font-size: 11px; color: var(--gold-light); }
.detail-dialog { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; background: var(--paper); color: var(--ink); box-shadow: 0 25px 100px rgba(0,0,0,.5); }
.detail-dialog::backdrop { background: rgba(1,13,15,.78); backdrop-filter: blur(5px); }
.dialog-close { position: fixed; z-index: 5; translate: -52px 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(9,35,41,.2); background: rgba(255,255,255,.78); cursor: pointer; font-size: 23px; }
.dialog-hero { display: grid; grid-template-columns: .8fr 1.2fr; min-height: 430px; }
.dialog-art { background: radial-gradient(circle, #fff 0, #ded8c9 62%, #c9c0ad 100%); display: grid; place-items: center; overflow: hidden; }
.dialog-art img { width: 100%; height: 430px; object-fit: contain; padding: 24px; filter: drop-shadow(0 20px 18px rgba(9,35,41,.2)); }
.dialog-summary { padding: 55px 46px; }
.dialog-summary .eyebrow { margin-bottom: 18px; }
.dialog-summary h2 { margin: 0 0 14px; font: 500 46px var(--serif); }
.dialog-summary > p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.detail-tags span { padding: 7px 10px; background: #e9e3d6; font-size: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 25px; }
.stat { padding: 12px; border: 1px solid var(--line); }
.stat span { display: block; color: var(--muted); font-size: 9px; }.stat b { display: block; margin-top: 4px; font: 500 20px Georgia, serif; }
.dialog-body { padding: 36px 46px 55px; border-top: 1px solid var(--line); }
.dialog-body h3 { font: 500 27px var(--serif); margin: 15px 0; }
.skill-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.skill-table th, .skill-table td { padding: 11px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.skill-table th { color: var(--muted); font-weight: 500; }
.skill-table td small, .form-stat-table td small { display:block; margin-top:.3rem; color:var(--muted); line-height:1.45; }
.form-stat-table td:not(:first-child):not(:last-child), .form-stat-table th:not(:first-child):not(:last-child) { text-align:center; }
.evidence-badge { display:inline-flex; align-items:center; width:max-content; margin:.25rem .2rem .1rem 0; padding:.25rem .55rem; border-radius:999px; font-size:.7rem; font-weight:800; border:1px solid rgba(48,65,68,.18); background:#eef2ee; color:#4b5e5a; white-space:nowrap; }
.evidence-badge.verified { background:#e4f3e8; color:#2f6f49; border-color:#b8ddc3; }
.evidence-badge.inferred { background:#fff1d5; color:#8a5a16; border-color:#e7c98d; }
.evidence-badge.derived { background:#e8eef8; color:#405d87; border-color:#bdcce3; }
.range-detail { margin-top:.35rem; cursor:pointer; }
.range-detail summary { color:var(--gold); font-size:.72rem; font-weight:800; }
.evidence-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:18px 0; }
.evidence-gallery.compact { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
.evidence-gallery figure { margin:0; padding:8px; border:1px solid var(--line); background:rgba(255,255,255,.7); }
.evidence-gallery img { display:block; width:100%; max-height:480px; object-fit:contain; background:#18262b; }
.evidence-gallery.compact img { height:150px; object-fit:cover; }
.evidence-gallery figcaption { padding:8px 3px 2px; color:var(--muted); font-size:.72rem; }
.empty-note { color: var(--muted); font-size: 12px; padding: 25px 0; }
.source-link { color: #8a682d; text-decoration: underline; text-underline-offset: 3px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }
@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(3,1fr); }
  .hero-orbit { opacity: .55; right: 2vw; }
  .section { padding-inline: 5vw; }
  .element-layout, .chronicle-layout { grid-template-columns: 1fr; }
  .story-overview { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .site-header { height: 64px; padding-inline: 18px; position: absolute; }
  .main-nav, .nav-search span, .brand small { display: none; }
  .hero { min-height: 720px; }
  .hero-content { width: 100%; padding: 0 22px; }
  .hero h1 { font-size: 74px; }
  .hero-lead { font-size: 15px; max-width: 90%; }
  .hero-actions { flex-wrap: wrap; }
  .hero-orbit { display: none; }
  .hero-stats { left: 20px; right: 20px; bottom: 26px; justify-content: space-between; }
  .hero-stat { width: auto; padding-left: 8px; }.hero-stat b { font-size: 22px; }
  .scroll-hint { display: none; }
  .section { padding: 78px 20px; }
  .section-heading { display: block; margin-bottom: 35px; }.section-heading > p { margin-top: 22px; }
  .section-heading h2 { font-size: 44px; }
  .archive-toolbar { grid-template-columns: 1fr; }.search-box { border-left: 0; padding-left: 0; }
  .card-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .creature-card { min-height: 280px; }.creature-image { height: 190px; }.creature-info h3 { font-size: 19px; }
  .map-stage, .map-image-wrap { min-height: 470px; height: 470px; }.map-caption { left: 24px; right: 24px; bottom: 25px; }.map-caption h3 { font-size: 36px; }
  .element-wheel { grid-template-columns: repeat(3,1fr); }.element-button { min-height: 76px; }.element-detail { padding: 28px; }
  #coreCards { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  footer { flex-direction: column; text-align: center; }
  .dialog-hero { grid-template-columns: 1fr; }.dialog-art img { height: 300px; }.dialog-summary { padding: 30px 24px; }.dialog-body { padding: 25px 24px; }
  .dialog-close { right: 10px; translate: 0 10px; position: fixed; }
  .skill-table { display: block; overflow-x: auto; }
  .story-archive { padding: 20px; margin-inline: -10px; }
  .story-stats { grid-template-columns: repeat(2,1fr); }
  .story-stats div:nth-child(2) { border-right: 0; }
  .story-toolbar { grid-template-columns: 1fr; }
  .story-tabs { display: grid; grid-template-columns: repeat(4,1fr); }
  .story-tabs button { padding-inline: 6px; }
  .story-grid { grid-template-columns: 1fr; }
  .story-dialog-head { padding: 44px 24px 24px; }
}
@media (max-width: 440px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .creature-info { padding: 12px; }.creature-image { height: 165px; }
  .element-wheel { grid-template-columns: repeat(2,1fr); }
}

/* ─────────────────────────────────────────────
   V2 · GPT Image 2 art direction
   ───────────────────────────────────────────── */
:root {
  --ink: #0c2a2f;
  --deep: #03191e;
  --deep-2: #092c32;
  --cream: #f2ecdc;
  --paper: #f7f1e2;
  --gold: #c99a45;
  --gold-light: #f0d48a;
  --aqua: #76c9c2;
  --line: rgba(12, 42, 47, .15);
  --serif: "FZKai-Z03", "STKaiti", "KaiTi", "SimSun", serif;
}
body { background: #f4eedf; }
body::selection { color: #071b20; background: #efd58d; }
.site-header {
  height: 86px;
  padding: 0 5.6vw;
  border-bottom-color: rgba(240,212,138,.2);
  background: linear-gradient(180deg, rgba(2,18,23,.46), transparent);
}
.brand { gap: 15px; }
.brand { margin-left: 2vw; gap: 17px; }
.brand-logo-wide { width: 228px; }
.brand-divider { display: block; width: 1px; height: 34px; background: linear-gradient(transparent, rgba(240,212,138,.72), transparent); }
.brand-caption { display: block; min-width: 156px; }
.brand-caption b, .brand-caption small { display: block; white-space: nowrap; }
.brand-caption b { color: #f6edda; font-family: var(--serif); font-size: 14px; font-weight: 500; letter-spacing: .18em; }
.brand-caption small { margin-top: 6px; color: rgba(240,212,138,.64); font: 8px Georgia, serif; letter-spacing: .17em; }
.brand-mark {
  width: 43px; height: 43px;
  border-color: rgba(240,212,138,.8);
  background: rgba(3,25,30,.35);
  box-shadow: 0 0 0 5px rgba(240,212,138,.05), inset 0 0 20px rgba(240,212,138,.06);
}
.brand b { font-size: 19px; letter-spacing: .18em; }
.brand small { color: var(--gold-light); opacity: .67; letter-spacing: .24em; }
.main-nav { gap: 46px; font-family: var(--serif); font-size: 15px; }
.nav-search { border: 1px solid rgba(240,212,138,.25); background: rgba(4,26,31,.45); backdrop-filter: blur(12px); padding: 11px 18px; }
.hero { min-height: 800px; isolation: isolate; }
.hero-backdrop { filter: none; transform: scale(1.01); background-position: center; }
.hero-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(1,16,21,.86) 0, rgba(2,20,27,.55) 36%, rgba(1,18,22,.08) 69%), linear-gradient(0deg, rgba(0,15,19,.83) 0, transparent 36%, rgba(0,11,16,.24) 100%);
}
.hero-vignette { background: radial-gradient(circle at 72% 42%, transparent 10%, rgba(0,10,14,.04) 45%, rgba(0,10,14,.34) 100%); }
.hero-content { width: 55%; padding-left: 7.6vw; margin-top: 12px; }
.hero .eyebrow { margin-bottom: 24px; color: #f3da94; letter-spacing: .34em; }
.hero h1 { font-size: clamp(84px, 8.25vw, 130px); line-height: .83; letter-spacing: -.08em; text-shadow: 0 10px 45px rgba(0,0,0,.4); }
.hero h1 em { display: inline-block; padding-left: .48em; color: #efd486; text-shadow: 0 0 44px rgba(239,212,134,.16); }
.hero-kicker { margin: 27px 0 0 4px; color: rgba(240,212,138,.6); font: 10px Georgia, serif; letter-spacing: .38em; }
.hero-lead { max-width: 600px; margin-top: 16px; font-size: 17px; line-height: 2; color: rgba(255,255,255,.74); }
.button { min-height: 50px; padding-inline: 25px; border-radius: 0; position: relative; overflow: hidden; }
.button.primary { background: linear-gradient(135deg, #f3da94, #cda14f); box-shadow: 0 10px 35px rgba(215,173,88,.2); }
.button.primary::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(7,27,32,.22); pointer-events: none; }
.button.ghost { border-color: rgba(240,212,138,.42); background: rgba(2,25,30,.34); backdrop-filter: blur(8px); }
.hero-orbit { display: none; }
.hero-stats {
  right: 5.8vw; bottom: 32px; padding: 13px 8px 10px;
  border: 1px solid rgba(240,212,138,.24);
  background: linear-gradient(135deg, rgba(1,22,27,.62), rgba(9,42,47,.26));
  backdrop-filter: blur(13px); box-shadow: 0 16px 46px rgba(0,0,0,.18);
}
.hero-stat { width: 124px; padding: 4px 15px; text-align: center; border-right: 1px solid rgba(240,212,138,.16); }
.hero-stat:last-child { border-right: 0; }
.hero-stat b { font-size: 28px; }
.hero-stat span { display: block; margin-top: 3px; font-size: 9px; color: rgba(255,255,255,.58); }
.scroll-hint { left: 3.4vw; color: rgba(240,212,138,.65); }
.marquee { height: 52px; background: #c79b4b; box-shadow: inset 0 1px rgba(255,255,255,.28), inset 0 -1px rgba(7,29,34,.24); font-size: 14px; }
.section { position: relative; overflow: hidden; }
.archive, .systems, .about {
  background-color: #f5efdf;
  background-image: linear-gradient(rgba(249,245,234,.86), rgba(249,245,234,.86)), url("assets/generated/parchment-atlas-gpt-image2.webp");
  background-size: 100% auto; background-position: center top; background-attachment: scroll; background-repeat: repeat-y;
}
.world, .chronicle {
  background-color: #03191e;
  background-image: linear-gradient(rgba(2,22,27,.3), rgba(2,22,27,.3)), url("assets/generated/midnight-atlas-gpt-image2.webp");
  background-size: cover; background-position: center; background-attachment: scroll; background-repeat: no-repeat;
}
.section-heading { align-items: center; margin-bottom: 64px; }
.heading-lockup { display: flex; align-items: center; gap: 26px; }
.chapter-no { color: rgba(12,42,47,.18); font: 400 68px/1 Georgia, serif; letter-spacing: -.08em; }
.section-heading.light .chapter-no { color: rgba(240,212,138,.18); }
.section-heading h2 { font-size: clamp(48px, 4.8vw, 76px); letter-spacing: -.07em; }
.section-heading .eyebrow { margin-bottom: 16px; }
.section-heading > p { max-width: 450px; padding-left: 22px; border-left: 1px solid rgba(12,42,47,.2); }
.section-heading.light > p { border-left-color: rgba(240,212,138,.24); }
.archive-toolbar {
  grid-template-columns: auto minmax(260px,1fr) 160px;
  padding: 13px;
  border: 1px solid rgba(12,42,47,.17);
  background: rgba(255,253,247,.54);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(41,51,42,.06);
}
.segmented { background: rgba(12,42,47,.08); padding: 3px; }
.segmented button { padding: 12px 20px; font-family: var(--serif); font-size: 15px; }
.segmented button.active { background: linear-gradient(135deg, #0e353a, #061f24); box-shadow: 0 6px 15px rgba(4,26,30,.16); }
.search-box { height: 46px; }
#elementFilter { padding: 0 10px; }
.result-meta { margin: 24px 3px 18px; letter-spacing: .08em; color: #768280; }
.card-grid { gap: 20px; }
.creature-card {
  min-height: 418px;
  background: rgba(249,246,236,.88);
  border: 1px solid rgba(12,42,47,.17);
  box-shadow: 0 10px 30px rgba(34,47,39,.06);
  isolation: isolate;
}
.creature-card::before, .creature-card::after { content: ""; position: absolute; z-index: 5; pointer-events: none; }
.creature-card::before { inset: 7px; border: 1px solid rgba(201,154,69,.22); }
.creature-card::after { left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--card-accent), transparent); opacity: .8; }
.creature-card:hover { transform: translateY(-9px); border-color: rgba(201,154,69,.62); box-shadow: 0 24px 60px rgba(3,25,30,.17); }
.creature-image { height: 296px; background: radial-gradient(circle at 50% 55%, rgba(255,255,255,.98) 0, color-mix(in srgb, var(--card-accent) 14%, #ede7d8) 48%, #ded5c3 100%); }
.creature-image::before { inset: 34px; border-color: color-mix(in srgb, var(--card-accent) 35%, transparent); box-shadow: 0 0 0 9px rgba(255,255,255,.13), inset 0 0 32px rgba(255,255,255,.28); }
.creature-image::after { content: "✦"; position: absolute; left: 50%; bottom: 7px; translate: -50%; color: var(--card-accent); opacity: .5; font-size: 11px; }
.creature-image img { padding: 23px; filter: drop-shadow(0 20px 17px rgba(9,35,41,.21)); }
.creature-id { top: 18px; left: 19px; color: rgba(12,42,47,.52); letter-spacing: .16em; }
.element-pill { top: 15px; right: 15px; min-width: 36px; text-align: center; padding: 7px 10px; background: var(--card-accent); box-shadow: 0 5px 18px color-mix(in srgb, var(--card-accent) 34%, transparent); }
.creature-info { padding: 20px 22px 23px; }
.creature-info h3 { font-size: 27px; }
.creature-info p { color: #73817e; }
.creature-info .card-foot { padding-top: 13px; border-top: 1px solid rgba(12,42,47,.1); }
.status-chip { color: #386b61; }
.button.ink { border-color: #0c2a2f; background: rgba(255,253,247,.4); }
.map-stage { min-height: 650px; padding: 10px; border: 1px solid rgba(240,212,138,.28); background: rgba(1,16,20,.56); box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.map-image-wrap { height: 630px; }
.map-image-wrap::after { inset: 10px; background: linear-gradient(0deg, rgba(2,18,22,.92), transparent 56%); }
.map-status { top: 36px; left: 36px; border-color: rgba(240,212,138,.4); color: #f0d48a; }
.map-caption { left: 66px; bottom: 54px; }
.map-caption h3 { font-size: 56px; }
.map-thumb { min-width: 170px; width: 170px; padding: 7px; border-color: rgba(240,212,138,.08); }
.map-thumb img { height: 82px; }
.map-thumb.active { border-color: #d7ad58; background: rgba(240,212,138,.05); }
.systems { background-position: center bottom; }
.element-button { min-height: 100px; background: rgba(255,253,247,.55); backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(44,52,44,.04); }
.element-button:hover, .element-button.active { background: linear-gradient(145deg, #0d3439, #041e23); box-shadow: 0 14px 30px rgba(3,25,30,.18); }
.element-detail { background-color: #061e23; background-image: linear-gradient(rgba(3,25,30,.42), rgba(3,25,30,.42)), url("assets/generated/midnight-atlas-gpt-image2.webp"); background-size: cover; border: 1px solid rgba(201,154,69,.25); box-shadow: 0 25px 60px rgba(3,25,30,.18); }
.chronicle-layout { gap: 85px; }
.timeline { border-left-color: rgba(240,212,138,.25); }
.timeline-item::before { background: #f0d48a; }
.core-card { background: rgba(6,36,41,.58); border-color: rgba(240,212,138,.16); backdrop-filter: blur(6px); transition: .25s; }
.core-card:hover { translate: 0 -4px; border-color: rgba(240,212,138,.36); background: rgba(10,48,53,.7); }
.about { padding-block: 125px; }
.about::after { content: "AIDI"; position: absolute; right: 3vw; bottom: -40px; color: rgba(12,42,47,.035); font: 190px Georgia, serif; letter-spacing: -.07em; }
.about h2 { font-size: 55px; }
.archive-numbers { background: rgba(255,253,247,.35); backdrop-filter: blur(6px); }
.archive-number { position: relative; overflow: hidden; }
.archive-number::after { content: "✦"; position: absolute; right: 20px; top: 15px; color: rgba(201,154,69,.25); }
footer { border-top: 1px solid rgba(240,212,138,.15); background: #021216; }
.detail-dialog { background-color: #f7f1e2; background-image: linear-gradient(rgba(249,246,236,.84), rgba(249,246,236,.84)), url("assets/generated/parchment-atlas-gpt-image2.webp"); background-size: cover; }
.dialog-art { background: radial-gradient(circle, #fffef9 0, color-mix(in srgb, var(--aqua) 8%, #e6decc) 57%, #cfc4ad 100%); }
.dialog-summary h2 { font-size: 52px; }
.archive-toolbar { grid-template-columns: auto minmax(220px,1fr) 145px 155px auto; }
#evidenceFilter { border: 0; background: transparent; outline: 0; color: var(--ink); padding: 0 8px; }
.inference-toggle { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--muted); font-size: 12px; cursor: pointer; }
.inference-toggle input { accent-color: #0c3a40; }
.evidence-lab { min-height: 640px; position: relative; overflow: hidden; display: grid; align-items: end; color: white; }
.evidence-lab-backdrop, .evidence-lab-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.evidence-lab-backdrop { object-fit: cover; }
.evidence-lab-shade { background: linear-gradient(90deg, rgba(1,16,22,.96) 0, rgba(2,21,29,.76) 44%, rgba(2,19,26,.16) 76%), linear-gradient(0deg, rgba(2,15,20,.8), transparent 58%); }
.evidence-lab-copy { position: relative; z-index: 2; width: min(680px, 86vw); margin: 0 0 64px 7vw; }
.evidence-lab-copy h2 { margin: 13px 0 18px; font: 500 clamp(44px,5vw,76px)/1.05 var(--serif); }
.evidence-lab-copy > p:not(.eyebrow) { max-width: 630px; color: rgba(255,255,255,.74); line-height: 1.9; }
.evidence-lab-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin: 28px 0; background: rgba(240,212,138,.2); border: 1px solid rgba(240,212,138,.24); }
.evidence-lab-stat { padding: 15px; background: rgba(3,26,32,.76); }
.evidence-lab-stat b { display: block; color: #f0d48a; font: 28px var(--serif); }
.evidence-lab-stat span { font-size: 10px; color: rgba(255,255,255,.6); }
.evidence-actions { display: flex; gap: 12px; }
.research-tools { display: none; align-items: center; flex-wrap: wrap; }
.research-mode .research-tools { display: flex; }
.research-tools > span { margin-right: 6px; color: rgba(255,255,255,.55); font-size: 10px; letter-spacing: .16em; }
.archive-to-atlas-transition { position: relative; z-index: 1; height: clamp(170px, 17vw, 250px); margin: -1px 0; overflow: hidden; background: #03191e url("assets/generated/evidence-to-atlas-transition-gpt-image2-v1.webp") center 43% / cover no-repeat; }
.archive-to-atlas-transition::before, .archive-to-atlas-transition::after { content: ""; position: absolute; inset-inline: 0; height: 42%; pointer-events: none; }
.archive-to-atlas-transition::before { top: 0; background: linear-gradient(to bottom, #031720 0, rgba(3,23,32,.36) 70%, transparent 100%); }
.archive-to-atlas-transition::after { bottom: 0; background: linear-gradient(to top, #03191e 0, rgba(3,25,30,.2) 72%, transparent 100%); }
.world { padding-top: 78px; border-top: 1px solid rgba(240,212,138,.13); }
.world > .section-heading { margin-top: 0; padding-top: 4px; }
.model-panel { margin-top: 28px; padding: 22px; border: 1px solid rgba(12,42,47,.16); background: rgba(255,253,247,.52); }
.model-panel h3 { margin-top: 0; }
.balance-panel { border-color: rgba(190,137,42,.32); background: linear-gradient(145deg, rgba(255,250,230,.78), rgba(240,232,205,.5)); }
.balance-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 18px 0; }
.balance-stats > div { padding: 14px; border: 1px solid rgba(12,42,47,.13); background: rgba(255,255,255,.48); }
.balance-stats span, .balance-stats small { display: block; color: var(--muted); font-size: 10px; }
.balance-stats b { display: block; margin: 5px 0; font: 22px var(--serif); color: var(--ink); }
.phase-list { margin: 12px 0 20px; padding-left: 24px; color: var(--muted); line-height: 1.8; }
.phase-list b { color: var(--ink); }
.candidate-skill-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.candidate-skill { padding: 11px; border: 1px solid rgba(12,42,47,.12); background: rgba(255,255,255,.45); font-size: 12px; }
.candidate-skill small { display: block; margin-top: 4px; color: var(--muted); }
.model-hidden { display: none !important; }

@media (min-width: 1500px) {
  .card-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
@media (max-width: 1100px) {
  .brand { margin-left: 0; }
  .brand-divider, .brand-caption { display: none; }
  .site-header { padding-inline: 4vw; }
  .hero-content { width: 63%; padding-left: 6vw; }
  .hero-stats { right: 3vw; }
  .heading-lockup { gap: 18px; }
  .archive-toolbar { grid-template-columns: auto 1fr 150px; }
  .inference-toggle { grid-column: 2 / -1; }
}
@media (max-width: 760px) {
  .site-header { height: 68px; padding-inline: 18px; }
  .brand { margin-left: 0; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-logo-wide { width: 158px; height: 58px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero { min-height: 760px; height: 100svh; }
  .hero-backdrop { background-position: 65% center; }
  .hero-backdrop::after { background: linear-gradient(90deg, rgba(1,16,21,.88), rgba(1,16,21,.33)), linear-gradient(0deg, rgba(0,14,18,.93), transparent 62%); }
  .hero-content { width: 100%; padding: 0 24px; margin-top: -42px; }
  .hero h1 { font-size: clamp(64px, 20vw, 84px); }
  .hero h1 em { padding-left: .18em; }
  .hero-kicker { letter-spacing: .24em; }
  .hero-lead { max-width: 100%; font-size: 14px; line-height: 1.85; }
  .hero-stats { left: 14px; right: 14px; bottom: 16px; padding-inline: 2px; }
  .hero-stat { padding-inline: 4px; }
  .hero-stat b { font-size: 20px; }.hero-stat span { font-size: 8px; }
  .archive, .systems, .about, .world, .chronicle { background-attachment: scroll; }
  .heading-lockup { align-items: flex-start; gap: 13px; }
  .chapter-no { font-size: 42px; }
  .section-heading h2 { font-size: 40px; }
  .section-heading > p { padding: 18px 0 0; margin-top: 22px; border-left: 0; border-top: 1px solid var(--line); }
  .section-heading.light > p { border-top-color: rgba(240,212,138,.2); }
  .archive-toolbar { grid-template-columns: 1fr; padding: 10px; }
  .inference-toggle { grid-column: auto; padding: 8px; }
  .evidence-lab { min-height: 620px; }
  .evidence-lab-copy { margin: 0 auto 50px; }
  .evidence-lab-stats { grid-template-columns: repeat(2,1fr); }
  .archive-to-atlas-transition { height: 150px; background-position: center 48%; }
  .world { padding-top: 62px; }
  .candidate-skill-list { grid-template-columns: 1fr; }
  .balance-stats { grid-template-columns: repeat(2,1fr); }
  .creature-card { min-height: 310px; }
  .creature-image { height: 195px; }
  .creature-image::before { inset: 23px; }
  .creature-image img { padding: 15px; }
  .creature-info { padding: 14px; }
  .creature-info h3 { font-size: 21px; }
  .creature-info .card-foot { font-size: 9px; }
  .map-stage { min-height: 490px; padding: 6px; }
  .map-image-wrap { height: 476px; }
  .map-image-wrap::after { inset: 6px; }
  .map-caption { left: 27px; bottom: 27px; }
  .map-caption h3 { font-size: 38px; }
  .map-status { top: 24px; left: 24px; }
  .map-thumb { min-width: 135px; width: 135px; }
  .map-thumb img { height: 66px; }
  .about h2 { font-size: 42px; }
}
