:root {
  /* Night-sea UI over the map; orange is the only accent */
  --night: #0f1a1e;
  --sea: #0f1c21;
  --panel: rgba(12, 24, 28, 0.74);
  --accent: #f26c1c;
  --ink: #f3ead6;
  --text: #e4dccb;
  --soft: #aebbc5;
  --line: rgba(243, 234, 214, 0.28);
  --paper: rgba(255, 255, 255, 0.05);
  --on-ink: #0f1a1e;
  /* Card background colors = rarity */
  --blue: #1f4fd3;
  --red: #e2431b;
  --mag: #e0127a;
  --cyan: #0b9fa1;
  --yellow: #f2ad00;
  --display: "Arial Black", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --body: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --ease: cubic-bezier(.215, .61, .355, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; background: var(--sea); }
body { margin: 0; background: transparent; color: var(--text); font: 16px/1.75 var(--body); -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Background: the map as a tilted ground plane, seen from above at an angle */
.mapbg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--sea); perspective: 950px; perspective-origin: 50% 18%; }
.mapplane { position: absolute; left: -60%; right: -60%; top: -70%; bottom: 0; overflow: hidden; transform-origin: 50% 100%; transform: rotateX(48deg); }
.mapdrift { position: absolute; inset: 0; will-change: transform; }
/* JS sets a transform per section; CSS glides between them */
.mapimg { position: absolute; left: 0; top: 0; width: 2560px; height: 3148px; max-width: none; transform-origin: 0 0; }
.mapimg.glide { transition: transform 1.8s cubic-bezier(.65, 0, .35, 1); }
/* Distance haze over the horizon */
.mapfog { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--sea) 0%, color-mix(in srgb, var(--sea) 70%, transparent) 14%, transparent 40%); }

main { overflow-x: clip; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.mt-l { margin-top: 52px; }

/* Top bar. Opaque composited layers over the tilted map make Chrome cull a wrong strip of it; keep them a hair translucent */
.top { position: sticky; top: 0; z-index: 20; background: rgba(10, 19, 22, 0.95); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 26px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 900 20px/1 var(--body); color: var(--ink); flex: none; letter-spacing: 0.04em; }
.brand-mark { width: 30px; height: 30px; filter: invert(1); }
.nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; flex: 1; align-self: stretch; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; display: flex; align-items: center; text-decoration: none; font: 700 15px/1 var(--body); white-space: nowrap; color: var(--soft); transition: color 0.3s var(--ease); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); transform: scaleX(0); transition: transform 0.3s var(--ease); }
.nav a:hover, .nav a.on { color: var(--ink); }
.nav a.on::after { transform: scaleX(1); }
.lang { flex: none; font: 700 13px/1 var(--body); letter-spacing: 0.08em; border: 1px solid var(--line); background: none; color: var(--ink); padding: 8px 11px; cursor: pointer; transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.lang:hover { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }

/* Buttons: fill wipes in from the left on hover */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; font: 700 15px/1 var(--body); letter-spacing: 0.06em;
  padding: 13px 24px; border: 1px solid var(--ink); background: none; color: var(--ink); text-decoration: none; cursor: pointer; transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.3s var(--ease); }
.btn:hover { color: var(--on-ink); border-color: var(--accent); }
.btn:hover::before { transform: scaleX(1); }
.btn-ink { background: var(--accent); border-color: var(--accent); color: var(--on-ink); padding-right: 30px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%); }
.btn-ink::before { background: var(--ink); }
.btn-ink:hover { border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero: no box, a soft dark pool behind the text */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 48px; }
.hero-text { position: relative; isolation: isolate; justify-self: start; padding: 24px 0; }
.hero-text::before { content: ""; position: absolute; inset: -90px -140px -90px -160px; z-index: -1; background: radial-gradient(closest-side, rgba(9, 18, 21, 0.86) 45%, rgba(9, 18, 21, 0)); }
.hero h1 { font: 900 clamp(56px, 8vw, 112px)/1 var(--display); letter-spacing: 0.02em; white-space: nowrap; }
:lang(en) .hero h1 { font-size: clamp(40px, 5.2vw, 72px); line-height: 1.02; white-space: normal; }
.hero-en { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; font: 900 clamp(13px, 1.3vw, 16px)/1 var(--display); letter-spacing: 0.24em; color: var(--ink); }
.hero-en::before { content: ""; width: 14px; height: 14px; background: var(--accent); flex: none; }
:lang(en) .hero-en { letter-spacing: 0.12em; font-family: var(--body); }
.lede { display: flex; align-items: center; gap: 0.9em; margin: 26px 0 0; font: 300 clamp(15px, 1.5vw, 18px)/1.4 var(--body); letter-spacing: 0.42em; color: var(--ink); }
.lede::before, .lede::after { content: ""; width: 22px; height: 1px; background: var(--ink); opacity: 0.7; flex: none; }
:lang(en) .lede { letter-spacing: 0.08em; }
.byline { font-size: 14px; color: var(--soft); margin: 22px 0 30px; }
.byline a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--accent); }

