/* =========================================================================
   PACTMAGE — an illuminated codex.
   Warm ink, gold leaf, parchment pages. Cinematic where the art lives,
   quiet and readable where the words live.
   ========================================================================= */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-400.woff2?v=5062305acb") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-600.woff2?v=623056a860") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-italic-400.woff2?v=1a995033f7") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-300.woff2?v=2f1882a31a") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2?v=cd768be728") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-500.woff2?v=b2298f87b5") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/noto-serif-sc-400.woff2?v=25167b8d0a") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/noto-serif-sc-600.woff2?v=8626d54544") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans SC";
  src: url("../fonts/noto-sans-sc-400.woff2?v=b4b5d4c9aa") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans SC";
  src: url("../fonts/noto-sans-sc-500.woff2?v=e3fdf1fcea") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;

  --ink: #14100b;
  --ink-2: #1a150f;
  --ink-3: #231b12;
  --surface: #2b2117;

  --cream: #f8f0de;
  --cream-2: #e7d9be;
  --text: #eadfc9;
  --muted: #b3a487;
  --muted-2: #8d7d62;

  --gold: #cfa860;
  --gold-bright: #f2d99f;
  --gold-deep: #8f6a2c;

  --parchment: #f3e7cd;
  --parchment-2: #e9d7b6;
  --parchment-3: #fbf4e4;
  --parchment-ink: #2a2015;
  --parchment-muted: #6d5b40;
  --parchment-line: rgba(42, 32, 21, 0.16);

  --line: rgba(207, 168, 96, 0.22);
  --line-soft: rgba(248, 240, 222, 0.1);
  --shadow: 0 40px 110px rgba(0, 0, 0, 0.6);

  --serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(20px, 4.2vw, 68px);
  --max: 1440px;
  --nav-h: 86px;

  --el-none: #ded6c2;
  --el-water: #5b9cff;
  --el-fire: #ff7a45;
  --el-grass: #6fce55;
  --el-thunder: #ffd75e;
  --el-ice: #9fe8ff;
  --el-wind: #74dcc0;
  --el-earth: #d2a86b;
}

