/* ============================================================
   长脚犀 Studio — Museum FX Layer (v1)
   Loaded after museum.css. Owns the "wow" layer only:
   spotlight, grain, tilt, sheen, marquee, counters, entrance.
   Layout & theme stay in styles.css / museum.css.
   ============================================================ */

/* ---------- Cross-page fade (Chromium View Transitions) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  ::view-transition-old(root) {
    animation-duration: 0.22s;
  }
  ::view-transition-new(root) {
    animation-duration: 0.34s;
  }
}

/* ---------- Film grain (fixed, compositor-only jitter) ---------- */
.mx-grain {
  position: fixed;
  inset: -60vmax;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}
@media (prefers-reduced-motion: no-preference) {
  .mx-grain {
    animation: mx-grain-jitter 0.9s steps(6) infinite;
  }
}
@keyframes mx-grain-jitter {
  0% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-2%, 1%, 0); }
  40% { transform: translate3d(1%, -2%, 0); }
  60% { transform: translate3d(-1%, 2%, 0); }
  80% { transform: translate3d(2%, -1%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------- Gold reading progress bar ---------- */
.mx-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483200;
  width: 100%;
  height: 2px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #8a6a3f, var(--mx-gold, #c9a26b), var(--mx-gold-bright, #e0be8a));
  box-shadow: 0 0 12px rgba(224, 190, 138, 0.55);
}

/* ---------- Cursor spotlight (desktop only, added by JS) ---------- */
.mx-cursor-light {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147482900;
  width: 720px;
  height: 720px;
  margin: -360px 0 0 -360px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(232, 201, 143, 0.085) 0%,
    rgba(232, 201, 143, 0.045) 32%,
    rgba(232, 201, 143, 0.0) 62%
  );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s ease;
}
body.mx-light-on .mx-cursor-light {
  opacity: 1;
}