.fan { position: relative; height: 420px; --step: 84px; opacity: 0; }
.fan img {
  position: absolute; left: 50%; bottom: 40px; width: 200px; height: auto; margin-left: -100px;
  background: #fff; border: 1px solid #d4d4d4; box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.5); opacity: 0.995;
  transform: translateX(0);
}
/* The stack rises as one piece, then the cards slide apart along a straight line */
.fan.deal { will-change: transform, opacity; animation: rise 0.45s cubic-bezier(.2, .7, .3, 1) 0.1s both; }
.fan.deal img { will-change: transform; animation: spread 0.75s cubic-bezier(.3, 1.35, .5, 1) both; animation-delay: calc(0.4s + var(--k) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes spread { to { transform: translateX(calc(var(--i) * var(--step))); } }
/* After the deal: static, hover lifts a card */
.fan.settled { opacity: 1; }
.fan.settled img { transform: translateX(calc(var(--i) * var(--step))); transition: transform 0.22s cubic-bezier(.2, .8, .2, 1); }
.fan.settled img:hover { transform: translateX(calc(var(--i) * var(--step))) translateY(-18px); }

/* Loading screen (only when JS runs) */
.loader { display: none; }
.js .loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(closest-side at 50% 46%, rgba(56, 87, 92, 0.3), transparent), var(--sea);
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s; }
.js .loader.done { opacity: 0; visibility: hidden; }
.loader-in { display: grid; justify-items: center; width: min(300px, 72vw); }
.loader-logo { width: 116px; height: 116px; margin-bottom: 44px; filter: invert(1); animation: loader-spin 7s linear infinite; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
.loader-bar { position: relative; width: 100%; height: 2px; background: var(--line); }
.loader-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.loader-row { display: flex; justify-content: space-between; width: 100%; margin-top: 12px; font: 900 13px/1 var(--display); letter-spacing: 0.12em; color: var(--ink); font-variant-numeric: tabular-nums; }
.loader-row b { font-weight: 900; }

/* Sections: night-sea glass with feathered edges, a hairline with an orange tick, corner marks */
.sec { padding: 48px 0; }
.sec > .wrap { position: relative; width: min(1080px, calc(100% - 48px)); padding: 40px 44px 44px; background: var(--panel); box-shadow: 0 0 48px 30px var(--panel); }
.sec > .wrap::before { content: ""; position: absolute; left: 44px; right: 44px; top: 0; height: 1px;
  background: linear-gradient(to right, var(--accent) 0 56px, var(--line) 56px); }
.sec > .wrap::after { content: ""; position: absolute; right: 18px; bottom: 18px; width: 11px; height: 11px; opacity: 0.6;
  background: linear-gradient(var(--ink), var(--ink)) 50% 0 / 1px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) 0 50% / 100% 1px no-repeat; }

/* Section heading: big English word with a period, Chinese title under an orange square */
.sec-head { margin-bottom: 30px; }
.sec-en { position: relative; display: inline-block; font: 900 clamp(46px, 7.4vw, 96px)/0.92 var(--display); letter-spacing: -0.015em; color: var(--ink); }
.sec-head h2 { display: flex; align-items: center; gap: 10px; margin-top: 12px; font: 900 clamp(18px, 1.9vw, 22px)/1.3 var(--body); letter-spacing: 0.08em; }
.sec-head h2::before { content: ""; width: 12px; height: 12px; background: var(--accent); flex: none; }
:lang(en) .sec-head h2 { letter-spacing: 0.02em; }

/* Sub-headings as solid tags */
.wrap > h3 { display: inline-block; margin-bottom: 18px; padding: 6px 14px 6px 11px; border-left: 4px solid var(--accent); background: var(--ink); color: var(--on-ink); font: 900 15px/1.2 var(--body); letter-spacing: 0.06em; }

/* Text: light lead lines against heavy key phrases */
.lead { margin: 0 0 28px; font: 300 clamp(26px, 3.3vw, 40px)/1.32 var(--body); color: var(--ink); }
.lead .ln { display: block; }
.lead .ln-b, .lead b { font-weight: 900; }
.lead::before { content: "//"; display: block; margin-bottom: 6px; font: 300 18px/1 var(--body); color: var(--accent); letter-spacing: 0.1em; }
.lead-sm { font-size: clamp(19px, 2.1vw, 25px); line-height: 1.55; max-width: 34em; text-wrap: balance; }
.prose { max-width: 46em; font-size: 16px; line-height: 2; margin: 0; }
.cols { max-width: none; columns: 2 300px; column-gap: 44px; }

/* Short-phrase lists */
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.points li { position: relative; padding-left: 18px; line-height: 1.5; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; background: var(--ink); }
.points-inline { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.points-inline li { padding: 4px 10px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; letter-spacing: 0.04em; }
.points-inline li::before { display: none; }

/* Video cards */
/* Carousels: one row of four, arrows on the sides, counter + progress underneath */
.carousel { position: relative; padding: 0 58px; }
.car-view { overflow: hidden; }
.car-track { --gap: 20px; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--gap)) / 4); column-gap: var(--gap); align-items: start; transition: transform 0.65s var(--ease); }
.car-btn { position: absolute; top: calc(var(--thumb-h, 140px) / 2 - 30px); width: 40px; height: 60px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); background: rgba(9, 18, 21, 0.6); color: var(--ink); cursor: pointer; transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), opacity 0.3s var(--ease); }
.car-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.car-prev { left: 0; }
.car-next { right: 0; }
.car-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.car-btn:disabled { opacity: 0.25; cursor: default; }
.car-foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 16px; }
.car-count { font: 900 13px/1 var(--display); letter-spacing: 0.08em; color: var(--ink); }
.car-bar { position: relative; width: 120px; height: 2px; background: var(--line); }
.car-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 0.65s var(--ease); }
.carousel.single .car-btn, .carousel.single .car-foot { visibility: hidden; }
.carousel.single .car-foot { height: 0; margin: 0; }
.pick, .vid { display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #1c3138; border: 1px solid var(--line); transition: border-color 0.3s var(--ease); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.pick:hover .thumb, .vid:hover .thumb { border-color: var(--accent); }
.pick:hover .thumb img, .vid:hover .thumb img { transform: scale(1.04); }
.pick h4 { font: 700 16px/1.5 var(--body); margin: 12px 0 6px; transition: color 0.3s var(--ease); }
.pick .points-inline { margin: 0 0 10px; gap: 6px; }
.pick .points-inline li { font-size: 12px; padding: 2px 8px; }
.pick .meta { margin-top: auto; }
.pick:hover h4, .vid:hover h4 { color: var(--accent); }
.dur { position: absolute; right: 0; bottom: 0; background: rgba(9, 18, 21, 0.85); color: #fff; font: 700 12px/1 var(--body); padding: 5px 7px; }
.hot { position: absolute; left: 0; top: 0; background: var(--accent); color: var(--on-ink); font: 900 12px/1 var(--body); padding: 5px 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--soft); }
.meta b { color: var(--ink); font-weight: 700; }

/* Cards */
.read { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 40px; align-items: center; }
.anatomy img { width: 100%; height: auto; background: #fff; }

.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 22px; }
/* Near-opaque so stacked cards don't show through during the deal; fully opaque layers trip Chrome's culling over the 3D map */
.tier { position: relative; margin: 0; background: rgba(27, 42, 47, 0.97); border: 1px solid var(--line); }
.tiers.pre { opacity: 0; }
.tier img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; }
.tier figcaption { border-top: 6px solid var(--tc); padding: 10px 12px 12px; display: grid; gap: 2px; }
.tier strong { font: 900 18px/1.2 var(--body); color: var(--ink); letter-spacing: 0.06em; }
.tier span { font-size: 12px; line-height: 1.5; color: var(--soft); }
.tier[data-tier="blue"] { --tc: var(--blue); }
.tier[data-tier="red"] { --tc: var(--red); }
.tier[data-tier="magenta"] { --tc: var(--mag); }
.tier[data-tier="cyan"] { --tc: var(--cyan); }
.tier[data-tier="yellow"] { --tc: var(--yellow); }
:lang(en) .tier strong { letter-spacing: 0; }