.el-none { --el: #ded6c2; --el-soft: rgba(222, 214, 194, 0.2); }
.el-water { --el: #5b9cff; --el-soft: rgba(91, 156, 255, 0.22); }
.el-fire { --el: #ff7a45; --el-soft: rgba(255, 122, 69, 0.2); }
.el-grass { --el: #6fce55; --el-soft: rgba(111, 206, 85, 0.2); }
.el-thunder { --el: #ffd75e; --el-soft: rgba(255, 215, 94, 0.2); }
.el-ice { --el: #9fe8ff; --el-soft: rgba(159, 232, 255, 0.22); }
.el-wind { --el: #74dcc0; --el-soft: rgba(116, 220, 192, 0.2); }
.el-earth { --el: #d2a86b; --el-soft: rgba(210, 168, 107, 0.22); }

/* Optical alignment of portraits whose authored shapes differ from the shared canvas. */
[data-unit="bubbleham"] { --portrait-y: -8%; }
[data-unit="timber_koala"] { --portrait-y: -7%; }
[data-unit="serena"] { --portrait-scale: 0.86; --portrait-x: -4.8%; --portrait-y: -5.5%; }
[data-unit="lightning_mongoose"] { --portrait-scale: 0.84; --portrait-y: -5%; }

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 50% at 50% -10%, rgba(207, 168, 96, 0.09), transparent 70%),
    radial-gradient(50% 40% at 90% 30%, rgba(143, 106, 44, 0.06), transparent 70%),
    linear-gradient(180deg, #16110c, #120e09 60%, #16110c);
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
}

::selection {
  background: rgba(207, 168, 96, 0.3);
  color: var(--cream);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.skip:focus {
  left: 12px;
  top: 12px;
}

/* ------------------------------------------------------------------ atmosphere */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.055;
  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='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(circle, rgba(242, 217, 159, 0.09), rgba(242, 217, 159, 0) 62%);
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}
body.has-cursor .cursor-glow {
  opacity: 1;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  z-index: 950;
  pointer-events: none;
  opacity: 0.9;
}

/* ------------------------------------------------------------------ type */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}
.section-label::before {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  opacity: 0.8;
}
.section-label::after {
  content: "";
  display: none;
}
.section-label__rule {
  flex: 0 0 34px;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, rgba(207, 168, 96, 0.45), transparent);
}
.section-label .section-index {
  margin-left: 2px;
  font-size: 13px;
  opacity: 0.75;
}

.section-title {
  font-size: clamp(40px, 5.4vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.015em;
}

.section-note {
  max-width: 32ch;
  font-size: 12.5px;
  line-height: 1.75;
  font-weight: 300;
  color: var(--muted);
}

.section-index {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.85;
}

.italic {
  font-style: italic;
}

/* ------------------------------------------------------------------ layout */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(68px, 8vw, 128px);
}
.section--tight {
  padding-block: clamp(44px, 5vw, 74px);
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--gold);
  opacity: 0.85;
}
.ornament::before,
.ornament::after {
  content: "";
  width: min(130px, 18vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.ornament::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}
.ornament span {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border: 1px solid var(--gold);
}

/* ------------------------------------------------------------------ buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 30px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #241a0f;
  background: linear-gradient(180deg, #f0d7a0, #cfa55f);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.55) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease-out);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(207, 168, 96, 0.3);
}
.btn:hover::after {
  transform: translateX(120%);
}
.btn svg {
  width: 15px;
  height: 15px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(207, 168, 96, 0.35);
  transition: gap 0.4s var(--ease-out), border-color 0.4s ease, color 0.4s ease;
}
.text-link:hover {
  gap: 18px;
  color: var(--gold-bright);
  border-color: var(--gold-bright);
}

/* ------------------------------------------------------------------ nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.5s ease, backdrop-filter 0.5s ease,
    border-color 0.5s ease, height 0.5s var(--ease-out);
}
.nav.is-solid {
  height: 68px;
  background: rgba(18, 14, 9, 0.84);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom-color: rgba(207, 168, 96, 0.18);
}
.nav__inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav__brand img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8)) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.5));
  transition: height 0.5s var(--ease-out);
}
.nav.is-solid .nav__brand img {
  height: 32px;
}
.nav__links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}
.nav__link {
  position: relative;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(248, 240, 222, 0.74);
  padding: 8px 0;
  transition: color 0.35s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.nav__link:hover,
.nav__link.is-active {
  color: var(--gold-bright);
}
.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}
.nav__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(207, 168, 96, 0.3);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--cream-2);
  transition: border-color 0.35s ease, color 0.35s ease, background 0.35s ease;
}
.lang-switch:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(207, 168, 96, 0.08);
}
.lang-switch svg {
  width: 13px;
  height: 13px;
  opacity: 0.8;
}
.nav__steam {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(248, 240, 222, 0.24);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-2);
  transition: border-color 0.35s ease, color 0.35s ease, background 0.35s ease;
}
.nav__steam:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(207, 168, 96, 0.08);
}
.nav__steam svg {
  width: 13px;
  height: 13px;
}
.nav__burger {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 240, 222, 0.2);
  border-radius: 2px;
}
.nav__burger span {
  position: relative;
  width: 18px;
  height: 1px;
  background: var(--cream);
  display: block;
}
.nav__burger span::before,
.nav__burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: var(--cream);
  transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out);
}
.nav__burger span::before { top: -6px; }
.nav__burger span::after { top: 6px; }
body.menu-open .nav__burger span { background: transparent; }
body.menu-open .nav__burger span::before {
  top: 0;
  transform: rotate(45deg);
}
body.menu-open .nav__burger span::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 890;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  background: rgba(16, 12, 8, 0.97);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu__label {
  display: block;
  margin-bottom: 14px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.mobile-menu > a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(248, 240, 222, 0.09);
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 54px);
  line-height: 1.3;
  color: var(--cream);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out), color 0.3s ease;
}
.mobile-menu > a span {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gold);
}
body.menu-open .mobile-menu > a {
  opacity: 1;
  transform: none;
}
body.menu-open .mobile-menu > a:nth-child(3) { transition-delay: 0.06s; }
.mobile-menu > a:hover { color: var(--gold-bright); }
.mobile-menu__foot .nav__steam { display: inline-flex; }
.mobile-menu__foot {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.5s 0.2s ease;
}
body.menu-open .mobile-menu__foot { opacity: 1; }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: -5% -4%;
  z-index: -3;
  background-size: cover;
  background-position: center 38%;
  transform: scale(1.05);
  animation: hero-drift 30s ease-in-out infinite alternate;
  filter: saturate(1.04) brightness(0.94);
}
@keyframes hero-drift {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.1%, -1.3%, 0); }
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(12, 8, 5, 0.9) 0%, rgba(12, 8, 5, 0.46) 14%, rgba(14, 10, 7, 0.36) 24%, rgba(14, 10, 7, 0.3) 40%, rgba(14, 10, 7, 0.78) 76%, var(--ink) 100%),
    radial-gradient(56% 44% at 50% 58%, rgba(11, 7, 4, 0.66), rgba(11, 7, 4, 0) 78%),
    radial-gradient(120% 90% at 50% 40%, transparent 26%, rgba(14, 10, 7, 0.5) 100%);
}
.hero__motes {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.hero__motes i {
  position: absolute;
  left: calc((var(--i) * 137) % 100 * 1%);
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-bright);
  opacity: 0;
  box-shadow: 0 0 8px 1px rgba(242, 217, 159, 0.55);
  animation: mote 16s linear infinite;
  animation-delay: calc(var(--i) * -1.15s);
}
@keyframes mote {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.6); }
  12% { opacity: 0.9; }
  70% { opacity: 0.5; }
  100% { opacity: 0; transform: translate3d(28px, -78vh, 0) scale(1); }
}
.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 38px) var(--gutter) clamp(84px, 11vh, 116px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(16px, 2.4vh, 26px);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 14px rgba(0, 0, 0, 0.9), 0 0 26px rgba(0, 0, 0, 0.7);
  animation: fade-up 1.1s 0.05s var(--ease-out) both;
}
.hero__eyebrow span {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.hero__brand {
  margin: 0;
  line-height: 0;
}
.hero__logo {
  width: clamp(258px, 35vw, 474px);
  height: auto;
  filter: drop-shadow(0 22px 54px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 34px rgba(207, 168, 96, 0.16));
  animation: logo-in 1.5s var(--ease-out) both;
}
@keyframes logo-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.hero__headline {
  margin-top: clamp(16px, 2.2vh, 26px);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.14;
  color: var(--cream);
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.6);
  animation: fade-up 1.2s 0.22s var(--ease-out) both;
}
.hero__line {
  margin-top: 16px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cream-2);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
  animation: fade-up 1.2s 0.34s var(--ease-out) both;
}
.hero__actions {
  margin-top: clamp(24px, 3.6vh, 38px);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fade-up 1.2s 0.46s var(--ease-out) both;
}
.hero__steam {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(248, 240, 222, 0.34);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(248, 240, 222, 0.85);
  transition: color 0.35s ease, border-color 0.35s ease, gap 0.4s var(--ease-out);
}
.hero__steam:hover {
  gap: 14px;
  color: var(--gold-bright);
  border-color: var(--gold);
}
.hero__stats {
  margin-top: clamp(24px, 3.6vh, 42px);
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(248, 240, 222, 0.16);
  padding-top: 20px;
  animation: fade-up 1.2s 0.6s var(--ease-out) both;
}
.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-inline: 10px;
  border-left: 1px solid rgba(248, 240, 222, 0.1);
}
.hero__stat:first-child { border-left: 0; }
.hero__stat b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.hero__stat span {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(248, 240, 222, 0.68);
}
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 8.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(248, 240, 222, 0.55);
  transition: color 0.35s ease;
}
.hero__scroll-mobile, .hero__scroll-arrows { display: none; }
.hero__scroll:hover { color: var(--gold-bright); }
.hero__scroll i {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scroll-pulse 2.4s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}
.hero__edition {
  position: absolute;
  left: var(--gutter);
  bottom: 28px;
  font-size: 8px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1.9;
  color: rgba(248, 240, 222, 0.4);
}
.hero__edition b {
  color: var(--gold);
  font-weight: 500;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ------------------------------------------------------------------ element band */
.element-band {
  position: relative;
  border-block: 1px solid rgba(207, 168, 96, 0.18);
  background:
    linear-gradient(180deg, rgba(35, 27, 18, 0.85), rgba(18, 14, 9, 0.95));
  overflow: hidden;
  padding-block: 17px;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.element-band__track {
  display: flex;
  align-items: center;
  gap: 30px;
  width: max-content;
  animation: band 46s linear infinite;
}
@keyframes band {
  from { transform: translateX(0); }
  to { transform: translateX(-33.333%); }
}
.element-band__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(231, 217, 190, 0.72);
  white-space: nowrap;
}
.element-band__item img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  opacity: 0.85;
}
.element-band__dot {
  width: 4px;
  height: 4px;
  transform: rotate(45deg);
  background: rgba(207, 168, 96, 0.55);
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------ section head */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.45fr);
  align-items: end;
  gap: 36px;
  margin-bottom: clamp(32px, 4vw, 52px);
}
.section-head__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding-top: 4px;
  text-align: right;
}

/* ------------------------------------------------------------------ maps */
.maps {
  padding-top: clamp(58px, 6.4vw, 96px);
}
.map-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(168px, 16.4vw, 246px);
  gap: clamp(10px, 1.3vw, 18px);
}
.map-card {
  position: relative;
  min-width: 0;
}
.map-card--hero { grid-column: span 7; grid-row: span 2; }
.map-card--wide { grid-column: span 5; }
.map-card--mid { grid-column: span 4; }
.map-card--half { grid-column: span 6; }

.map-card__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(207, 168, 96, 0.22);
  background: #0c0906;
  transition: border-color 0.5s ease, box-shadow 0.6s var(--ease-out);
}
.map-card__frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 3;
  border: 1px solid rgba(248, 240, 222, 0.16);
  pointer-events: none;
  transition: inset 0.6s var(--ease-out), border-color 0.5s ease;
}
.map-card:hover .map-card__frame {
  border-color: rgba(242, 217, 159, 0.6);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
}
.map-card:hover .map-card__frame::before {
  inset: 11px;
  border-color: rgba(242, 217, 159, 0.45);
}
.map-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.02) brightness(0.92);
  transform: scale(1.005);
  transition: transform 1.6s var(--ease-out), filter 0.6s ease;
}
.map-card:hover .map-card__img {
  transform: scale(1.055);
  filter: saturate(1.06) brightness(0.98);
}
.map-card__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10, 7, 5, 0.42) 0%, transparent 32%, rgba(10, 7, 5, 0.12) 52%, rgba(10, 7, 5, 0.82) 100%),
    radial-gradient(120% 100% at 50% 50%, transparent 40%, rgba(10, 7, 5, 0.32) 100%);
}
.map-card__num {
  position: absolute;
  top: 20px;
  left: 22px;
  z-index: 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  opacity: 0.9;
}
.map-card__num::after {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  margin-top: 6px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.map-card__caption {
  position: absolute;
  left: clamp(20px, 2.2vw, 30px);
  right: clamp(20px, 2.2vw, 30px);
  bottom: clamp(18px, 2vw, 26px);
  z-index: 2;
}
.map-card__title {
  font-size: clamp(24px, 2.3vw, 38px);
  line-height: 1.02;
  color: var(--cream);
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.7);
}
.map-card--hero .map-card__title {
  font-size: clamp(30px, 3.2vw, 52px);
}
.map-card__alt {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(248, 240, 222, 0.6);
}
.map-card__play {
  position: absolute;
  right: clamp(16px, 1.8vw, 24px);
  bottom: clamp(16px, 1.8vw, 24px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 8px;
  border: 1px solid rgba(248, 240, 222, 0.4);
  border-radius: 999px;
  background: rgba(14, 10, 7, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--cream);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease,
    transform 0.4s var(--ease-out);
}
.map-card__play:hover {
  background: linear-gradient(180deg, #f0d7a0, #cfa55f);
  border-color: var(--gold);
  color: #241a0f;
  transform: translateY(-1px);
}
.map-card__play-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(248, 240, 222, 0.14);
}
.map-card__play-icon svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}
.map-card__play:hover .map-card__play-icon {
  background: rgba(36, 26, 15, 0.14);
}
.map-card.is-playing .map-card__play {
  background: linear-gradient(180deg, #f2d99f, #cfa55f);
  border-color: var(--gold-bright);
  color: #241a0f;
}
.map-card.is-playing .map-card__play-icon {
  background: rgba(36, 26, 15, 0.16);
}
.map-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
  margin-left: 2px;
}
.map-card.is-playing .map-eq { display: inline-flex; }
.map-eq i {
  width: 2px;
  height: 3px;
  background: currentColor;
  animation: eq 0.85s ease-in-out infinite alternate;
}
.map-eq i:nth-child(2) { animation-delay: 0.18s; }
.map-eq i:nth-child(3) { animation-delay: 0.36s; }
@keyframes eq {
  from { height: 2px; }
  to { height: 11px; }
}

