:root {
  --navy: #061126;
  --navy-soft: rgba(8, 18, 39, 0.72);
  --gold: #f6cf78;
  --gold-deep: #b88930;
  --blue: #42a5ff;
  --cyan: #6ce4ff;
  --jade: #1fc49b;
  --white: #f9fcff;
  --text: #f9fbff;
  --muted: rgba(234, 243, 255, 0.78);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --border-gold: rgba(246, 207, 120, 0.54);
  --shadow-gold: 0 26px 90px rgba(244, 189, 82, 0.22);
  --shadow-blue: 0 24px 90px rgba(66, 165, 255, 0.22);
  --guide-progress: 0;
  --guide-x: 0px;
  --guide-y: 24vh;
  --scroll-depth: 0;
  --mist-offset: 0px;
  color-scheme: dark;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(247, 205, 116, 0.34), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(66, 165, 255, 0.2), transparent 28%),
    linear-gradient(180deg, #07142d 0%, #0b1d3b 38%, #081225 100%);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Hiragino Sans GB",
    "Noto Sans CJK SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

:focus-visible {
  outline: 3px solid rgba(246, 207, 120, 0.75);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: -80px;
  z-index: 1000;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  background: rgba(8, 18, 39, 0.86);
  color: var(--text);
  padding: 10px 18px;
  box-shadow: var(--shadow-gold);
  backdrop-filter: blur(16px);
  transition: top 180ms ease;
}

.skip-link:focus {
  top: 18px;
}

.hall-header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 80;
  padding: 0 24px;
}

.hall-nav {
  width: min(1240px, 100%);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(246, 207, 120, 0.48);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(8, 18, 39, 0.72), rgba(17, 42, 82, 0.5)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  padding: 10px 12px 10px 22px;
}

.hall-brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.hall-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #061126;
  background: linear-gradient(135deg, #fff8d6, var(--gold) 48%, #65d9ff);
  box-shadow:
    0 0 34px rgba(246, 207, 120, 0.42),
    inset 0 0 16px rgba(255, 255, 255, 0.62);
}

.hall-brand-mark svg {
  width: 25px;
  height: 25px;
}

.hall-brand strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.1;
  font-weight: 900;
}

.hall-brand small {
  display: block;
  margin-top: 2px;
  color: rgba(234, 243, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hall-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hall-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.94rem;
  font-weight: 750;
  padding: 0 16px;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.hall-links a:hover,
.hall-links a:focus-visible {
  color: #fff7cf;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(246, 207, 120, 0.34);
}

.hall-nav-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  display: none;
  place-items: center;
  border: 1px solid rgba(246, 207, 120, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff8d6;
  cursor: pointer;
}

.hall-nav-toggle span {
  position: absolute;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.hall-nav-toggle span:nth-child(1) {
  transform: translateY(-7px);
}

.hall-nav-toggle span:nth-child(3) {
  transform: translateY(7px);
}

.hall-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg);
}

.hall-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hall-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg);
}

.hall-page {
  position: relative;
  isolation: isolate;
}

.hall-three-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.58;
  mix-blend-mode: screen;
}

.heaven-backdrop {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 82%, transparent);
}

.heaven-backdrop::before,
.heaven-backdrop::after {
  content: "";
  position: absolute;
  left: -12vw;
  right: -12vw;
  height: 240px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(216, 235, 255, 0.28), transparent);
  filter: blur(24px);
  transform: translateY(var(--mist-offset));
  animation: mistFlow 18s ease-in-out infinite alternate;
}

.heaven-backdrop::before {
  top: 22vh;
}

.heaven-backdrop::after {
  bottom: 12vh;
  opacity: 0.7;
  animation-delay: -6s;
}

.star {
  position: absolute;
  border-radius: 999px;
  background: #fff8d6;
  box-shadow: 0 0 26px rgba(246, 207, 120, 0.8);
  animation: starPulse 4s ease-in-out infinite;
}

.star-one {
  width: 5px;
  height: 5px;
  left: 16%;
  top: 18%;
}