/* Lore: text left, card-group donut right */
.lore-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 0 48px; align-items: start; }
.mix { margin: 8px 0 0; display: grid; gap: 18px; }
.mix-title { display: flex; align-items: center; gap: 8px; font: 900 14px/1.3 var(--body); letter-spacing: 0.08em; color: var(--ink); }
.mix-title::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; }
.mix-donut { position: relative; width: 262px; aspect-ratio: 1; justify-self: center; }
.mix-donut > svg, .mix-orbit svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* HUD corner brackets */
.mix-donut::before { content: ""; position: absolute; inset: -8px; pointer-events: none; opacity: 0.45;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 12px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 0 / 1px 12px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 100% 0 / 12px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) 100% 0 / 1px 12px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 100% / 12px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 100% / 1px 12px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 100% 100% / 12px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) 100% 100% / 1px 12px no-repeat; }
/* Clockwise sweep the first time the chart comes into view */
.mix-ring { fill: none; stroke: #fff; stroke-width: 90; stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.3s cubic-bezier(.65, 0, .35, 1); }
.mix.in .mix-ring { stroke-dashoffset: 0; }
.mix-hole { fill: rgba(9, 18, 21, 0.6); }
.mix-dots { fill: none; stroke: rgba(169, 228, 228, 0.35); stroke-width: 1; stroke-dasharray: 1 3; }
.mix-ticks { fill: none; stroke: rgba(243, 234, 214, 0.26); stroke-width: 1; opacity: 0; transition: opacity 0.8s ease 0.4s; }
.mix-major { stroke: rgba(243, 234, 214, 0.65); }
.mix.in .mix-ticks { opacity: 1; }
.mix-arc { fill: none; stroke: var(--accent); stroke-width: 2.5; opacity: 0; transition: opacity 0.25s var(--ease); }
.mix.focus .mix-arc { opacity: 1; }
.mix path { cursor: pointer; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease); }
.mix.focus path { opacity: 0.3; }
.mix path.on { opacity: 1; transform: translate(var(--dx), var(--dy)); filter: drop-shadow(0 0 6px rgba(126, 202, 205, 0.55)); }
/* Slow orbit ring (only turns while on screen) and a one-time radar pass */
.mix-orbit { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.8s ease 0.6s; }
.mix.in .mix-orbit { opacity: 1; }
.orbit-dash { fill: none; stroke: rgba(243, 234, 214, 0.2); stroke-width: 1; stroke-dasharray: 2 5; }
.orbit-mark { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.mix.live .mix-orbit svg { animation: mix-orbit 40s linear infinite; }
@keyframes mix-orbit { to { transform: rotate(360deg); } }
.mix-scan { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0;
  background: conic-gradient(rgba(126, 202, 205, 0) 0deg 280deg, rgba(169, 228, 228, 0.32) 360deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 50%, #000 51%, #000 81%, transparent 82%);
  mask: radial-gradient(circle closest-side, transparent 50%, #000 51%, #000 81%, transparent 82%); }
.mix.in .mix-scan { animation: mix-scan 1.6s cubic-bezier(.45, 0, .25, 1) 0.2s; }
@keyframes mix-scan { 0% { opacity: 0; transform: rotate(0deg); } 15%, 80% { opacity: 1; } 100% { opacity: 0; transform: rotate(360deg); } }
.mix-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 3px; padding: 0 64px; text-align: center; pointer-events: none; }
.mix-center b { font: 900 30px/1.05 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.mix-center span { font-size: 12px; line-height: 1.35; color: var(--ink); }
.mix-center small { font-size: 12px; line-height: 1.2; color: var(--soft); }
.mix-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.mix-legend button { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 44px; gap: 3px 10px; align-items: center; padding: 5px 8px; border: 0; background: none;
  color: var(--text); font: 13px/1.35 var(--body); text-align: left; cursor: pointer; transition: background 0.2s var(--ease), opacity 0.2s var(--ease); }
.mix-legend i { width: 10px; height: 10px; background: var(--c); }
/* Share bars grow in under each row */
.mix-legend em { grid-column: 2 / -1; height: 2px; background: var(--c); opacity: 0.75; transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.9s var(--ease) calc(0.5s + var(--k) * 90ms); }
.mix.in .mix-legend em { transform: scaleX(var(--w)); }
.mix-n, .mix-p { text-align: right; font-variant-numeric: tabular-nums; }
.mix-n { color: var(--ink); font-weight: 700; }
.mix-p { color: var(--soft); }
.mix-legend button.on { background: rgba(243, 234, 214, 0.1); }
.mix.focus .mix-legend button:not(.on) { opacity: 0.5; }

/* Atlas: text and button left; two skeletons pass through the right side over a size ruler */
.atlas { position: relative; z-index: 1; display: grid; justify-items: start; gap: 24px; max-width: 25em; }
#atlas .sec-head { position: relative; z-index: 1; }
.atlas-stage { position: absolute; left: 46%; right: 44px; top: 50%; transform: translateY(-50%); pointer-events: none; }
/* Group opacity, so the small skeleton in front fully hides the part of the big one behind it */
.atlas-figs { position: relative; aspect-ratio: var(--figs-ar, 4.38); opacity: 0.45; }
.sk { position: absolute; bottom: 0; height: auto; max-width: none; }
.sk-small { left: 0; width: var(--small-w); }
.sk-big { left: var(--big-l); width: var(--big-w); }
.atlas-ruler { position: relative; height: 74px; margin-top: 8px; }
.ruler-ticks { position: absolute; left: 0; right: 0; top: 0; height: 26px; border-top: 1px solid rgba(243, 234, 214, 0.55); }
.ruler-ticks i { position: absolute; top: 0; width: 1px; height: 6px; background: rgba(243, 234, 214, 0.45); }
.ruler-ticks i.major { height: 11px; background: var(--accent); }
.ruler-ticks span { position: absolute; top: 13px; left: 0; transform: translateX(-50%); font: 900 10px/1 var(--display); letter-spacing: 0.06em; color: var(--soft); white-space: nowrap; }
.ruler-ticks i:first-child span { transform: none; }
.ruler-span { position: absolute; height: 0; border-top: 1.5px solid; transform-origin: 0 50%; }
.ruler-span::before, .ruler-span::after { content: ""; position: absolute; top: -5px; width: 1.5px; height: 9px; background: currentColor; }
.ruler-span::before { left: 0; }
.ruler-span::after { right: 0; }
.ruler-span b { position: absolute; left: 50%; top: -8px; transform: translateX(-50%); padding: 0 6px; background: rgb(17, 31, 36); font: 900 11px/16px var(--display); letter-spacing: 0.04em; white-space: nowrap; }
.ruler-small { top: 40px; color: var(--accent); }
.ruler-big { top: 62px; color: var(--ink); }
.ruler-small b { color: var(--accent); }
.ruler-big b { color: var(--ink); }
/* Scrolling in: the skeletons slide in from the left edge (the big one a beat later, behind), the ruler draws in,
   the length spans grow; scrolling past carries everything on to the right and out */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    #atlas { view-timeline: --atlas block; }
    .atlas-figs, .sk-small, .sk-big, .atlas-ruler, .ruler-span, .ruler-span b { animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --atlas; }
    .atlas-figs { animation-name: sk-fade; }
    .sk-small { animation-name: sk-small; }
    .sk-big { animation-name: sk-big; }
    .atlas-ruler { animation-name: ruler-draw; }
    .ruler-small { animation-name: span-small; }
    .ruler-big { animation-name: span-big; }
    .ruler-span b { animation-name: span-label; }
  }
}
@keyframes sk-fade { 0% { opacity: 0; } 30%, 62% { opacity: 0.45; } 92%, 100% { opacity: 0; } }
@keyframes sk-small { 0% { transform: translateX(-600px); } 32%, 62% { transform: none; } 100% { transform: translateX(560px); } }
@keyframes sk-big { 0% { transform: translateX(-820px); } 38%, 62% { transform: none; } 100% { transform: translateX(520px); } }
@keyframes ruler-draw { 0%, 24% { clip-path: inset(-12px 100% -12px 0); opacity: 1; } 34%, 62% { clip-path: inset(-12px 0 -12px 0); opacity: 1; } 86%, 100% { clip-path: inset(-12px 0 -12px 0); opacity: 0; } }
@keyframes span-small { 0%, 32% { transform: scaleX(0); } 40%, 100% { transform: scaleX(1); } }
@keyframes span-big { 0%, 36% { transform: scaleX(0); } 44%, 100% { transform: scaleX(1); } }
@keyframes span-label { 0%, 40% { opacity: 0; } 47%, 100% { opacity: 1; } }

.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wall button { padding: 0; border: 0; background: #fff; cursor: zoom-in; aspect-ratio: 1; overflow: hidden; }
.wall img { width: 100%; height: 100%; object-fit: contain; }
.wall button:hover img { outline: 3px solid var(--accent); outline-offset: -3px; }
.more { margin-top: 22px; }

/* Bosses */
.bosses { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 18px; margin-top: 30px; }
.boss { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; transition: border-color 0.3s var(--ease); }
.boss:hover { border-color: var(--accent); }
.boss img { width: 100%; height: auto; aspect-ratio: 9 / 10; object-fit: contain; background: #fff; }
.boss-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.boss h4 { font: 900 21px/1.2 var(--body); letter-spacing: 0.04em; }
.boss h4 small { font: 500 12px/1 var(--body); color: var(--soft); margin-left: 6px; letter-spacing: 0; }
.boss .role { font-size: 12px; font-weight: 700; margin: 8px 0; display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
/* Boss class tags: Praetorian dark blue, Scout dark purple, Overlord deep red */
.rank { background: var(--rk); color: var(--ink); padding: 2px 7px; font-weight: 700; }
.rank[data-rank="praetorian"] { --rk: #1f3f94; }
.rank[data-rank="scout"] { --rk: #5a2a8c; }
.rank[data-rank="overlord"] { --rk: #a3221c; }
.boss-ranks { margin-top: 1.2em; }
.boss-ranks .rank { margin: 0 2px; padding: 1px 6px; }
.boss-text { font-size: 13px; line-height: 1.75; margin: 0 0 12px; }
/* Empty slot */
.boss-tbd { border-style: dashed; background: none; }
.boss-slot { aspect-ratio: 9 / 10; display: grid; place-items: center; border-bottom: 1px dashed var(--line); }
.boss-slot img { width: 30%; height: auto; filter: invert(1); opacity: 0.22; }
.boss-tbd .boss-body p { margin: 0; font-size: 14px; color: var(--soft); letter-spacing: 0.04em; }
.play { font: 700 13px/1 var(--body); background: none; border: 0; border-bottom: 1px solid var(--accent); padding: 3px 0; cursor: pointer; color: var(--ink); letter-spacing: 0.04em; transition: color 0.3s var(--ease); }
.play:hover { color: var(--accent); }
.boss .play { margin-top: auto; align-self: flex-start; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; max-width: 880px; }
.timeline > li { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.timeline time { font: 900 21px/1.2 var(--display); color: var(--ink); letter-spacing: 0.02em; }
.tl-text { margin: 0; line-height: 1.8; }
.timeline time { white-space: nowrap; }
.timeline .play { margin-top: 10px; }

/* Videos: news-style tabs underlined in orange */
.tabs { display: flex; flex-wrap: wrap; gap: 0 26px; border-bottom: 1px solid var(--line); }
.tab { position: relative; display: inline-flex; align-items: baseline; gap: 6px; font: 700 15px/1 var(--body); padding: 12px 0; border: 0; background: none; cursor: pointer; color: var(--soft); transition: color 0.3s var(--ease); }
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); transform: scaleX(0); transition: transform 0.3s var(--ease); }
.tab small { font-size: 12px; font-weight: 500; }
.tab:hover, .tab[aria-pressed="true"] { color: var(--ink); }
.tab[aria-pressed="true"]::after { transform: scaleX(1); }
.series-desc { margin: 18px 0 0; min-height: 30px; }
.works-bar { display: flex; justify-content: space-between; align-items: center; margin: 18px 0; font-size: 13px; color: var(--soft); }
.sort { display: flex; align-items: center; gap: 8px; }
.sort select { font: 500 13px var(--body); border: 1px solid var(--line); padding: 6px 8px; background: rgba(9, 18, 21, 0.6); color: var(--ink); }
.sort select option { color: var(--on-ink); background: #fff; }

.vid h4 { font: 500 15px/1.5 var(--body); margin: 10px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.3s var(--ease); }
.vid .collab { font-size: 12px; color: var(--soft); margin-top: 4px; }

/* Credits */
.credits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.credit { position: relative; background: var(--paper); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.credit::before { content: ""; position: absolute; left: -1px; top: -1px; width: 40px; height: 3px; background: var(--accent); }
.avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.avatar-mono { display: grid; place-items: center; font: 900 38px/1 var(--body); color: var(--on-ink); background: #e8dcc0; }
.credit h3 { font: 900 clamp(20px, 2.3vw, 26px)/1.25 var(--body); letter-spacing: 0.03em; margin: 6px 0 0; }
.credit h3 small { font: 500 13px/1 var(--body); color: var(--soft); margin-left: 4px; letter-spacing: 0; }
.credit-mail { font-size: 13px; color: var(--soft); word-break: break-all; }
.credit-text { margin: 0; font-size: 14px; line-height: 1.9; }
.credit-quote { margin: 0; font: 300 19px/1.4 var(--body); color: var(--ink); letter-spacing: 0.08em; }
.credit-links { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 700; font-size: 14px; }
.credit-links a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.thanks .prose { margin-bottom: 10px; }
.thanks-link { margin: 0; font-size: 14px; }
.thanks-link a { font-weight: 700; word-break: break-all; text-decoration: none; border-bottom: 1px solid var(--accent); }

/* Footer */
.foot { border-top: 3px solid var(--accent); background: #0b1518; color: var(--soft); padding: 34px 0 44px; font-size: 13px; }
.foot-in { display: grid; gap: 20px; }
.foot p#foot-note { margin: 0; }

/* Dialogs */
dialog { border: 1px solid var(--line); padding: 0; background: #0f1a1e; color: var(--text); }
dialog::backdrop { background: rgba(4, 9, 11, 0.82); }
.player { width: min(1000px, 94vw); }
.player-bar { display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); border-top: 3px solid var(--accent); }
.player-bar strong { flex: 1; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.player-bar a { font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.player-frame { aspect-ratio: 16 / 9; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.x { border: 1px solid var(--line); background: none; width: 36px; height: 36px; font-size: 15px; cursor: pointer; color: var(--ink); flex: none; transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.x:hover { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.lightbox { width: min(760px, 94vw); padding: 52px 56px 16px; overflow: visible; border-top: 3px solid var(--accent); }
.lightbox img { width: 100%; max-height: 74vh; object-fit: contain; }
.lightbox .x { position: absolute; right: 8px; top: 8px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 1px solid var(--line); background: rgba(9, 18, 21, 0.7); font-size: 28px; cursor: pointer; color: var(--ink); transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.lb-nav:hover { background: var(--accent); color: var(--on-ink); }
.lb-prev { left: 6px; }
.lb-next { right: 6px; }
.lb-cap { text-align: center; font-size: 13px; color: var(--soft); margin: 10px 0 0; }

/* Entrances (only when JS runs): headings wipe in behind an orange bar, lead lines unroll top-down */
.js .sec-head .sec-en { color: transparent; }
.js .sec-head .sec-en::after { content: ""; position: absolute; inset: 6% -6px 2%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.js .sec-head.in .sec-en { animation: show-text 0.9s both; }
.js .sec-head.in .sec-en::after { animation: wipe 0.9s cubic-bezier(.65, 0, .35, 1) both; }
.js .sec-head h2 { clip-path: inset(0 0 100% 0); transition: clip-path 0.55s var(--ease) 0.45s; }
.js .sec-head.in h2 { clip-path: inset(0); }
@keyframes wipe {
  0% { transform: scaleX(0); transform-origin: 0 50%; }
  49.9% { transform: scaleX(1); transform-origin: 0 50%; }
  50% { transform: scaleX(1); transform-origin: 100% 50%; }
  100% { transform: scaleX(0); transform-origin: 100% 50%; }
}
@keyframes show-text { 0%, 49.9% { color: transparent; } 50%, 100% { color: var(--ink); } }
.js .lead .ln { clip-path: inset(0 0 100% 0); transform: translateY(0.25em); transition: clip-path 0.6s var(--ease), transform 0.6s var(--ease); }
.js .lead.in .ln { clip-path: inset(0 0 -0.2em 0); transform: none; }
.js .lead.in .ln:nth-child(2) { transition-delay: 0.12s; }
.js .lead.in .ln:nth-child(3) { transition-delay: 0.24s; }
.js .hero-text h1, .js .hero-text .hero-en, .js .hero-text .lede { clip-path: inset(0 100% 0 0); transition: clip-path 0.8s var(--ease); }
.js .hero-text.in h1 { clip-path: inset(0 -0.2em 0 0); }
.js .hero-text.in .hero-en { clip-path: inset(0); transition-delay: 0.25s; }
.js .hero-text.in .lede { clip-path: inset(0); transition-delay: 0.45s; }

/* Cards flip up into place when they scroll into view */
.reveal { opacity: 0; transform: translateY(46px) rotate(-7deg) scale(0.9); transition: opacity 0.45s ease, transform 0.8s cubic-bezier(.2, 1.15, .4, 1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal.instant { transition: none; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 8px; padding-top: 32px; }
  .fan { grid-row: 1; height: 260px; --step: 64px; }
  .fan img { width: 160px; margin-left: -80px; bottom: 20px; }
  .tiers { grid-template-columns: repeat(3, 1fr); }
  .read { grid-template-columns: 1fr; }
  .lore-grid { grid-template-columns: 1fr; }
  .mix { max-width: 420px; margin-top: 28px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top-in { gap: 12px; }
  .brand span:last-child { display: none; }
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
  .sec { padding: 26px 0; }
  .sec > .wrap { width: calc(100% - 20px); padding: 28px 18px 30px; }
  .sec > .wrap::before { left: 18px; right: 18px; }
  .hero-text { justify-self: stretch; }
  .hero h1 { font-size: clamp(48px, 15vw, 64px); }
  .lede { letter-spacing: 0.24em; }
  .fan { height: 200px; --step: 50px; }
  .fan img { width: 130px; margin-left: -65px; bottom: 16px; }
  .tiers { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .atlas-stage { position: static; transform: none; margin-top: 22px; }
  .credits { grid-template-columns: 1fr; }
  .wall { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .timeline > li { grid-template-columns: 1fr; gap: 4px; }
  .lightbox { padding: 52px 8px 12px; }
  .lb-nav { top: auto; bottom: 8px; transform: none; height: 40px; }
  .works-bar { flex-wrap: wrap; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .fan.settled img { transition: none; }
  .js .sec-head .sec-en { color: var(--ink); animation: none; }
  .js .sec-head .sec-en::after { display: none; }
  .js .sec-head h2, .js .lead .ln, .js .hero-text h1, .js .hero-text .hero-en, .js .hero-text .lede { clip-path: none; transform: none; transition: none; }
}

[hidden] { display: none !important; }