/* ------------------------------------------------------------------ cast / parchment */
.cast {
  position: relative;
  background: var(--parchment);
  border-top: 1px solid rgba(207, 168, 96, 0.45);
  box-shadow: inset 0 18px 40px rgba(90, 64, 30, 0.08);
  color: var(--parchment-ink);
  isolation: isolate;
  overflow: hidden;
}
.cast::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 34% at 50% 0%, rgba(255, 255, 255, 0.7), transparent 62%),
    radial-gradient(40% 30% at 88% 20%, rgba(207, 168, 96, 0.13), transparent 70%),
    linear-gradient(180deg, #f7eeda 0%, #f1e3c7 55%, #ecdcbc 100%);
}
.cast::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  pointer-events: none;
}
.cast > .wrap {
  position: relative;
  z-index: 1;
}
.cast .section-label { color: var(--gold-deep); }
.cast .section-label::before { background: linear-gradient(90deg, transparent, var(--gold-deep)); }
.cast .section-label::after { background: linear-gradient(90deg, rgba(143, 106, 44, 0.35), transparent); }
.cast .section-title { color: #241a10; }
.cast .section-note { color: var(--parchment-muted); }
.cast .section-index { color: var(--gold-deep); }

.cast-filter-panel {
  display: grid;
  gap: 8px;
  padding: 18px 0 20px;
  margin-bottom: 4px;
  border-top: 1px solid var(--parchment-line);
  border-bottom: 1px solid var(--parchment-line);
}
.cast-results {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--parchment-muted);
}
.cast-results b {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: #241a10;
}

.cast-columns {
  display: flex;
  flex-direction: column;
}
.cast-block {
  display: grid;
  grid-template-columns: clamp(210px, 21vw, 286px) minmax(0, 1fr);
  gap: clamp(22px, 3.4vw, 52px);
  padding-block: clamp(26px, 3vw, 40px);
  border-top: 1px solid rgba(42, 32, 21, 0.13);
}
.cast-block:first-child { border-top: 0; }

.cast-portrait {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  align-self: center;
}
.cast-portrait__img {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.06;
  overflow: hidden;
  border: 1px solid rgba(42, 32, 21, 0.24);
  border-radius: 999px 999px 3px 3px;
  background:
    radial-gradient(64% 52% at 50% 84%, var(--el-soft), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.06));
  transition: border-color 0.5s ease, box-shadow 0.6s var(--ease-out);
}
.cast-portrait__img::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 2;
  border: 1px solid rgba(42, 32, 21, 0.16);
  border-radius: 999px 999px 2px 2px;
  pointer-events: none;
  transition: border-color 0.5s ease, inset 0.6s var(--ease-out);
}
.cast-portrait__img::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(42, 32, 21, 0.08));
  pointer-events: none;
}
.cast-portrait__img img {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: 98%;
  height: 98%;
  object-fit: contain;
  object-position: bottom center;
  transform: translateX(-50%) translate(var(--portrait-x, 0%), var(--portrait-y, 0%)) scale(var(--portrait-scale, 1));
  transition: transform 0.9s var(--ease-out);
  filter: drop-shadow(0 12px 22px rgba(52, 36, 18, 0.22));
}
.cast-portrait:hover .cast-portrait__img {
  border-color: var(--gold-deep);
  box-shadow: 0 22px 44px rgba(60, 42, 20, 0.18);
}
.cast-portrait:hover .cast-portrait__img::before {
  inset: 10px;
  border-color: rgba(143, 106, 44, 0.55);
}
.cast-portrait:hover .cast-portrait__img img {
  transform: translateX(-50%) translate(var(--portrait-x, 0%), calc(var(--portrait-y, 0%) - 5px)) scale(calc(var(--portrait-scale, 1) * 1.025));
}
.cast-portrait__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--serif);
  font-size: clamp(22px, 1.8vw, 27px);
  line-height: 1.1;
  color: #241a10;
}
.cast-portrait__name svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--gold-deep);
  opacity: 0.5;
  transition: transform 0.45s var(--ease-out), opacity 0.35s ease;
}
.cast-portrait:hover .cast-portrait__name svg {
  transform: translateX(5px);
  opacity: 1;
}
.cast-portrait__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment-muted);
}
.cast-portrait__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cast-portrait__meta img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.cast-concepts {
  display: grid;
  gap: clamp(8px, 1vw, 14px);
  grid-auto-rows: 1fr;
  align-content: stretch;
  min-height: 0;
}
.cast-concepts[data-count="1"] { grid-template-columns: 1fr; }
.cast-concepts[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cast-concepts[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cast-concepts[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cast-concepts[data-count="5"],
.cast-concepts[data-count="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.concept-thumb {
  position: relative;
  display: block;
  min-height: 0;
  padding: clamp(6px, 0.7vw, 9px);
  overflow: hidden;
  border: 1px solid rgba(42, 32, 21, 0.17);
  background: linear-gradient(180deg, #fdf7e9, #f0e2c6);
  transition: border-color 0.45s ease, box-shadow 0.5s var(--ease-out),
    transform 0.5s var(--ease-out);
}
.concept-thumb::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(42, 32, 21, 0.07);
  pointer-events: none;
  z-index: 2;
}
.concept-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.9s var(--ease-out), filter 0.4s ease;
  filter: saturate(1.02);
}
.concept-thumb:hover {
  border-color: var(--gold-deep);
  box-shadow: 0 18px 40px rgba(60, 42, 20, 0.2);
  transform: translateY(-2px);
}
.concept-thumb:hover img {
  transform: scale(1.035);
}
.concept-thumb__zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(20, 14, 9, 0.72);
  color: var(--gold-bright);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
}
.concept-thumb__zoom svg { width: 14px; height: 14px; }
.concept-thumb:hover .concept-thumb__zoom {
  opacity: 1;
  transform: none;
}
.concept-thumb__no {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 3;
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(42, 32, 21, 0.45);
}

.concept-empty {
  padding: 64px 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--parchment-muted);
}