.star-two {
  width: 4px;
  height: 4px;
  right: 18%;
  top: 32%;
  animation-delay: -1.5s;
}

.star-three {
  width: 6px;
  height: 6px;
  left: 72%;
  bottom: 26%;
  animation-delay: -2.5s;
}

.stair-axis {
  position: fixed;
  left: 50%;
  top: 15vh;
  z-index: 7;
  width: min(24vw, 320px);
  height: 72vh;
  transform: translateX(-50%) perspective(1100px) rotateX(63deg) translateY(calc(var(--scroll-depth) * -72px));
  pointer-events: none;
  opacity: 0.56;
}

.stair-light {
  position: absolute;
  left: 50%;
  top: -10%;
  bottom: -8%;
  width: 5px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(246, 207, 120, 0.9), rgba(66, 165, 255, 0.22), rgba(255, 255, 255, 0));
  box-shadow:
    0 0 30px rgba(246, 207, 120, 0.54),
    0 0 82px rgba(66, 165, 255, 0.22);
}

.step {
  position: absolute;
  left: 50%;
  width: 100%;
  height: 4px;
  transform: translateX(-50%) skewX(-10deg);
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(108, 228, 255, 0.42), rgba(255, 249, 220, 0.82), rgba(108, 228, 255, 0.32), transparent);
  box-shadow:
    0 0 18px rgba(246, 207, 120, 0.22),
    0 16px 42px rgba(66, 165, 255, 0.13);
}

.step::before,
.step::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 247, 206, 0.9);
  box-shadow: 0 0 18px rgba(246, 207, 120, 0.72);
  transform: translateY(-50%);
}

.step::before {
  left: 0;
}

.step::after {
  right: 0;
}

.step-one { top: 4%; width: 38%; }
.step-two { top: 24%; width: 54%; }
.step-three { top: 44%; width: 70%; }
.step-four { top: 64%; width: 88%; }
.step-five { top: 84%; width: 108%; }

.pilgrim-guide {
  position: fixed;
  left: calc(50% + var(--guide-x));
  top: var(--guide-y);
  z-index: 12;
  width: 118px;
  height: 118px;
  transform: translate(-50%, -50%) scale(calc(0.82 + var(--guide-progress) * 0.2));
  pointer-events: none;
  transition: filter 260ms ease, opacity 260ms ease;
}

.guide-trail {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 42vh;
  transform: translate(-50%, -8%);
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(255, 245, 197, 0.72), rgba(108, 228, 255, 0.34), transparent);
  filter: blur(1px);
  opacity: 0.82;
}

.guide-orb {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 46%, rgba(255, 255, 255, 0.95) 0 7%, rgba(246, 207, 120, 0.72) 8% 15%, transparent 16%),
    radial-gradient(circle, rgba(108, 228, 255, 0.2), transparent 60%);
  box-shadow:
    0 0 34px rgba(246, 207, 120, 0.54),
    0 0 90px rgba(66, 165, 255, 0.34);
  animation: guideFloat 3.4s ease-in-out infinite;
}

.guide-ring {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(246, 207, 120, 0.62);
  border-radius: 50%;
  box-shadow: inset 0 0 28px rgba(66, 165, 255, 0.18);
  animation: guideSpin 8s linear infinite;
}

.guide-ring-two {
  inset: 20px;
  border-color: rgba(108, 228, 255, 0.55);
  animation-duration: 5.8s;
  animation-direction: reverse;
}

.guide-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff8d5;
  box-shadow:
    0 0 22px rgba(246, 207, 120, 0.9),
    0 0 44px rgba(108, 228, 255, 0.42);
  transform: translate(-50%, -50%);
}

.guide-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 248, 216, 0.92);
  box-shadow: 0 0 18px rgba(246, 207, 120, 0.72);
}

.spark-one { left: 16%; top: 28%; animation: sparkDrift 3.2s ease-in-out infinite; }
.spark-two { right: 12%; top: 48%; animation: sparkDrift 3.8s ease-in-out infinite -1s; }
.spark-three { left: 42%; bottom: 10%; animation: sparkDrift 4.2s ease-in-out infinite -2s; }