/* ---------- Header polish ---------- */
body.mx-scrolled .site-header {
  background: rgba(12, 11, 9, 0.94) !important;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.62) !important;
}
.desktop-nav a {
  position: relative;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  height: 1px;
  background: linear-gradient(90deg, var(--mx-gold, #c9a26b), var(--mx-gold-bright, #e0be8a));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.desktop-nav a:hover::after {
  transform: scaleX(1);
}

/* ---------- Exhibit card tilt + gold glare (tagged by JS) ---------- */
.mx-tilt-host {
  position: relative;
  overflow: hidden;
}
.mx-tilt-host.mx-tilting {
  transition: transform 0.09s ease-out, border-color 0.4s ease, box-shadow 0.4s ease !important;
}
.mx-sheen {
  position: absolute;
  inset: -1px;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(
    460px circle at var(--mx-gx, 50%) var(--mx-gy, 50%),
    rgba(232, 201, 143, 0.26) 0%,
    rgba(232, 201, 143, 0.09) 38%,
    transparent 64%
  );
  mix-blend-mode: screen;
  transition: opacity 0.45s ease;
}
.mx-tilt-host:hover .mx-sheen {
  opacity: 1;
}

/* ---------- Back to top ---------- */
.mx-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483100;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--mx-hairline, rgba(201, 162, 107, 0.26));
  border-radius: 50%;
  background: rgba(16, 14, 11, 0.86);
  color: var(--mx-gold-bright, #e0be8a);
  font-size: 17px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
}
.mx-top.mx-top-show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.mx-top:hover {
  border-color: var(--mx-gold, #c9a26b);
  box-shadow: 0 0 26px rgba(201, 162, 107, 0.35);
}

/* ============================================================
   Homepage 序厅 — spotlight, seal orbit, shimmer, dust, marquee
   ============================================================ */

/* layered spotlight cones breathing above the hero */
.mx-home .mx-hero {
  position: relative;
  isolation: isolate;
}
.mx-home .mx-hero::before {
  content: "";
  position: absolute;
  inset: -140px -30vw 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52% 46% at 50% 0%, rgba(224, 190, 138, 0.13), transparent 70%),
    radial-gradient(24% 38% at 32% 4%, rgba(224, 190, 138, 0.06), transparent 72%),
    radial-gradient(24% 38% at 68% 4%, rgba(224, 190, 138, 0.06), transparent 72%);
}
@media (prefers-reduced-motion: no-preference) {
  .mx-home .mx-hero::before {
    animation: mx-breathe 8.5s ease-in-out infinite alternate;
  }
}
@keyframes mx-breathe {
  from { opacity: 0.75; transform: scaleY(0.98); }
  to { opacity: 1.1; transform: scaleY(1.02); }
}

/* dust motes floating in the spotlight (spawned by JS) */
.mx-dust {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.mx-dust i {
  position: absolute;
  bottom: -3%;
  display: block;
  width: var(--sz, 3px);
  height: var(--sz, 3px);
  border-radius: 50%;
  background: rgba(238, 216, 175, 0.85);
  filter: blur(0.6px);
  opacity: 0;
  animation: mx-float var(--dur, 20s) linear var(--delay, 0s) infinite;
}
@keyframes mx-float {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  8% { opacity: var(--peak, 0.5); }
  55% { opacity: calc(var(--peak, 0.5) * 0.55); }
  100% { transform: translate3d(var(--sway, 30px), -108vh, 0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mx-dust { display: none; }
}

/* seal + rotating ring of circular text */
.mx-seal-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: 4px 0 20px;
}
.mx-seal-orbit .mx-hero-seal {
  margin: 0;
}
.mx-seal-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.mx-seal-ring text {
  fill: var(--mx-gold, #c9a26b);
  font-size: 10.4px;
  font-weight: 600;
  letter-spacing: 0.22em;
  opacity: 0.85;
}
@media (prefers-reduced-motion: no-preference) {
  .mx-seal-ring {
    animation: mx-orbit 30s linear infinite;
  }
}
@keyframes mx-orbit {
  to { transform: rotate(360deg); }
}

/* gold-foil shimmer sweeping across the title */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .mx-home .mx-hero h1 {
    background: linear-gradient(
      104deg,
      var(--mx-ink, #ece6da) 0%,
      var(--mx-ink, #ece6da) 42%,
      #ecc98c 50%,
      var(--mx-ink, #ece6da) 58%,
      var(--mx-ink, #ece6da) 100%
    );
    background-size: 240% 100%;
    background-position: 120% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  @media (prefers-reduced-motion: no-preference) {
    .mx-home .mx-hero h1 {
      animation: mx-shimmer 7.5s ease-in-out 1.8s infinite;
    }
  }
}
@keyframes mx-shimmer {
  0% { background-position: 120% 0; }
  32% { background-position: -120% 0; }
  100% { background-position: -120% 0; }
}

/* diorama: slow light sweep across the ivory stage */
.mx-diorama {
  position: relative;
}
.mx-diorama::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 42%,
    rgba(255, 252, 240, 0.5) 50%,
    transparent 58%
  );
  background-size: 260% 100%;
  background-position: 130% 0;
  mix-blend-mode: soft-light;
}
@media (prefers-reduced-motion: no-preference) {
  .mx-diorama::after {
    animation: mx-sweep 9s ease-in-out 2.4s infinite;
  }
}
@keyframes mx-sweep {
  0% { background-position: 130% 0; }
  38% { background-position: -130% 0; }
  100% { background-position: -130% 0; }
}

/* scroll cue */
.mx-scroll-cue {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: clamp(26px, 4vw, 44px);
  padding-bottom: 8px;
}
.mx-scroll-cue span {
  position: relative;
  display: block;
  width: 1px;
  height: 58px;
  overflow: hidden;
  background: rgba(201, 162, 107, 0.18);
}
.mx-scroll-cue span::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, transparent, var(--mx-gold-bright, #e0be8a));
}
@media (prefers-reduced-motion: no-preference) {
  .mx-scroll-cue span::after {
    animation: mx-cue 2.2s cubic-bezier(0.4, 0, 0.4, 1) infinite;
  }
}
@keyframes mx-cue {
  0% { top: -40%; }
  70%, 100% { top: 110%; }
}

/* ---------- Latin species marquee band ---------- */
.mx-marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: clamp(60px, 9vw, 110px) auto 0;
  padding: clamp(16px, 2.2vw, 24px) 0;
  border-top: 1px solid var(--mx-hairline-soft, rgba(201, 162, 107, 0.14));
  border-bottom: 1px solid var(--mx-hairline-soft, rgba(201, 162, 107, 0.14));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.mx-marquee-track {
  display: flex;
  width: max-content;
}
@media (prefers-reduced-motion: no-preference) {
  .mx-marquee-track {
    animation: mx-marquee 46s linear infinite;
  }
  .mx-marquee:hover .mx-marquee-track {
    animation-play-state: paused;
  }
}
.mx-marquee-group {
  display: flex;
  align-items: baseline;
  flex: 0 0 auto;
}
.mx-marquee-group span {
  padding: 0 20px;
  color: var(--mx-faint, #7c7466);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(14px, 1.7vw, 18px);
  letter-spacing: 0.07em;
  white-space: nowrap;
}
.mx-marquee-group b {
  color: var(--mx-gold, #c9a26b);
  font-weight: 400;
  font-style: normal;
  font-size: 0.8em;
}
@keyframes mx-marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Hall cards: giant ghost numerals ---------- */
.mx-halls-grid .mx-hall-card::before {
  content: "01";
  position: absolute;
  top: 6px;
  right: 14px;
  z-index: 2;
  color: transparent;
  font-family: var(--mx-serif, Georgia, serif);
  font-size: clamp(64px, 7.5vw, 104px);
  font-weight: 600;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(224, 190, 138, 0.42);
  opacity: 0.85;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
    -webkit-text-stroke-color 0.5s ease;
}
.mx-halls-grid .mx-hall-card:nth-child(2)::before {
  content: "02";
}
.mx-halls-grid .mx-hall-card:nth-child(3)::before {
  content: "03";
}
.mx-halls-grid .mx-hall-card:hover::before {
  opacity: 1;
  transform: translateY(-5px);
  -webkit-text-stroke-color: rgba(232, 201, 143, 0.85);
}

/* ---------- Stats band with counters ---------- */
.mx-stats {
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) 0 0;
}
.mx-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--mx-hairline-soft, rgba(201, 162, 107, 0.14));
  border: 1px solid var(--mx-hairline-soft, rgba(201, 162, 107, 0.14));
  border-radius: 8px;
}
.mx-stat {
  position: relative;
  padding: clamp(26px, 3.4vw, 42px) 18px;
  background: var(--mx-panel, #16130e);
  text-align: center;
  transition: background 0.45s ease;
}
.mx-stat:hover {
  background: var(--mx-panel-raise, #1d1913);
}
.mx-stat strong {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  color: var(--mx-gold-bright, #e0be8a);
  font-family: var(--mx-serif, Georgia, serif);
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mx-stat strong i {
  font-style: normal;
  font-size: 0.55em;
  transform: translateY(-0.5em);
}
.mx-stat > span {
  display: block;
  margin-top: 12px;
  color: var(--mx-muted, #a89f8e);
  font-size: 12.5px;
  letter-spacing: 0.22em;
}

/* ---------- Footer: giant engraved wordmark ---------- */
.mx-footer {
  position: relative;
  overflow: hidden;
}
.mx-footer::before {
  content: "TALL RHINO STUDIO";
  display: block;
  max-width: 100%;
  color: transparent;
  font-family: var(--mx-serif, Georgia, serif);
  font-size: clamp(20px, 6vw, 82px);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(201, 162, 107, 0.22);
  pointer-events: none;
}

/* ============================================================
   Entrance choreography (homepage) — armed only when JS runs
   ============================================================ */
body.mx-home.mx-fx-anim .mx-kicker,
body.mx-home.mx-fx-anim .mx-seal-orbit,
body.mx-home.mx-fx-anim .mx-hero h1,
body.mx-home.mx-fx-anim .mx-hero-sub,
body.mx-home.mx-fx-anim .mx-hero-rule,
body.mx-home.mx-fx-anim .mx-diorama,
body.mx-home.mx-fx-anim .mx-scroll-cue {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(10px);
}
body.mx-home.mx-fx-ready .mx-kicker,
body.mx-home.mx-fx-ready .mx-seal-orbit,
body.mx-home.mx-fx-ready .mx-hero h1,
body.mx-home.mx-fx-ready .mx-hero-sub,
body.mx-home.mx-fx-ready .mx-hero-rule,
body.mx-home.mx-fx-ready .mx-diorama,
body.mx-home.mx-fx-ready .mx-scroll-cue {
  opacity: 1;
  transform: none;
  filter: none;
  transition:
    opacity 1s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
body.mx-home.mx-fx-ready .mx-seal-orbit { transition-delay: 0.08s; }
body.mx-home.mx-fx-ready .mx-hero h1 { transition-delay: 0.18s; }
body.mx-home.mx-fx-ready .mx-hero-sub { transition-delay: 0.32s; }
body.mx-home.mx-fx-ready .mx-hero-rule { transition-delay: 0.44s; }
body.mx-home.mx-fx-ready .mx-diorama { transition-delay: 0.56s; }
body.mx-home.mx-fx-ready .mx-scroll-cue { transition-delay: 0.72s; }

/* ============================================================
   FX v2 — 开馆仪式 / 聚光灯点灯 / 犀牛脚印 / 玻璃展柜
   ============================================================ */

/* ---------- 开馆仪式 (once per session, homepage) ---------- */
.mx-door {
  position: fixed;
  inset: 0;
  z-index: 2147483400;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.mx-door::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(46% 60% at 50% 8%, rgba(224, 190, 138, 0.14), transparent 70%);
  opacity: 0;
  animation: mx-door-light 1s ease 0.2s forwards;
}
@keyframes mx-door-light {
  to { opacity: 1; }
}
.mx-door-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  z-index: 1;
  background: linear-gradient(180deg, #0c0b09 0%, #0a0908 100%);
  transition: transform 0.95s cubic-bezier(0.72, 0, 0.16, 1);
}
.mx-door-l { left: 0; border-right: 1px solid rgba(201, 162, 107, 0.3); }
.mx-door-r { right: 0; border-left: 1px solid rgba(201, 162, 107, 0.3); }
.mx-door-open .mx-door-l { transform: translateX(-102%); }
.mx-door-open .mx-door-r { transform: translateX(102%); }
.mx-door-center {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 20px;
  transition: opacity 0.4s ease;
}
.mx-door-open .mx-door-center { opacity: 0; }
.mx-door-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
}
.mx-door-emblem img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--mx-mat, #efe9dc);
  opacity: 0;
  transform: scale(0.82);
  animation: mx-door-seal 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.35s forwards;
}
@keyframes mx-door-seal {
  to { opacity: 1; transform: scale(1); }
}
.mx-door-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.mx-door-ring circle {
  fill: none;
  stroke: var(--mx-gold, #c9a26b);
  stroke-width: 1.6;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  animation: mx-door-draw 1.15s cubic-bezier(0.5, 0, 0.3, 1) 0.4s forwards;
}
@keyframes mx-door-draw {
  to { stroke-dashoffset: 0; }
}
.mx-door-center p {
  margin: 0;
  color: var(--mx-gold, #c9a26b);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  opacity: 0;
  animation: mx-door-text 0.9s ease 0.75s forwards;
}
@keyframes mx-door-text {
  to { opacity: 0.95; }
}

/* ---------- 聚光灯点灯 (exhibit ignition, tagged by JS) ---------- */
img.mx-spot {
  filter: brightness(0.34) saturate(0.72);
}
img.mx-spot.mx-lit {
  animation: mx-ignite 1.05s cubic-bezier(0.25, 0.55, 0.3, 1) forwards;
}
@keyframes mx-ignite {
  0% { filter: brightness(0.34) saturate(0.72); }
  22% { filter: brightness(0.52) saturate(0.8); }
  30% { filter: brightness(0.37) saturate(0.74); }
  58% { filter: brightness(1.13) saturate(1.05); }
  100% { filter: brightness(1) saturate(1); }
}

/* ---------- 玻璃展柜 ---------- */
.mx-glass {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.mx-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    112deg,
    transparent 42%,
    rgba(255, 255, 255, 0.38) 50%,
    rgba(255, 255, 255, 0.12) 54%,
    transparent 62%
  );
  background-size: 240% 100%;
  background-position: 132% 0;
  mix-blend-mode: soft-light;
}
@media (prefers-reduced-motion: no-preference) {
  .mx-glass::after {
    animation: mx-glass-sweep 8.5s ease-in-out 3.2s infinite;
  }
}
@keyframes mx-glass-sweep {
  0% { background-position: 132% 0; }
  42% { background-position: -112% 0; }
  100% { background-position: -112% 0; }
}
/* 地面倒影：像立在玻璃展台上（WebKit/Chromium） */
.head-africa-cover img,
.head-limited-cover img,
.bronze-detail-cover img,
.reference-hero-image {
  -webkit-box-reflect: below 3px linear-gradient(transparent 86%, rgba(0, 0, 0, 0.26));
}

/* ---------- 犀牛脚印导览 (homepage, tagged by JS) ---------- */
.mx-tracks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
}
body.mx-home {
  position: relative;
}
.mx-print {
  position: absolute;
  width: 30px;
  height: 33px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 44'%3E%3Cg fill='%23c9a26b'%3E%3Cellipse cx='20' cy='28' rx='13' ry='14'/%3E%3Cellipse cx='7.5' cy='12' rx='5.2' ry='6.4'/%3E%3Cellipse cx='20' cy='7.5' rx='5.6' ry='6.8'/%3E%3Cellipse cx='32.5' cy='12' rx='5.2' ry='6.4'/%3E%3C/g%3E%3C/svg%3E")
    center / contain no-repeat;
  opacity: 0;
  transform: scale(1.35) var(--rot, rotate(180deg));
  filter: drop-shadow(0 0 7px rgba(201, 162, 107, 0.4));
}
.mx-print.mx-in-step {
  animation: mx-stamp 0.55s cubic-bezier(0.2, 0.7, 0.3, 1.15) forwards;
}
@keyframes mx-stamp {
  0% { opacity: 0; transform: scale(1.35) var(--rot, rotate(180deg)); }
  55% { opacity: 0.46; }
  100% { opacity: 0.32; transform: scale(1) var(--rot, rotate(180deg)); }
}
.mx-print.mx-in-static {
  opacity: 0.32;
  transform: scale(1) var(--rot, rotate(180deg));
}
@media (max-width: 1319px) {
  .mx-tracks { display: none; }
}

/* ============================================================
   FX v3 — 群像视差 / 互动比例尺 / 展馆平面图 / 滚动长卷
   ============================================================ */

/* ---------- 首页群像鼠标视差 ---------- */
.mx-diorama.mx-parallax-on {
  transform: perspective(1200px) rotateY(calc(var(--mx-dx, 0) * 2.2deg))
    rotateX(calc(var(--mx-dy, 0) * -1.6deg));
  transition: transform 0.25s ease-out;
  will-change: transform;
}
.mx-diorama.mx-parallax-on .mx-diorama-track img {
  transform: translate3d(calc(var(--mx-dx, 0) * -16px), calc(var(--mx-dy, 0) * -7px), 0)
    scale(1.045);
  transition: transform 0.25s ease-out;
}

/* ---------- 互动比例尺 ---------- */
.mx-scale-lab {
  margin-top: 18px;
  padding: 22px 22px 26px;
  background: var(--mx-panel, #16130e);
  border: 1px solid var(--mx-hairline-soft, rgba(201, 162, 107, 0.14));
  border-radius: 8px;
}
.mx-scale-lab h2 {
  margin: 0;
  color: var(--mx-gold, #c9a26b);
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.mx-scale-sub {
  margin: 10px 0 14px;
  color: var(--mx-faint, #7c7466);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.mx-scale-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.mx-scale-btns button {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid var(--mx-hairline, rgba(201, 162, 107, 0.26));
  border-radius: 6px;
  background: transparent;
  color: var(--mx-muted, #a89f8e);
  font-family: var(--mx-serif, Georgia, serif);
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s ease;
}
.mx-scale-btns button.is-active {
  background: linear-gradient(135deg, var(--mx-gold, #c9a26b), #ab8352);
  border-color: transparent;
  color: #17130c;
  font-weight: 700;
}
.mx-scale-stage {
  position: relative;
  height: 320px;
  overflow: hidden;
  border: 1px solid var(--mx-hairline-soft, rgba(201, 162, 107, 0.14));
  border-radius: 6px;
  background:
    linear-gradient(rgba(201, 162, 107, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 107, 0.05) 1px, transparent 1px),
    #100e0b;
  background-size: var(--mx-cm10, 16px) var(--mx-cm10, 16px);
}
.mx-scale-floor {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--mx-hairline, rgba(201, 162, 107, 0.26));
}
.mx-scale-human {
  position: absolute;
  bottom: 0;
  left: 6%;
}
.mx-scale-human svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: rgba(168, 159, 142, 0.5);
}
.mx-scale-human i,
.mx-desk i,
.mx-scale-fig i {
  position: absolute;
  left: 50%;
  top: -20px;
  transform: translateX(-50%);
  color: var(--mx-faint, #7c7466);
  font-size: 10.5px;
  font-style: normal;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.mx-desk {
  position: absolute;
  right: 4%;
  bottom: 0;
  width: 52%;
  border-top: 2px solid rgba(201, 162, 107, 0.55);
  background: linear-gradient(180deg, rgba(201, 162, 107, 0.07), transparent 70%);
}
.mx-desk::before,
.mx-desk::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(201, 162, 107, 0.28);
}
.mx-desk::before { left: 7%; }
.mx-desk::after { right: 7%; }
.mx-desk i { top: auto; bottom: -18px; color: rgba(124, 116, 102, 0.8); }
.mx-scale-fig {
  position: absolute;
  transition: width 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    left 0.55s ease, bottom 0.55s ease;
}
.mx-scale-fig svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--mx-gold-bright, #e0be8a);
  filter: drop-shadow(0 0 10px rgba(224, 190, 138, 0.35));
}
.mx-scale-fig i {
  top: -22px;
  color: var(--mx-gold-bright, #e0be8a);
  font-weight: 700;
}
.mx-scale-note {
  margin: 14px 0 0;
  color: var(--mx-muted, #a89f8e);
  font-size: 13px;
  line-height: 1.7;
}
.mx-scale-note strong {
  color: var(--mx-gold-bright, #e0be8a);
  font-family: var(--mx-serif, Georgia, serif);
}

/* ---------- 展馆平面图 ---------- */
.mx-map {
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) 0 0;
}
.mx-map-heading {
  margin-bottom: clamp(24px, 3.6vw, 40px);
  text-align: center;
}
.mx-map-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 52px);
  color: var(--mx-ink, #ece6da);
}
.mx-map-frame {
  padding: clamp(14px, 2.4vw, 28px);
  background: var(--mx-panel, #16130e);
  border: 1px solid var(--mx-hairline-soft, rgba(201, 162, 107, 0.14));
  border-radius: 8px;
}
.mx-map-svg {
  display: block;
  width: 100%;
  height: auto;
}
.mx-map-svg .mx-wall {
  fill: none;
  stroke: rgba(201, 162, 107, 0.4);
  stroke-width: 2;
}
.mx-map-svg .mx-room rect.mx-room-fill {
  fill: rgba(201, 162, 107, 0.05);
  stroke: rgba(201, 162, 107, 0.3);
  stroke-width: 1.4;
  transition: fill 0.35s ease, stroke 0.35s ease;
}
.mx-map-svg .mx-room:hover rect.mx-room-fill,
.mx-map-svg .mx-room:focus rect.mx-room-fill {
  fill: rgba(201, 162, 107, 0.18);
  stroke: var(--mx-gold, #c9a26b);
}
.mx-map-svg .mx-room text {
  fill: var(--mx-muted, #a89f8e);
  transition: fill 0.35s ease;
}
.mx-map-svg .mx-room .mx-room-name {
  fill: var(--mx-ink, #ece6da);
  font-family: var(--mx-serif, Georgia, serif);
  font-size: 21px;
  letter-spacing: 2px;
}
.mx-map-svg .mx-room .mx-room-tag {
  font-size: 10.5px;
  letter-spacing: 2.4px;
  fill: var(--mx-gold, #c9a26b);
}
.mx-map-svg .mx-room .mx-room-sub {
  font-size: 11px;
  letter-spacing: 1.5px;
}
.mx-map-svg .mx-room:hover .mx-room-name {
  fill: var(--mx-gold-bright, #e0be8a);
}
.mx-map-svg .mx-lamp {
  fill: rgba(224, 190, 138, 0.25);
  transition: fill 0.35s ease, r 0.35s ease;
}
.mx-map-svg .mx-room:hover .mx-lamp {
  fill: var(--mx-gold-bright, #e0be8a);
}
.mx-map-svg .mx-case {
  fill: rgba(201, 162, 107, 0.14);
}
.mx-map-svg .mx-path {
  fill: none;
  stroke: rgba(224, 190, 138, 0.4);
  stroke-width: 1.6;
  stroke-dasharray: 3 7;
  stroke-linecap: round;
}
@media (prefers-reduced-motion: no-preference) {
  .mx-map-svg .mx-path {
    animation: mx-path-walk 26s linear infinite;
  }
}
@keyframes mx-path-walk {
  to { stroke-dashoffset: -500; }
}
.mx-map-svg .mx-star {
  fill: var(--mx-gold-bright, #e0be8a);
}

/* ---------- 镇馆之宝入口横幅 ---------- */
.mx-star-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  margin-top: 18px;
  padding: 20px 26px;
  background: linear-gradient(100deg, #1d1811 0%, #16130e 55%),
    var(--mx-panel, #16130e);
  border: 1px solid var(--mx-hairline, rgba(201, 162, 107, 0.26));
  border-radius: 8px;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.mx-star-banner:hover {
  border-color: var(--mx-gold, #c9a26b);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 162, 107, 0.3);
}
.mx-star-banner-star {
  color: var(--mx-gold-bright, #e0be8a);
  font-size: 26px;
}
.mx-star-banner-copy {
  flex: 1;
  min-width: 0;
}
.mx-star-banner-copy span {
  display: block;
  color: var(--mx-gold, #c9a26b);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
}
.mx-star-banner-copy strong {
  display: block;
  margin-top: 6px;
  color: var(--mx-ink, #ece6da);
  font-family: var(--mx-serif, Georgia, serif);
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.mx-star-banner-copy em {
  display: block;
  margin-top: 4px;
  color: var(--mx-faint, #7c7466);
  font-size: 12.5px;
  font-style: italic;
  font-family: Georgia, serif;
}
.mx-star-banner-arrow {
  color: var(--mx-gold-bright, #e0be8a);
  font-size: 22px;
  transition: transform 0.35s ease;
}
.mx-star-banner:hover .mx-star-banner-arrow {
  transform: translateX(6px);
}

/* ---------- 明星展品滚动长卷 ---------- */
body.mx-story-page {
  background: #0a0908 !important;
}
.mx-story {
  position: relative;
}
.mx-story-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.mx-story-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.mx-story-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mx-story-layer.is-plate {
  display: grid;
  place-items: center;
  padding: clamp(60px, 10vh, 120px) clamp(16px, 6vw, 120px);
}
.mx-story-layer.is-plate img {
  width: auto;
  height: auto;
  max-width: min(100%, 980px);
  max-height: 100%;
  background: var(--mx-mat, #efe9dc);
  border: 1px solid var(--mx-mat-edge, #d8d0bf);
  border-radius: 6px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
  padding: 16px;
}
.mx-story-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 42%, rgba(8, 7, 6, 0.82) 100%),
    radial-gradient(60% 50% at 50% 0%, rgba(224, 190, 138, 0.12), transparent 70%);
}
.mx-story-stage[data-act="0"] .mx-layer-hero { opacity: 1; transform: scale(1.06); }
.mx-story-stage[data-act="1"] .mx-layer-hero { opacity: 1; transform: scale(1); }
.mx-story-stage[data-act="2"] .mx-layer-product { opacity: 1; }
.mx-story-stage[data-act="3"] .mx-layer-product { opacity: 1; }
.mx-story-stage[data-act="2"] .mx-layer-product img { transform: scale(1); }
.mx-story-stage[data-act="3"] .mx-layer-product img { transform: scale(1.9); }
.mx-story-layer.is-plate img {
  transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: 62% 30%;
}
.mx-story-stage[data-act="4"] .mx-layer-scale { opacity: 1; }
.mx-story-stage[data-act="0"] .mx-layer-hero img,
.mx-story-stage[data-act="1"] .mx-layer-hero img {
  filter: saturate(0.9) brightness(0.85);
}
.mx-story-acts {
  position: relative;
  z-index: 3;
  margin-top: -100svh;
  pointer-events: none;
}
.mx-story-act {
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding: 0 0 clamp(40px, 8vh, 90px);
}
.mx-story-act.is-title {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.mx-story-card {
  width: min(calc(100% - 32px), 520px);
  margin-left: clamp(16px, 7vw, 110px);
  padding: 24px 26px 26px;
  background: rgba(14, 12, 10, 0.82);
  border: 1px solid var(--mx-hairline, rgba(201, 162, 107, 0.26));
  border-left: 3px solid var(--mx-gold, #c9a26b);
  border-radius: 6px;
  backdrop-filter: blur(14px);
  opacity: 0.25;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: auto;
}
.mx-story-act.is-on .mx-story-card {
  opacity: 1;
  transform: none;
}
.mx-story-card span {
  color: var(--mx-gold, #c9a26b);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
}
.mx-story-card h2 {
  margin: 10px 0 0;
  color: var(--mx-ink, #ece6da);
  font-size: clamp(22px, 3vw, 30px);
}
.mx-story-card p {
  margin: 12px 0 0;
  color: var(--mx-muted, #a89f8e);
  font-size: 14.5px;
  line-height: 1.95;
}
.mx-story-title-inner {
  pointer-events: auto;
}
.mx-story-title-inner .mx-kicker {
  justify-content: center;
}
.mx-story-title-inner h1 {
  margin: 12px 0 0;
  color: var(--mx-ink, #ece6da);
  font-size: clamp(40px, 7.5vw, 92px);
  line-height: 1.05;
  text-shadow: 0 10px 60px rgba(0, 0, 0, 0.8);
}
.mx-story-title-inner .latin {
  margin: 14px 0 0;
  color: rgba(236, 230, 218, 0.75);
  font-family: Georgia, serif;
  font-style: italic;
  font-size: clamp(14px, 2vw, 19px);
  letter-spacing: 0.1em;
}
.mx-story-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--mx-hairline, rgba(201, 162, 107, 0.26));
  border-radius: 999px;
  background: rgba(14, 12, 10, 0.7);
  color: var(--mx-gold-bright, #e0be8a);
  font-size: 12px;
  letter-spacing: 0.32em;
  backdrop-filter: blur(10px);
}
.mx-story-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.mx-story-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.mx-story-cta a.is-gold {
  background: linear-gradient(135deg, var(--mx-gold, #c9a26b), #ab8352);
  color: #17130c;
}
.mx-story-cta a.is-line {
  border: 1px solid var(--mx-hairline, rgba(201, 162, 107, 0.26));
  color: var(--mx-ink, #ece6da);
}
.mx-story-cta a.is-line:hover {
  border-color: var(--mx-gold, #c9a26b);
}
.mx-story-hint {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  color: rgba(236, 230, 218, 0.55);
  font-size: 11px;
  letter-spacing: 0.3em;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.mx-story-hint.is-gone {
  opacity: 0;
}

@media (max-width: 720px) {
  .mx-scale-stage { height: 260px; }
  .mx-desk { width: 46%; }
  .mx-story-card { margin-left: 16px; }
  .mx-map-svg .mx-room .mx-room-name { font-size: 26px; }
  .mx-map-svg .mx-room .mx-room-sub, .mx-map-svg .mx-room .mx-room-tag { font-size: 13px; }
}

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .mx-seal-orbit {
    width: 128px;
    height: 128px;
  }
  .mx-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mx-cursor-light {
    display: none;
  }
  .mx-halls-grid .mx-hall-card::before {
    font-size: 56px;
  }
}