/* ------------------------------------------------------------------ chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 33px;
  padding: 0 12px;
  border: 1px solid rgba(248, 240, 222, 0.16);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--cream-2);
  white-space: nowrap;
  transition: border-color 0.35s ease, color 0.35s ease, background 0.35s ease;
}
.chip img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  opacity: 0.92;
}
.chip:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}
.chip.is-active {
  background: linear-gradient(180deg, #f0d7a0, #cfa55f);
  border-color: var(--gold);
  color: #241a0f;
}
.chip.is-active img {
  filter: brightness(0);
  opacity: 0.8;
}
.chip-count {
  font-size: 9px;
  opacity: 0.55;
}
.chip.is-active .chip-count { opacity: 0.6; }

.cast .chip {
  border-color: rgba(42, 32, 21, 0.22);
  color: #55432b;
}
.cast .chip:hover {
  border-color: var(--gold-deep);
  color: #241a10;
}
.cast .chip.is-active {
  background: #241a10;
  border-color: #241a10;
  color: var(--parchment);
}
.cast .chip.is-active img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.cast .chip-count { color: rgba(42, 32, 21, 0.6); }
.cast .chip.is-active .chip-count { color: rgba(243, 231, 205, 0.65); }

.filter-line {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.filter-line + .filter-line { margin-top: 8px; }
.filter-label {
  flex: 0 0 62px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.cast .filter-label { color: var(--parchment-muted); }
.filter-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
}
.roster-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------ roster head */
.roster-head {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(52px, 7vw, 96px));
  padding-bottom: clamp(46px, 5.6vw, 76px);
  border-bottom: 1px solid rgba(207, 168, 96, 0.16);
}
.roster-head__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 68% 30%;
  opacity: 0.55;
  mask-image: linear-gradient(90deg, transparent 18%, #000 68%);
  -webkit-mask-image: linear-gradient(90deg, transparent 18%, #000 68%);
  transform: scale(1.02);
}
.roster-head__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(20, 16, 11, 0.92) 34%, rgba(20, 16, 11, 0.42) 72%, rgba(20, 16, 11, 0.7) 100%),
    linear-gradient(180deg, rgba(20, 16, 11, 0.5), transparent 40%, var(--ink) 100%);
}
.roster-head .wrap {
  position: relative;
  z-index: 1;
}
.roster-head__title {
  font-size: clamp(58px, 8.6vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}
.roster-head__body {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--muted);
}
.roster-head__meta {
  margin-top: 26px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.roster-head__meta b {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 500;
  line-height: 1;
  color: var(--gold-bright);
}
.roster-head__meta span {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.roster-toolbar {
  position: sticky;
  top: 68px;
  z-index: 40;
  padding-block: 14px;
  background: rgba(20, 16, 11, 0.93);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border-bottom: 1px solid rgba(207, 168, 96, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.roster-toolbar .filter-group {
  flex-wrap: wrap;
  overflow: visible;
  mask-image: none;
  -webkit-mask-image: none;
  padding-bottom: 0;
}
.roster-toolbar .filter-group::-webkit-scrollbar { display: none; }

.roster-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(248, 240, 222, 0.16);
  border-radius: 999px;
  transition: border-color 0.35s ease;
}
.roster-search:focus-within { border-color: var(--gold); }
.roster-search svg {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
  flex: 0 0 auto;
}
.roster-search input {
  width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--cream);
}
.roster-search input::placeholder { color: var(--muted-2); }
.roster-sort {
  height: 34px;
  padding: 0 30px 0 12px;
  border: 1px solid rgba(248, 240, 222, 0.16);
  border-radius: 999px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23b3a487' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--cream-2);
  appearance: none;
  cursor: pointer;
}
.roster-sort:focus { outline: 0; border-color: var(--gold); }
.roster-sort option { background: #1a150f; color: var(--cream); }

/* ------------------------------------------------------------------ roster body */
.roster-body {
  background: var(--parchment);
  border-top: 1px solid rgba(207, 168, 96, 0.35);
  box-shadow: inset 0 16px 34px rgba(90, 64, 30, 0.07);
  color: var(--parchment-ink);
  padding-top: clamp(30px, 3.6vw, 48px);
  padding-bottom: clamp(60px, 7vw, 110px);
}
.roster-count {
  margin-bottom: 20px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--parchment-muted);
}
.roster-count b {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: #241a10;
  margin-right: 4px;
}
.unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: clamp(12px, 1.3vw, 18px);
}
.unit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 11px 11px 14px;
  text-align: left;
  border: 1px solid rgba(42, 32, 21, 0.16);
  background: linear-gradient(180deg, #fdf7e9, #f1e3c7);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out),
    border-color 0.4s ease;
  animation: card-in 0.7s var(--ease-out) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.unit-card::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(42, 32, 21, 0.07);
  pointer-events: none;
  transition: border-color 0.4s ease;
}
.unit-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-deep);
  box-shadow: 0 22px 46px rgba(58, 40, 18, 0.2);
}
.unit-card:hover::before { border-color: rgba(143, 106, 44, 0.28); }
.unit-card__index {
  position: absolute;
  top: 15px;
  right: 16px;
  z-index: 3;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(42, 32, 21, 0.4);
}
.unit-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    radial-gradient(62% 54% at 50% 76%, var(--el-soft), transparent 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
}
.unit-card__portrait {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 98%;
  height: 99%;
  object-fit: contain;
  object-position: bottom center;
  transform: translateX(-50%) translate(var(--portrait-x, 0%), var(--portrait-y, 0%)) scale(var(--portrait-scale, 1));
  transition: transform 0.8s var(--ease-out);
  filter: drop-shadow(0 10px 18px rgba(52, 36, 18, 0.2));
}
.unit-card:hover .unit-card__portrait {
  transform: translateX(-50%) translate(var(--portrait-x, 0%), calc(var(--portrait-y, 0%) - 4px)) scale(calc(var(--portrait-scale, 1) * 1.03));
}
.unit-card__body {
  display: block;
  padding-top: 12px;
}
.unit-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--parchment-muted);
}
.unit-card__element,
.unit-card__class {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.unit-card__meta img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}
.unit-card__name {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: clamp(21px, 1.7vw, 26px);
  line-height: 1.08;
  color: #241a10;
}
.unit-card__stats {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(42, 32, 21, 0.1);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--parchment-muted);
}
.unit-card__stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}
.unit-card__stats b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  color: #241a10;
}