.hall-intro {
  position: relative;
  min-height: 108dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 132px 24px 104px;
  background:
    radial-gradient(circle at 50% 42%, rgba(253, 206, 105, 0.17), transparent 22%),
    radial-gradient(circle at 14% 16%, rgba(92, 149, 255, 0.34), transparent 32%),
    radial-gradient(circle at 82% 20%, rgba(89, 218, 255, 0.2), transparent 28%),
    radial-gradient(circle at 70% 88%, rgba(234, 127, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #02050f 0%, #071126 46%, #0b1740 100%);
}

.hall-intro::before,
.hall-intro::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hall-intro::before {
  inset: -8%;
  z-index: -2;
  opacity: 0.82;
  background-image:
    radial-gradient(circle, rgba(255, 249, 222, 0.94) 0 1.2px, transparent 1.7px),
    radial-gradient(circle, rgba(129, 224, 255, 0.78) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.56) 0 0.8px, transparent 1.3px);
  background-position:
    10px 18px,
    84px 56px,
    40px 110px;
  background-size:
    132px 132px,
    184px 184px,
    96px 96px;
  transform: translate3d(0, calc(var(--scroll-depth) * -46px), 0);
  animation: starDrift 30s linear infinite;
}

.hall-intro::after {
  left: -16vw;
  right: -16vw;
  bottom: -18vh;
  z-index: -1;
  height: 54vh;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(255, 214, 124, 0.28), transparent 38%),
    linear-gradient(90deg, transparent, rgba(78, 142, 255, 0.17), rgba(246, 207, 120, 0.14), transparent);
  filter: blur(34px);
}

.intro-nebula {
  position: absolute;
  inset: 10vh 6vw;
  z-index: -1;
  border-radius: 50%;
  background:
    conic-gradient(
      from 170deg at 50% 50%,
      transparent,
      rgba(108, 228, 255, 0.12),
      transparent 28%,
      rgba(246, 207, 120, 0.2),
      transparent 60%,
      rgba(116, 111, 255, 0.15),
      transparent
    );
  filter: blur(30px);
  opacity: 0.9;
  animation: nebulaBreathe 18s ease-in-out infinite alternate;
}

.intro-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: min(74vw, 1040px);
  aspect-ratio: 1;
  border: 1px solid rgba(108, 228, 255, 0.18);
  border-radius: 50%;
  box-shadow:
    inset 0 0 100px rgba(66, 165, 255, 0.09),
    0 0 120px rgba(66, 165, 255, 0.12);
  transform: translate(-50%, -50%);
  animation: introOrbit 34s linear infinite;
}

.intro-orbit::before,
.intro-orbit::after {
  content: "";
  position: absolute;
  border-radius: inherit;
}

.intro-orbit::before {
  inset: 11%;
  border: 1px solid rgba(246, 207, 120, 0.22);
}

.intro-orbit::after {
  inset: 26%;
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.rank-scene {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 132px 24px 96px;
}

.hall-hero {
  min-height: 112dvh;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: clamp(28px, 4vw, 48px);
}

.emperor-scene {
  min-height: 112dvh;
}

.scene-media {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.scene-media img,
.rule-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(calc(1.06 + var(--scroll-depth) * 0.035));
  filter: saturate(1.08) contrast(1.03);
}

.scene-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(4, 10, 24, 0.86), rgba(7, 18, 45, 0.34) 46%, rgba(4, 10, 24, 0.72)),
    linear-gradient(180deg, rgba(4, 10, 24, 0.46), rgba(4, 10, 24, 0.2) 48%, rgba(4, 10, 24, 0.82));
}

.hall-hero .scene-scrim {
  background:
    radial-gradient(circle at 60% 22%, rgba(246, 207, 120, 0.42), transparent 24%),
    linear-gradient(90deg, rgba(4, 10, 24, 0.84), rgba(7, 18, 45, 0.3) 48%, rgba(4, 10, 24, 0.66)),
    linear-gradient(180deg, rgba(4, 10, 24, 0.26), rgba(4, 10, 24, 0.18) 48%, rgba(4, 10, 24, 0.82));
}