/* ------------------------------------------------------------------ unit modal */
.unit-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vw, 44px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.unit-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.unit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 8, 5, 0.58);
  backdrop-filter: blur(7px) saturate(0.92);
  -webkit-backdrop-filter: blur(7px) saturate(0.92);
}
.unit-modal__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) 1.22fr;
  width: min(1180px, 100%);
  height: min(700px, calc(100svh - 2 * clamp(10px, 3vw, 44px)));
  max-height: calc(100svh - 2 * clamp(10px, 3vw, 44px));
  overflow: hidden;
  border: 1px solid rgba(207, 168, 96, 0.55);
  background: var(--parchment);
  color: var(--parchment-ink);
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.65);
}
.unit-modal__panel::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(143, 106, 44, 0.24);
  pointer-events: none;
  z-index: 5;
}
.unit-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(42, 32, 21, 0.24);
  border-radius: 50%;
  color: #2a2015;
  background: rgba(251, 244, 228, 0.92);
  transition: background 0.25s ease, color 0.25s ease;
}
.unit-modal__close:hover { background: #241a10; color: var(--parchment); }
.unit-modal__close:focus { outline: none; }
.unit-modal__close:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.unit-modal__close svg { width: 16px; height: 16px; }
.unit-modal__visual {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  color: var(--cream);
  border-right: 1px solid rgba(207, 168, 96, 0.24);
  background:
    radial-gradient(ellipse at 50% 26%, var(--el-soft), transparent 62%),
    linear-gradient(160deg, #3c382b, #27271e 55%, #201c15);
}
.unit-modal__art {
  position: relative;
  min-height: 0;
  isolation: isolate;
  margin: 24px 24px 0;
}
.unit-modal__art::before {
  content: "";
  position: absolute;
  inset: 6px 12px 0;
  border: 1px solid rgba(217, 186, 129, 0.3);
  border-radius: 48% 48% 4px 4px;
  background:
    radial-gradient(ellipse at 50% 64%, var(--el-soft), transparent 65%),
    linear-gradient(180deg, rgba(248, 240, 222, 0.045), transparent);
  z-index: -1;
}
.unit-modal__art::after {
  content: "";
  position: absolute;
  inset: 17px 23px 11px;
  border: 1px solid rgba(217, 186, 129, 0.1);
  border-radius: 48% 48% 3px 3px;
  z-index: -1;
}
.unit-modal__portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  transform: translate(var(--portrait-x, 0%), var(--portrait-y, 0%)) scale(var(--portrait-scale, 1));
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.3));
}
.unit-modal__identity {
  position: relative;
  padding: 23px 28px 26px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(12, 8, 6, 0.22));
}
.unit-modal__name { padding: 0; }
.unit-modal__name .eyebrow {
  justify-content: center;
  font-size: 8.5px;
  letter-spacing: 0.19em;
  color: #c5b38f;
}
.unit-modal__name .eyebrow::before { display: none; }
.unit-modal__name h2 {
  margin-top: 11px;
  font-size: clamp(29px, 2.9vw, 39px);
  line-height: 1.18;
  color: var(--cream);
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 4px 12px;
  border: 1px solid rgba(248, 240, 222, 0.18);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--cream-2);
  background: rgba(248, 240, 222, 0.035);
}
.meta-pill img { width: 21px; height: 21px; object-fit: contain; }
.meta-pill--accent { border-color: rgba(207, 168, 96, 0.4); color: var(--gold-bright); }
.stat-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 21px;
  padding: 17px 8px 0;
  border-top: 1px solid rgba(248, 240, 222, 0.14);
}
.stat { padding-inline: 14px; }
.stat + .stat { border-left: 1px solid rgba(248, 240, 222, 0.12); }
.stat__head { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; }
.stat__label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #b4aa91; }
.stat__value { font-family: var(--serif); font-size: 31px; line-height: 1; color: var(--gold-bright); }
.stat__bar { height: 2px; margin-top: 10px; background: rgba(248, 240, 222, 0.12); overflow: hidden; }
.stat__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); transition: width 0.35s var(--ease-out); }

.unit-modal__panel:focus { outline: none; }
.unit-modal__content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(30px, 3.2vw, 46px);
  padding-top: clamp(38px, 4vw, 56px);
  scrollbar-width: thin;
  scrollbar-color: rgba(143, 106, 44, 0.4) transparent;
}
.unit-modal__content::-webkit-scrollbar { width: 8px; }
.unit-modal__content::-webkit-scrollbar-thumb {
  background: rgba(143, 106, 44, 0.35);
  border-radius: 8px;
}
.unit-section + .unit-section {
  margin-top: clamp(30px, 3.4vw, 46px);
  padding-top: clamp(28px, 3.2vw, 40px);
  border-top: 1px solid rgba(42, 32, 21, 0.14);
}
.unit-section__label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.unit-section__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(143, 106, 44, 0.3), transparent);
}
.passive-card,
.skill-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: clamp(16px, 1.8vw, 22px);
  border: 1px solid rgba(143, 106, 44, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.passive-card__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(143, 106, 44, 0.45);
  border-radius: 50%;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--gold-deep);
  background: rgba(255, 255, 255, 0.4);
}
.passive-card h4,
.skill-card h4 {
  font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1.1;
  color: #241a10;
}
.passive-card p,
.skill-card p {
  margin-top: 12px;
  font-size: 17.5px;
  line-height: 1.8;
  color: #3d3021;
}
.passive-card em {
  display: block;
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  color: var(--parchment-muted);
}
.skill-card img {
  width: 52px;
  height: 52px;
  padding: 10px;
  border-radius: 50%;
  background: #241a10;
  object-fit: contain;
  box-shadow: 0 8px 18px rgba(52, 36, 18, 0.24);
}
.skill-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(42, 32, 21, 0.12);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment-muted);
}
.skill-meta span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.skill-meta b {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: #241a10;
}
.unit-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  padding-top: clamp(22px, 2.6vw, 30px);
  border-top: 1px solid rgba(42, 32, 21, 0.14);
}
.unit-nav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--parchment-muted);
  transition: color 0.3s ease, gap 0.35s var(--ease-out);
}
.unit-nav button:hover { color: #241a10; gap: 12px; }
.unit-nav svg { width: 14px; height: 14px; }

.status-link {
  color: var(--gold-deep);
  border-bottom: 1px dotted rgba(143, 106, 44, 0.6);
  padding-bottom: 1px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.status-link:hover {
  color: #241a10;
  border-color: #241a10;
}
.em { color: #241a10; font-weight: 500; }

.status-popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 6, 4, 0.82);
  backdrop-filter: blur(10px);
}
.status-popup__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: 80svh;
  overflow-y: auto;
  padding: 34px 34px 30px;
  border: 1px solid rgba(207, 168, 96, 0.4);
  background: var(--parchment);
  color: var(--parchment-ink);
  box-shadow: var(--shadow);
}
.status-popup__panel .eyebrow {
  color: var(--gold-deep);
  font-size: 9px;
}
.status-popup__panel h3 {
  margin-top: 10px;
  font-size: 30px;
}
.status-popup__body {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: #3d3021;
}
.status-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(42, 32, 21, 0.2);
  border-radius: 50%;
  color: #241a10;
}
.status-popup__close svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  padding: clamp(12px, 2.4vw, 26px);
  background: rgba(9, 6, 4, 0.96);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.lightbox__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
}
.lightbox__counter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.lightbox__counter b {
  font-size: 20px;
  font-weight: 500;
  color: var(--gold-bright);
}
.lightbox__close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(248, 240, 222, 0.24);
  border-radius: 50%;
  color: var(--cream);
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.4s var(--ease-out);
}
.lightbox__close:hover {
  border-color: var(--gold);
  background: rgba(207, 168, 96, 0.12);
  transform: rotate(90deg);
}
.lightbox__close svg { width: 17px; height: 17px; }
.lightbox__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 26px);
}
.lightbox__figure {
  margin: 0;
  height: 100%;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.lightbox__viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: calc(100svh - 150px);
  max-width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(207, 168, 96, 0.28);
  background: rgba(248, 240, 222, 0.03);
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100svh - 172px);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.lightbox__img.is-loaded { opacity: 1; }
.lightbox__caption {
  text-align: center;
  padding-bottom: 4px;
}
.lightbox__caption h4 {
  font-size: clamp(20px, 2vw, 26px);
  color: var(--cream);
}
.lightbox__caption p {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.lightbox__nav {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(248, 240, 222, 0.2);
  border-radius: 50%;
  color: var(--cream);
  transition: border-color 0.35s ease, background 0.35s ease;
}
.lightbox__nav:hover {
  border-color: var(--gold);
  background: rgba(207, 168, 96, 0.12);
}
.lightbox__nav svg { width: 18px; height: 18px; }
.lightbox__hint {
  padding-top: 10px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.lightbox__load,
.lightbox__error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(9, 6, 4, 0.7);
}
.lightbox__spinner {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(207, 168, 96, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.lightbox__retry {
  padding: 8px 16px;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ mini player */
.mini-player {
  position: fixed;
  left: clamp(12px, 1.6vw, 24px);
  top: calc(var(--nav-h) + 12px);
  z-index: 860;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 324px;
  max-width: calc(100vw - 24px);
  padding: 7px 10px 7px 7px;
  border: 1px solid rgba(207, 168, 96, 0.32);
  border-radius: 999px;
  background: rgba(22, 16, 10, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.player-drag-handle {
  display: grid;
  place-items: center;
  width: 22px;
  height: 38px;
  padding: 0;
  color: rgba(248, 240, 222, .48);
  cursor: grab;
  touch-action: none;
  border-radius: 12px;
}
.player-drag-handle svg { width: 10px; height: 19px; }
.player-drag-handle:hover { color: var(--gold-bright); background: rgba(207,168,96,.08); }
.player-cover, .mini-player__label, .mini-player__title { touch-action: none; user-select: none; -webkit-user-select: none; }
.mini-player__label, .mini-player__title { cursor: grab; }
.mini-player.is-dragging { user-select: none; -webkit-user-select: none; transition: none; box-shadow: 0 22px 65px rgba(0,0,0,.5); }
.mini-player.is-dragging, .mini-player.is-dragging * { cursor: grabbing; }
.mini-player.is-snapping { transition: left .22s var(--ease-out), top .22s var(--ease-out); }
.mini-player[data-dock="right"] .player-playlist { left: auto; right: 0; }
.mini-player[data-playlist="above"] .player-playlist { top: auto; bottom: calc(100% + 10px); }
.mini-player:hover {
  border-color: rgba(207, 168, 96, 0.55);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}
.player-cover {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(207, 168, 96, 0.5);
  flex: 0 0 auto;
}
.mini-player__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.mini-player:hover .mini-player__art { transform: scale(1.06); }
.player-eq {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(10, 7, 4, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mini-player.is-playing .player-eq { opacity: 1; }
.player-eq i {
  width: 2px;
  height: 4px;
  background: var(--gold-bright);
  animation: eq 0.85s ease-in-out infinite alternate;
}
.player-eq i:nth-child(2) { animation-delay: 0.16s; }
.player-eq i:nth-child(3) { animation-delay: 0.32s; }
.mini-player__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 2px;
}
.mini-player__label {
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player__title {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.15;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  margin: 3px 0 0;
  background: transparent;
  cursor: pointer;
}
.player-seek::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(90deg, var(--gold) var(--progress, 0%), rgba(248, 240, 222, 0.18) var(--progress, 0%));
}
.player-seek::-moz-range-track {
  height: 1px;
  background: rgba(248, 240, 222, 0.18);
}
.player-seek::-moz-range-progress {
  height: 1px;
  background: var(--gold);
}
.player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--gold-bright);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.player-seek:hover::-webkit-slider-thumb { opacity: 1; }
.player-seek::-moz-range-thumb {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--gold-bright);
}
.mini-player__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f2d99f, #cfa55f);
  color: #241a0f;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
  flex: 0 0 auto;
}
.mini-player__btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(207, 168, 96, 0.16);
}
.mini-player__btn svg { width: 13px; height: 13px; fill: currentColor; }
.player-next {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: rgba(248, 240, 222, 0.55);
  transition: color 0.3s ease;
  flex: 0 0 auto;
}
.player-next:hover { color: var(--gold-bright); }
.player-next svg { width: 13px; height: 13px; }

.player-playlist {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: 290px;
  max-width: calc(100vw - 24px);
  max-height: min(440px, 62vh);
  overflow-y: auto;
  padding: 14px 8px 12px;
  border: 1px solid rgba(207, 168, 96, 0.32);
  background: rgba(22, 16, 10, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.player-playlist[hidden] { display: none; }
.player-playlist__head {
  display: flex;
  justify-content: space-between;
  padding: 0 8px 10px;
  border-bottom: 1px solid rgba(207, 168, 96, 0.18);
  font-size: 8px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.player-track {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  width: 100%;
  padding: 9px 8px;
  text-align: left;
  font-size: 12px;
  color: var(--cream-2);
  border-bottom: 1px solid rgba(248, 240, 222, 0.05);
  transition: background 0.25s ease, color 0.25s ease;
}
.player-track span:first-child {
  font-family: var(--serif);
  font-style: italic;
  font-size: 10px;
  color: var(--muted-2);
}
.player-track:hover { background: rgba(207, 168, 96, 0.1); color: var(--gold-bright); }
.player-track.is-current { color: var(--gold-bright); }
.player-track.is-current span:first-child { color: var(--gold); }
.player-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 2px;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.player-volume input {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 2px;
  background: rgba(248, 240, 222, 0.2);
}
.player-volume input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.player-volume input::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
}

/* ------------------------------------------------------------------ footer */
.footer {
  position: relative;
  padding-top: clamp(46px, 5vw, 72px);
  padding-bottom: 30px;
  border-top: 1px solid rgba(207, 168, 96, 0.16);
  background: linear-gradient(180deg, #16110c, #100c08);
}
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, 60vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}
.footer__inner { position: relative; z-index: 1; }
.footer__watermark {
  position: absolute;
  left: clamp(-40px, -2vw, 0px);
  bottom: 34px;
  width: min(760px, 62vw);
  opacity: 0.032;
  filter: grayscale(1) brightness(2);
  pointer-events: none;
  user-select: none;
}
.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 34px;
}
.footer__brand img {
  width: clamp(180px, 19vw, 250px);
  height: auto;
  opacity: 0.95;
}
.footer__note {
  margin-top: 10px;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.footer__cols {
  display: flex;
  gap: clamp(40px, 6vw, 90px);
  padding-top: 8px;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 110px;
}
.footer__col h5 {
  margin-bottom: 4px;
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer__col a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.3s ease, transform 0.35s var(--ease-out);
}
.footer__col a:hover { color: var(--gold-bright); transform: translateX(3px); }
.footer__ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 26px;
}
.footer__ornament::before,
.footer__ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(207, 168, 96, 0.28));
}
.footer__ornament::after { background: linear-gradient(90deg, rgba(207, 168, 96, 0.28), transparent); }
.footer__ornament span {
  width: 5px;
  height: 5px;
  margin-inline: 14px;
  transform: rotate(45deg);
  border: 1px solid rgba(207, 168, 96, 0.5);
}
.footer__cta {
  margin-top: 20px;
  height: 44px;
  padding: 0 20px;
  font-size: 9.5px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid rgba(248, 240, 222, 0.07);
}
.footer__legal {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}
.footer__top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease, gap 0.35s var(--ease-out);
}
.footer__top-link:hover { color: var(--gold-bright); gap: 12px; }
.footer__top-link svg { width: 13px; height: 13px; }

/* ------------------------------------------------------------------ gateway */
.gateway {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 60px var(--gutter);
}
.gateway__bg {
  position: absolute;
  inset: -4%;
  z-index: -2;
  background-size: cover;
  background-position: center 40%;
  filter: saturate(1.02) brightness(0.9);
  animation: hero-drift 34s ease-in-out infinite alternate;
}
.gateway__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(46% 46% at 50% 54%, rgba(10, 7, 4, 0.66), rgba(10, 7, 4, 0.12) 72%),
    radial-gradient(60% 50% at 50% 46%, rgba(12, 8, 5, 0.5), rgba(12, 8, 5, 0.1) 70%),
    linear-gradient(180deg, rgba(14, 10, 7, 0.82) 0%, rgba(14, 10, 7, 0.34) 34%, rgba(14, 10, 7, 0.76) 80%, var(--ink) 100%);
}
.gateway__inner {
  position: relative;
  width: min(940px, 100%);
  text-align: center;
  padding-block: 20px;
}
.gateway__logo {
  width: clamp(240px, 30vw, 380px);
  margin: 0 auto;
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.65));
  animation: logo-in 1.3s var(--ease-out) both;
}
.gateway__logo-zh {
  width: clamp(160px, 19vw, 236px);
  margin: 16px auto 0;
  opacity: 0.9;
  filter: drop-shadow(0 12px 34px rgba(0, 0, 0, 0.55));
  animation: fade-up 1.3s 0.14s var(--ease-out) both;
}
.gateway__sub {
  margin-top: 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--cream);
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.75);
  animation: fade-up 1.2s 0.24s var(--ease-out) both;
}
.gateway__sub span {
  display: block;
  margin-top: 4px;
  font-family: "Noto Serif SC", var(--serif);
  font-style: normal;
  font-size: 0.62em;
  letter-spacing: 0.24em;
  color: rgba(231, 217, 190, 0.6);
}
.gateway__doors {
  margin-top: clamp(28px, 4vh, 44px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  animation: fade-up 1.2s 0.36s var(--ease-out) both;
}
.door {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 176px;
  padding: 26px 26px 22px;
  text-align: left;
  border: 1px solid rgba(248, 240, 222, 0.24);
  background: rgba(16, 11, 7, 0.74);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), border-color 0.4s ease,
    background 0.4s ease, box-shadow 0.5s ease;
}
.door::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(248, 240, 222, 0.12);
  pointer-events: none;
  transition: border-color 0.4s ease, inset 0.5s var(--ease-out);
}
.door:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  background: rgba(30, 22, 14, 0.68);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.door:hover::before { inset: 9px; border-color: rgba(242, 217, 159, 0.4); }
.door.is-suggested { border-color: rgba(207, 168, 96, 0.5); }
.door__num {
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: rgba(207, 168, 96, 0.6);
}
.door__lang {
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1;
  color: var(--cream);
}
.door__desc {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(231, 217, 190, 0.72);
}
.door__arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  transition: gap 0.4s var(--ease-out), color 0.3s ease;
}
.door:hover .door__arrow { gap: 13px; color: var(--gold-bright); }
.door__arrow svg { width: 14px; height: 14px; }
.gateway__note {
  margin-top: 26px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(248, 240, 222, 0.55);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* ------------------------------------------------------------------ reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .map-grid {
    grid-auto-rows: clamp(150px, 17vw, 210px);
  }
  .map-card__play {
    top: 14px;
    right: 14px;
    bottom: auto;
    height: 34px;
    width: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .map-card__play-label { display: none; }
  .map-card__play-icon { background: transparent; width: 18px; height: 18px; }
  .map-card__caption { right: 16px; }
  .map-card__title { font-size: clamp(22px, 2.4vw, 30px); }
  .map-card--hero { grid-column: span 8; }
  .map-card--wide { grid-column: span 4; }
  .map-card--mid { grid-column: span 4; }
  .map-card--half { grid-column: span 6; }
  .unit-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
}

@media (max-width: 980px) {
  :root { --nav-h: 74px; }
  .nav__links { display: none; }
  .nav__steam { display: none; }
  .nav__burger { display: flex; }
  .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 14px;
  }
  .map-card--hero,
  .map-card--wide,
  .map-card--mid,
  .map-card--half {
    grid-column: span 1;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }
  .map-card--hero { grid-column: span 2; aspect-ratio: 16 / 9; }
  .map-card--hero .map-card__title { font-size: clamp(28px, 4.4vw, 40px); }
  .cast-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .cast-portrait {
    display: grid;
    grid-template-columns: 150px 1fr;
    grid-template-rows: auto auto;
    align-items: end;
    gap: 6px 18px;
  }
  .cast-portrait__img {
    grid-row: span 2;
    width: 150px;
    aspect-ratio: 4 / 5;
  }
  .cast-portrait__name { font-size: 24px; }
  .cast-portrait__meta { align-self: start; }
  .unit-modal__panel { grid-template-columns: minmax(230px, 0.72fr) 1.28fr; }

}