.hero-orbit {
  position: absolute;
  right: 9vw;
  top: 12vh;
  z-index: -1;
  width: min(40vw, 620px);
  aspect-ratio: 1;
  border: 1px solid rgba(246, 207, 120, 0.36);
  border-radius: 50%;
  box-shadow:
    inset 0 0 50px rgba(246, 207, 120, 0.18),
    0 0 80px rgba(246, 207, 120, 0.18);
  animation: orbitSpin 28s linear infinite;
}

.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(108, 228, 255, 0.24);
  border-radius: 50%;
}

.hero-orbit::after {
  inset: 20%;
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-content,
.rank-stage-copy,
.rank-panel,
.rule-card,
.footer-glass {
  border: 1px solid var(--border-gold);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07)),
    rgba(7, 18, 45, 0.42);
  box-shadow:
    var(--shadow-gold),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 0 46px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px) saturate(1.24);
  -webkit-backdrop-filter: blur(24px) saturate(1.24);
}

.hero-content,
.rank-stage-copy {
  position: relative;
  z-index: 20;
  width: min(760px, 100%);
  border-radius: 34px;
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
}

.hero-content {
  justify-self: center;
  width: min(980px, 100%);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(7, 18, 45, 0.76);
}

.hall-intro .hero-content {
  border-color: rgba(246, 207, 120, 0.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 154, 54, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.065)),
    rgba(5, 12, 33, 0.72);
}

.hero-content::before,
.rank-panel::before,
.rank-stage-copy::before,
.rule-card::before,
.footer-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.22) 18%, transparent 36%),
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.22), transparent 26%);
  transform: translateX(-130%);
  animation: glassSweep 8s ease-in-out infinite;
  pointer-events: none;
}

.hall-kicker,
.rank-eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: #fff3bf;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1 {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  font-family:
    "Songti SC",
    "STSong",
    "Noto Serif CJK SC",
    "Noto Serif SC",
    serif;
  font-size: clamp(3.3rem, 7.6vw, 7.9rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
  background: linear-gradient(120deg, #ffffff 0%, #fff4bf 36%, #f2bc55 62%, #9be7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 46px rgba(246, 207, 120, 0.16);
}

.hero-content .flame-title {
  isolation: isolate;
  overflow: visible;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.25));
}

.flame-title::before,
.flame-title::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.flame-title::before {
  z-index: -2;
  color: rgba(255, 112, 28, 0.82);
  filter: blur(24px);
  transform: translateY(0.08em) scale(1.02);
  animation: flameGlow 3.2s ease-in-out infinite;
}