@media (min-width: 1600px) {
  .hero__logo { width: 540px; }
  .hero__stats { width: 940px; }
  .hero__headline { font-size: 52px; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --nav-h: 68px; }
  .nav__brand img { height: 32px; }
  .nav.is-solid .nav__brand img { height: 28px; }
  .nav__right { gap: 8px; }
  .lang-switch { height: 32px; padding: 0 11px; }

  .hero__inner { padding-top: calc(var(--nav-h) + 34px); }
  .hero__logo { width: min(74vw, 340px); }
  .hero__headline { font-size: clamp(24px, 6.6vw, 32px); }
  .hero__line { font-size: 9px; letter-spacing: 0.26em; }
  .hero__stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding-top: 16px;
  }
  .hero__stat { padding-inline: 4px; }
  .hero__stat b { font-size: 25px; }
  .hero__stat span { font-size: 8px; letter-spacing: .04em; }
  .hero__stat:nth-child(5) { display: flex; }
  .hero__side, .hero__edition { display: none; }
  .hero__scroll {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 11px;
    bottom: max(16px, env(safe-area-inset-bottom));
    min-height: 44px;
    padding: 9px 18px;
    border: 1px solid rgba(207,168,96,.55);
    border-radius: 999px;
    background: rgba(34,25,14,.8);
    color: #f2d99f;
    font-size: 11px;
    letter-spacing: .1em;
    white-space: nowrap;
    box-shadow: 0 4px 22px rgba(0,0,0,.25), inset 0 1px 0 rgba(242,217,159,.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .hero__scroll-desktop, .hero__scroll i { display: none; }
  .hero__scroll-mobile { display: inline; }
  .hero__scroll-arrows { display: block; width: 18px; height: 23px; animation: mobile-scroll-cue 1.7s ease-in-out infinite; }


  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .section-head__aside {
    align-items: flex-start;
    text-align: left;
    gap: 8px;
    padding-bottom: 0;
  }
  .section-title { font-size: clamp(28px, 7vw, 36px); }
  .section-note { max-width: 46ch; font-size: 11px; }

  .map-grid { gap: 12px; }
  .map-card--hero { aspect-ratio: 4 / 3; }
  .map-card__title { font-size: 19px; line-height: 1.12; }
  .map-card--hero .map-card__title { font-size: 26px; }
  .map-card__play {
    top: 12px;
    right: 12px;
    bottom: auto;
    height: 32px;
    width: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .map-card__play-label { display: none; }
  .map-card__play-icon { background: transparent; width: 18px; height: 18px; }
  .map-card__num { top: 14px; left: 16px; font-size: 13px; }
  .map-card__caption { left: 16px; bottom: 14px; right: 16px; }

  .cast-filter-panel { padding-block: 14px; }
  .filter-line { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 8px; }
  .filter-label { font-size: 10px; padding-top: 9px; letter-spacing: .08em; }
  .filter-group, .roster-toolbar .filter-group {
    width: auto; min-width: 0; flex-wrap: wrap; overflow: visible;
    padding: 0; gap: 5px; mask-image: none; -webkit-mask-image: none;
  }
  .chip { min-height: 36px; height: auto; padding: 5px 8px; font-size: 10px; gap: 5px; letter-spacing: .02em; }
  .chip img { width: 20px; height: 20px; }
  .chip-count { display: none; }
  .roster-tools { grid-column: 1 / -1; width: 100%; min-width: 0; margin: 8px 0 0; gap: 8px; }
  .roster-tools .roster-search { flex: 1; min-width: 0; height: 38px; }
  .roster-tools .roster-search input { width: 100%; min-width: 0; font-size: 11px; }
  .roster-sort { flex: 0 0 116px; min-width: 0; height: 38px; font-size: 10px; }

  .cast-portrait {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 4px 14px;
  }
  .cast-portrait__img { width: 84px; }
  .cast-portrait__name { font-size: 18px; }
  .cast-portrait__meta { font-size: 8.5px; gap: 10px; }
  .cast-concepts[data-count="3"],
  .cast-concepts[data-count="5"],
  .cast-concepts[data-count="6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cast-block { padding-block: 22px; }

  .roster-head { padding-top: calc(var(--nav-h) + 34px); }
  .roster-head__bg { opacity: 0.34; }
  .roster-head__title { font-size: clamp(38px, 11vw, 48px); }
  .roster-head__body { font-size: 12px; }
  .roster-toolbar { position: static; padding-block: 12px; }
  .unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .unit-card { padding: 8px 8px 11px; }
  .unit-card__name { font-size: 19px; }
  .unit-card__stats { gap: 10px; }
  .unit-card__meta { gap: 8px; font-size: 9px; letter-spacing: .04em; flex-wrap: wrap; }
  .unit-card__meta img { width: 18px; height: 18px; }
  .unit-card__name { line-height: 1.3; overflow-wrap: anywhere; }

  .unit-modal { padding: 0; }
  .unit-modal__panel {
    display: block;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    -webkit-overflow-scrolling: touch;
  }
  .unit-modal__panel::after { display: none; }
  .unit-modal__visual { min-height: 0; grid-template-rows: 200px auto; border-right: 0; }
  .unit-modal__art { min-height: 0; margin: 16px 38px 0; padding: 0; }
  .unit-modal__portrait { max-width: none; }
  .unit-modal__identity { padding: 16px 24px 20px; }
  .unit-modal__name h2 { font-size: 29px; margin-top: 8px; }
  .meta-row { margin-top: 12px; }
  .meta-pill { min-height: 32px; font-size: 10px; }
  .stat-block { margin-top: 15px; padding-top: 14px; }
  .stat__value { font-size: 27px; }
  .unit-modal__content { overflow: visible; padding: 24px 18px 36px; }
  .unit-modal__close { position: fixed; top: max(10px, env(safe-area-inset-top)); right: 12px; background: rgba(251, 244, 228, 0.96); }
  .passive-card, .skill-card { gap: 11px; padding: 15px; }
  .passive-card__mark, .skill-card > img { width: 34px; height: 34px; }
  .passive-card h4, .skill-card h4 { font-size: 23px; }
  .passive-card p, .skill-card p { font-size: 13px; line-height: 1.85; }
  .passive-card em { font-size: 12px; }
  .unit-section + .unit-section { margin-top: 8px; padding-top: 24px; }

  .lightbox { padding: 12px 10px max(12px, env(safe-area-inset-bottom)); }
  .lightbox__img { max-width: 100%; max-height: calc(100dvh - 220px); }
  .lightbox__viewport { padding: 6px; }
  .lightbox__nav { position: absolute; bottom: 8px; width: 42px; height: 42px; }
  .lightbox__nav--prev { left: 18px; }
  .lightbox__nav--next { right: 18px; }
  .lightbox__stage { gap: 0; padding-bottom: 64px; }
  .lightbox__caption h4 { font-size: 21px; }
  .lightbox__caption p { font-size: 9px; letter-spacing: .08em; }
  .lightbox__hint { display: none; }

  .mini-player {
    width: 248px;
    max-width: calc(100vw - 24px);
    top: calc(var(--nav-h) + 12px);
    left: 12px;
    bottom: auto;
    padding: 6px 8px 6px 6px;
    gap: 8px;
  }
  .player-cover { width: 38px; height: 38px; }
  .mini-player__title { font-size: 12.5px; }
  .mini-player__label { font-size: 6.5px; }
  .mini-player__btn { width: 30px; height: 30px; }
  .player-next { display: none; }
  .player-playlist { width: 258px; }

  .footer__top { gap: 26px; }
  .footer__bottom { align-items: flex-start; flex-direction: column; gap: 12px; }

  .gateway { padding: 40px 20px; }
  .gateway__doors { grid-template-columns: 1fr; gap: 12px; }
  .door { min-height: 130px; padding: 22px; }
  .door__lang { font-size: 28px; }
}

@media (max-width: 600px) {
  .map-grid { grid-template-columns: 1fr; }
  .map-card--hero, .map-card--wide, .map-card--mid, .map-card--half { grid-column: 1; aspect-ratio: 16 / 9; }
  .map-card__title, .map-card--hero .map-card__title { font-size: 24px; }
  .map-card__alt { font-size: 9px; }
  .hero__inner { padding-bottom: 76px; }
  .hero__line { letter-spacing: .12em; }
  .hero__actions { gap: 14px; }
  .hero__steam { font-size: 9px; letter-spacing: .08em; }
  .hero__stats { margin-top: 26px; }
  .footer__cta { max-width: 100%; font-size: 10px; padding-inline: 18px; }
}

@media (max-width: 420px) {
  .unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unit-card { padding: 7px 7px 10px; }
  .unit-card__name { font-size: 17px; }
  .unit-card__meta { gap: 6px; font-size: 8.5px; letter-spacing: .03em; }
  .unit-card__stats { gap: 8px; font-size: 7.5px; }
  .unit-card__stats b { font-size: 15px; }
  .cast-concepts[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ chinese typography */
html[lang="zh-CN"] .hero__headline,
html[lang="zh-CN"] .hero__line,
html[lang="zh-CN"] .hero__edition,
html[lang="zh-CN"] .hero__side,
html[lang="zh-CN"] .gateway__sub,
html[lang="zh-CN"] .section-index,
html[lang="zh-CN"] .map-card__num,
html[lang="zh-CN"] .unit-card__index,
html[lang="zh-CN"] .concept-thumb__no,
html[lang="zh-CN"] .lightbox__counter,
html[lang="zh-CN"] .player-track span:first-child,
html[lang="zh-CN"] .passive-card em,
html[lang="zh-CN"] .door__num,
html[lang="zh-CN"] .stat__value,
html[lang="zh-CN"] .hero__stat b,
html[lang="zh-CN"] .roster-head__meta b,
html[lang="zh-CN"] .roster-count b {
  font-style: normal;
}
html[lang="zh-CN"] .hero__headline {
  position: relative;
  left: 0.25em;
  font-family: "Noto Serif SC", var(--serif);
  letter-spacing: 0.06em;
  line-height: 1.3;
}
html[lang="zh-CN"] .section-title,
html[lang="zh-CN"] .roster-head__title {
  letter-spacing: 0.02em;
}
html[lang="zh-CN"] .section-label,
html[lang="zh-CN"] .eyebrow {
  letter-spacing: 0.22em;
}
html[lang="zh-CN"] .cast-portrait__name,
html[lang="zh-CN"] .unit-card__name,
html[lang="zh-CN"] .map-card__title {
  letter-spacing: 0.03em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg,
  .gateway__bg,
  .element-band__track,
  .hero__motes i { animation: none; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* hidden overlays must stay hidden even with explicit display rules */
.lightbox__load[hidden],
.lightbox__error[hidden] {
  display: none;
}

/* Chinese micro-labels need tighter tracking and a touch more size. */
html[lang="zh-CN"] .unit-section__label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
}
html[lang="zh-CN"] .stat__label {
  font-size: 9.5px;
  letter-spacing: 0.08em;
}
html[lang="zh-CN"] .skill-meta,
html[lang="zh-CN"] .unit-card__meta,
html[lang="zh-CN"] .cast-portrait__meta,
html[lang="zh-CN"] .mini-player__label,
html[lang="zh-CN"] .footer__note {
  letter-spacing: 0.1em;
}
html[lang="zh-CN"] .hero__eyebrow { letter-spacing: 0.24em; }
html[lang="zh-CN"] .hero__line { letter-spacing: 0.24em; }

@media (max-width: 980px) and (max-height: 500px) {
  .unit-modal { padding: 0; }
  .unit-modal__panel { display: block; width: 100%; height: 100dvh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; border: 0; }
  .unit-modal__panel::after { display: none; }
  .unit-modal__visual { grid-template-columns: minmax(170px, .8fr) minmax(0, 1fr); grid-template-rows: auto; min-height: 260px; }
  .unit-modal__art { margin: 20px; }
  .unit-modal__identity { padding-block: 26px; align-self: center; }
  .unit-modal__content { overflow: visible; }
  .unit-modal__close { position: fixed; top: 10px; right: 12px; }
}

@keyframes mobile-scroll-cue {
  0%, 100% { transform: translateY(-3px); opacity: .65; }
  50% { transform: translateY(3px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__scroll-arrows { animation: none; }
}