.flame-title::after {
  z-index: -1;
  background: linear-gradient(to top, rgba(255, 104, 24, 0.78), rgba(255, 214, 104, 0.26), transparent 68%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: blur(5px);
  animation: flameFlicker 1.9s steps(2, end) infinite;
}

.flame-title > span:first-child {
  position: relative;
  z-index: 1;
  display: inline-block;
  background:
    linear-gradient(180deg, #ffffff 0%, #fff6cf 27%, #ffd46f 56%, #ff8d32 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-embers {
  position: absolute;
  inset: -0.24em 3% 0.06em;
  z-index: 2;
  pointer-events: none;
}

.title-embers i {
  position: absolute;
  left: var(--ember-x);
  bottom: 8%;
  width: var(--ember-size);
  height: calc(var(--ember-size) * 1.35);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 28%, #fff8c9, #ffb145 42%, rgba(255, 97, 24, 0.82) 68%, transparent 72%);
  box-shadow:
    0 0 10px rgba(255, 201, 100, 0.82),
    0 0 30px rgba(255, 102, 25, 0.32);
  filter: blur(0.1px);
  opacity: 0;
  animation: emberRise var(--ember-duration) ease-out var(--ember-delay) infinite;
}

.title-embers i:nth-child(1) { --ember-x: 7%; --ember-size: 8px; --ember-duration: 2.9s; --ember-delay: -0.3s; }
.title-embers i:nth-child(2) { --ember-x: 20%; --ember-size: 6px; --ember-duration: 3.6s; --ember-delay: -1.8s; }
.title-embers i:nth-child(3) { --ember-x: 32%; --ember-size: 9px; --ember-duration: 3.2s; --ember-delay: -0.9s; }
.title-embers i:nth-child(4) { --ember-x: 45%; --ember-size: 7px; --ember-duration: 2.7s; --ember-delay: -2s; }
.title-embers i:nth-child(5) { --ember-x: 58%; --ember-size: 10px; --ember-duration: 3.8s; --ember-delay: -1.2s; }
.title-embers i:nth-child(6) { --ember-x: 71%; --ember-size: 6px; --ember-duration: 2.8s; --ember-delay: -0.5s; }
.title-embers i:nth-child(7) { --ember-x: 83%; --ember-size: 8px; --ember-duration: 3.4s; --ember-delay: -2.4s; }
.title-embers i:nth-child(8) { --ember-x: 94%; --ember-size: 5px; --ember-duration: 3s; --ember-delay: -1.3s; }

.hero-subtitle {
  position: relative;
  z-index: 1;
  margin: 28px 0 0;
  color: #ffffff;
  font-size: clamp(1.22rem, 2vw, 1.7rem);
  font-weight: 850;
}

.hero-summary {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.14rem);
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.hall-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 900;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease,
    background 200ms ease;
}

.hall-btn.primary {
  color: #07142d;
  background: linear-gradient(135deg, #ffffff, #fff2b7 38%, var(--gold));
  box-shadow: 0 18px 48px rgba(246, 207, 120, 0.28);
}

.hall-btn.secondary {
  color: #f8fbff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 42px rgba(66, 165, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hall-btn:hover,
.hall-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 64px rgba(246, 207, 120, 0.35);
}

.rank-panel {
  position: relative;
  z-index: 20;
  justify-self: center;
  align-self: end;
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  border-radius: 32px;
  padding: 26px;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
}

.rank-panel.reveal {
  opacity: 1;
  transform: none;
}

.emperor-panel {
  justify-self: center;
  width: min(640px, 100%);
  align-self: center;
  border-color: rgba(255, 238, 176, 0.8);
  background:
    radial-gradient(circle at 10% 20%, rgba(246, 207, 120, 0.2), transparent 34%),
    rgba(8, 18, 39, 0.42);
}

.rank-seal {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 30px;
  color: #07142d;
  font-family:
    "Songti SC",
    "STSong",
    "Noto Serif CJK SC",
    serif;
  font-size: 2.9rem;
  font-weight: 900;
  box-shadow:
    inset 0 0 26px rgba(255, 255, 255, 0.55),
    0 0 44px rgba(246, 207, 120, 0.42);
  animation: sealFloat 4.5s ease-in-out infinite;
}

.emperor-seal {
  background: linear-gradient(135deg, #ffffff, #ffe79f 44%, #d99d31);
}

.heaven-seal {
  background: linear-gradient(135deg, #ffffff, #8bddff 42%, #2d7cff 74%, #f0c265);
}

.king-seal {
  background: linear-gradient(135deg, #ffffff, #46d7ab 44%, #0c7a5c 72%, #f0c265);
}

.rank-panel h2,
.rank-stage-copy h2,
.rule-card h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family:
    "Songti SC",
    "STSong",
    "Noto Serif CJK SC",
    "Noto Serif SC",
    serif;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.05;
  font-weight: 900;
}

.rank-panel strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: #fff3bf;
  font-size: 1.25rem;
}

.rank-panel p:not(.rank-eyebrow),
.rank-stage-copy p:not(.hall-kicker),
.rule-card p {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.rank-journey {
  position: relative;
}

.level-scene {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: clamp(34px, 6vw, 72px);
}

.heaven-king-scene {
  min-height: 112dvh;
}

.heaven-king-scene .scene-scrim {
  background:
    radial-gradient(circle at 62% 42%, rgba(66, 165, 255, 0.3), transparent 28%),
    linear-gradient(90deg, rgba(4, 10, 24, 0.74), rgba(7, 18, 45, 0.28) 48%, rgba(4, 10, 24, 0.72)),
    linear-gradient(180deg, rgba(4, 10, 24, 0.42), rgba(4, 10, 24, 0.16) 50%, rgba(4, 10, 24, 0.78));
}

.king-scene {
  min-height: 112dvh;
}

.king-scene .scene-scrim {
  background:
    radial-gradient(circle at 55% 48%, rgba(31, 196, 155, 0.26), transparent 30%),
    linear-gradient(90deg, rgba(4, 10, 24, 0.72), rgba(7, 18, 45, 0.22) 52%, rgba(4, 10, 24, 0.72)),
    linear-gradient(180deg, rgba(4, 10, 24, 0.36), rgba(4, 10, 24, 0.14) 50%, rgba(4, 10, 24, 0.82));
}

.rank-stage-copy {
  justify-self: center;
  align-self: center;
  width: min(980px, 100%);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(7, 18, 45, 0.68);
}

.heaven-panel,
.king-panel {
  justify-self: center;
  align-self: center;
  width: min(640px, 100%);
}

.heaven-panel {
  border-color: rgba(108, 228, 255, 0.48);
  box-shadow: var(--shadow-blue), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.king-panel {
  border-color: rgba(58, 219, 174, 0.46);
  box-shadow:
    0 26px 90px rgba(31, 196, 155, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body[data-active-rank="emperor"] .emperor-panel,
body[data-active-rank="heaven"] .heaven-panel,
body[data-active-rank="king"] .king-panel {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 70px rgba(246, 207, 120, 0.34),
    0 28px 100px rgba(0, 0, 0, 0.26),
    inset 0 0 54px rgba(255, 255, 255, 0.1);
}

.companion-rank-showcase {
  position: relative;
  z-index: 22;
  grid-column: 1 / -1;
  justify-self: center;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.companion-rank-showcase--emperor {
  width: min(1040px, 100%);
}

.companion-card {
  position: relative;
  min-height: 212px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(7, 18, 45, 0.62);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.companion-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.2), transparent 42%),
    radial-gradient(circle at 86% 18%, var(--card-glow), transparent 34%);
  opacity: 0.78;
  pointer-events: none;
}

.companion-card::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent), transparent);
  opacity: 0.82;
}

.companion-card:hover,
.companion-card:focus-within {
  transform: translateY(-6px);
  border-color: var(--card-border);
  box-shadow:
    0 28px 96px rgba(0, 0, 0, 0.34),
    0 0 64px var(--card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.companion-card--emperor {
  --card-accent: rgba(246, 207, 120, 0.96);
  --card-border: rgba(255, 238, 176, 0.72);
  --card-glow: rgba(246, 207, 120, 0.34);
  --card-shadow: rgba(246, 207, 120, 0.24);
}

.companion-card--heaven {
  --card-accent: rgba(108, 228, 255, 0.96);
  --card-border: rgba(108, 228, 255, 0.58);
  --card-glow: rgba(66, 165, 255, 0.34);
  --card-shadow: rgba(66, 165, 255, 0.24);
}

.companion-card--king {
  --card-accent: rgba(70, 215, 171, 0.96);
  --card-border: rgba(70, 215, 171, 0.56);
  --card-glow: rgba(31, 196, 155, 0.3);
  --card-shadow: rgba(31, 196, 155, 0.22);
}

.companion-card__halo {
  position: absolute;
  right: -34px;
  top: -38px;
  width: 132px;
  height: 132px;
  border: 1px solid var(--card-accent);
  border-radius: 50%;
  opacity: 0.24;
  box-shadow: inset 0 0 34px var(--card-shadow);
}

.companion-card__avatar {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  color: #07142d;
  background:
    linear-gradient(135deg, #ffffff, var(--card-accent)),
    #ffffff;
  box-shadow:
    0 16px 42px var(--card-shadow),
    inset 0 0 22px rgba(255, 255, 255, 0.55);
  font-family:
    "Songti SC",
    "STSong",
    "Noto Serif CJK SC",
    serif;
  font-size: 2.1rem;
  font-weight: 900;
}

.companion-card__avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.companion-card__body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.companion-card__level {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: #fff6ce;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.companion-card h3 {
  margin: 12px 0 0;
  color: #ffffff;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.15;
  font-weight: 900;
}

.companion-card p {
  margin: 10px 0 0;
  color: rgba(234, 243, 255, 0.76);
  font-size: 0.95rem;
}

.companion-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.companion-card__tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.1);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.companion-card__stats {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 0;
}

.companion-card__stats div {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  padding: 10px 12px;
}

.companion-card__stats dt,
.companion-card__stats dd {
  margin: 0;
}

.companion-card__stats dt {
  color: rgba(234, 243, 255, 0.62);
  font-size: 0.75rem;
  font-weight: 800;
}

.companion-card__stats dd {
  color: #ffffff;
  font-size: 1.04rem;
  font-weight: 900;
}

body[data-active-rank="emperor"] .pilgrim-guide {
  opacity: 0;
  filter: drop-shadow(0 0 22px rgba(246, 207, 120, 0.72));
}

body[data-active-rank="intro"] .pilgrim-guide,
body[data-active-rank="intro"] .stair-axis {
  opacity: 0;
}

body[data-active-rank="heaven"] .pilgrim-guide {
  opacity: 1;
  filter: drop-shadow(0 0 22px rgba(66, 165, 255, 0.72));
}

body[data-active-rank="king"] .pilgrim-guide {
  opacity: 1;
  filter: drop-shadow(0 0 22px rgba(31, 196, 155, 0.72));
}

.rank-rule-section {
  position: relative;
  min-height: 92dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 120px 24px;
}

.rule-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.rank-rule-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 26%, rgba(246, 207, 120, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(4, 10, 24, 0.7), rgba(4, 10, 24, 0.42), rgba(4, 10, 24, 0.86));
}

.rule-card {
  position: relative;
  width: min(880px, 100%);
  border-radius: 36px;
  padding: clamp(30px, 5vw, 62px);
  overflow: hidden;
  text-align: center;
}

.rank-flow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
}

.rank-flow span {
  min-width: 86px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(246, 207, 120, 0.54);
  border-radius: 999px;
  color: #07142d;
  background: linear-gradient(135deg, #ffffff, #fff0ae 42%, #6ce4ff);
  font-family:
    "Songti SC",
    "STSong",
    "Noto Serif CJK SC",
    serif;
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: 0 14px 44px rgba(246, 207, 120, 0.18);
}

.rank-flow i {
  width: 52px;
  height: 1px;
  display: block;
  background: linear-gradient(90deg, transparent, rgba(246, 207, 120, 0.92), transparent);
}

.hall-footer {
  position: relative;
  padding: 46px 24px 58px;
  background: #061126;
}

.footer-glass {
  position: relative;
  width: min(1240px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 28px;
  padding: 26px;
  overflow: hidden;
}

.footer-glass strong {
  display: block;
  font-size: 1.25rem;
}

.footer-glass p,
.footer-glass span,
.footer-glass a {
  margin: 4px 0 0;
  color: var(--muted);
}

.footer-glass a:hover,
.footer-glass a:focus-visible {
  color: var(--gold);
}

.footer-glass > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
}

.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition:
    opacity 640ms ease,
    transform 640ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes mistFlow {
  from { transform: translate3d(-2%, var(--mist-offset), 0); }
  to { transform: translate3d(4%, calc(var(--mist-offset) - 18px), 0); }
}

@keyframes starPulse {
  0%, 100% { opacity: 0.36; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes starDrift {
  from { transform: translate3d(0, calc(var(--scroll-depth) * -46px), 0); }
  to { transform: translate3d(-42px, calc(var(--scroll-depth) * -46px - 28px), 0); }
}

@keyframes nebulaBreathe {
  from { transform: scale(0.96) rotate(-4deg); }
  to { transform: scale(1.06) rotate(5deg); }
}

@keyframes introOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes flameGlow {
  0%, 100% { opacity: 0.54; transform: translateY(0.08em) scale(1.01); }
  36% { opacity: 0.94; transform: translateY(0.02em) scale(1.035); }
  68% { opacity: 0.68; transform: translateY(0.11em) scale(0.995); }
}

@keyframes flameFlicker {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  40% { opacity: 0.82; transform: translateY(-0.025em) scaleY(1.04); }
  72% { opacity: 0.58; transform: translateY(0.02em) scaleX(1.01); }
}

@keyframes emberRise {
  0% { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.58); }
  14% { opacity: 1; }
  72% { opacity: 0.72; }
  100% { opacity: 0; transform: translate3d(var(--ember-drift, 12px), -1.35em, 0) scale(0.18); }
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes glassSweep {
  0%, 28% { transform: translateX(-130%); }
  46%, 100% { transform: translateX(130%); }
}

@keyframes sealFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes guideFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -8px, 0) scale(1.04); }
}

@keyframes guideSpin {
  from { transform: rotate(0deg) scaleX(1.08); }
  to { transform: rotate(360deg) scaleX(1.08); }
}

@keyframes sparkDrift {
  0%, 100% { opacity: 0.38; transform: translate3d(0, 0, 0) scale(0.72); }
  50% { opacity: 1; transform: translate3d(8px, -10px, 0) scale(1); }
}

@media (max-width: 1120px) {
  .hall-hero,
  .level-scene {
    grid-template-columns: 1fr;
  }

  .hero-content,
  .rank-stage-copy,
  .rank-panel {
    justify-self: center;
  }

  .rank-panel {
    align-self: center;
  }

  .companion-rank-showcase {
    width: min(760px, 100%);
    grid-template-columns: 1fr;
  }

  .stair-axis {
    width: 42vw;
    opacity: 0.54;
  }
}

@media (max-width: 840px) {
  .hall-header {
    top: 12px;
    padding: 0 14px;
  }

  .hall-nav {
    min-height: 66px;
    border-radius: 28px;
    padding: 9px;
  }

  .hall-brand {
    padding-left: 8px;
  }

  .hall-nav-toggle {
    display: grid;
  }

  .hall-links {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 76px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    border: 1px solid rgba(246, 207, 120, 0.44);
    border-radius: 28px;
    background: rgba(8, 18, 39, 0.84);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    padding: 12px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .hall-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hall-links a {
    justify-content: flex-start;
    padding: 0 18px;
  }

  .rank-scene,
  .hall-intro {
    min-height: auto;
    padding: 118px 18px 74px;
  }

  .hall-intro,
  .hall-hero,
  .heaven-king-scene,
  .king-scene {
    min-height: 100dvh;
  }

  .pilgrim-guide {
    width: 84px;
    height: 84px;
  }

  .stair-axis {
    width: 58vw;
  }

  .scene-media img {
    object-position: center;
  }

  .hero-content,
  .rank-stage-copy,
  .rank-panel,
  .companion-card,
  .rule-card {
    border-radius: 26px;
  }
}

@media (max-width: 620px) {
  .hall-brand strong {
    font-size: 1rem;
  }

  .hall-brand small {
    font-size: 0.62rem;
  }

  .hero-content h1 {
    font-size: clamp(2.75rem, 14vw, 4.2rem);
  }

  .title-embers {
    inset-inline: -2%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hall-btn {
    width: 100%;
  }

  .rank-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .companion-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 20px;
    text-align: center;
  }

  .companion-card__avatar {
    justify-self: center;
  }

  .companion-card__tags {
    justify-content: center;
  }

  .rank-seal {
    justify-self: center;
  }

  .rank-flow {
    flex-direction: column;
  }

  .rank-flow i {
    width: 1px;
    height: 34px;
  }

  .footer-glass {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-glass > div:last-child {
    justify-content: flex-start;
  }

  .pilgrim-guide,
  .stair-axis {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hall-three-canvas {
    display: none;
  }
}
