:root {
  --ink: #05090b;
  --deep: #091215;
  --panel: rgba(8, 16, 18, 0.92);
  --teal: #173d3d;
  --cyan: #5ba9a0;
  --paper: #e2d5b2;
  --paper-dim: #aa9d7d;
  --gold: #d2a44d;
  --gold-bright: #f1cb75;
  --red: #963f32;
  --green: #4e8873;
  --blue: #526eae;
  --line: rgba(202, 165, 86, 0.36);
  --parallax-x: 0px;
  --parallax-y: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 5px;
}

button:disabled {
  cursor: not-allowed;
}

.is-hidden {
  display: none !important;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: soft-light;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, transparent 0 1px, rgba(255, 255, 255, 0.15) 1px 2px, transparent 2px 5px),
    repeating-linear-gradient(95deg, transparent 0 4px, rgba(255, 255, 255, 0.035) 4px 5px);
  background-size: 9px 9px, 17px 13px;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(31, 77, 73, 0.24), transparent 28%),
    #05090b;
  text-align: center;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.preloader.is-ready {
  opacity: 0;
  visibility: hidden;
}

.preloader p {
  margin: 25px 0 5px;
  color: #d8c69b;
  font-family: "STKaiti", "KaiTi", Georgia, serif;
  font-size: 20px;
}

.preloader > span {
  color: #60736c;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.35em;
}

.preloader-sigil {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto;
}

.preloader-sigil i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(210, 164, 77, 0.65);
  border-radius: 50%;
  animation: spin 3.2s linear infinite;
}

.preloader-sigil i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 13px var(--gold);
}

.preloader-sigil i:nth-child(2) {
  inset: 13px;
  border-color: rgba(83, 151, 139, 0.75);
  animation-direction: reverse;
  animation-duration: 2.5s;
}

.preloader-sigil i:nth-child(3) {
  inset: 29px;
  border-color: rgba(164, 70, 53, 0.8);
  animation-duration: 1.7s;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Intro */

.intro-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #071012;
}

.intro-background {
  position: absolute;
  inset: -2%;
  background:
    linear-gradient(90deg, rgba(3, 7, 9, 0.98) 0%, rgba(4, 9, 11, 0.92) 36%, rgba(4, 9, 11, 0.38) 64%, rgba(4, 9, 11, 0.82) 100%),
    linear-gradient(0deg, rgba(3, 6, 8, 0.9), transparent 56%),
    url("scene-investigation.png") center / cover no-repeat;
  filter: saturate(0.78) contrast(1.08);
  transform: scale(1.04);
  animation: intro-drift 18s ease-in-out infinite alternate;
}

@keyframes intro-drift {
  to {
    transform: scale(1.075) translateX(-0.8%);
  }
}

.intro-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0 49.7%, rgba(220, 174, 79, 0.12) 49.9% 50%, transparent 50.2%),
    radial-gradient(ellipse at 72% 47%, rgba(46, 109, 101, 0.18), transparent 39%);
}

.intro-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px clamp(28px, 4vw, 74px);
  border-bottom: 1px solid rgba(200, 164, 83, 0.16);
}

.intro-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.intro-brand > img {
  width: 188px;
  height: 52px;
  padding: 7px 10px;
  border-radius: 3px 12px 3px 10px;
  background: rgba(246, 246, 242, 0.92);
  object-fit: contain;
  filter: saturate(0.88) contrast(1.04);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wordmark span {
  padding: 5px 8px;
  border: 1px solid #8b6b34;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  transform: rotate(-2deg);
}

.wordmark strong {
  color: #cdbc93;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
  letter-spacing: 0.1em;
}

.intro-header > p {
  margin: 0;
  color: #6d8179;
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.28em;
}

.intro-layout {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: calc(100vh - 78px);
  grid-template-columns: minmax(390px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 78px);
  padding: 5vh clamp(28px, 4vw, 78px) 7vh;
}

.intro-story {
  max-width: 650px;
}

.kicker,
.modal-kicker {
  margin: 0;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.intro-story h1 {
  margin: 18px 0 24px;
  color: #eddfba;
  font-family: "STKaiti", "KaiTi", Georgia, serif;
  font-size: clamp(60px, 5.9vw, 116px);
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 0.78;
  text-shadow: 0 16px 42px #000, 3px 3px 0 rgba(128, 50, 38, 0.8);
}

.intro-lead {
  margin: 0 0 10px;
  color: #adc1b8;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(20px, 1.8vw, 30px);
}

.intro-body {
  max-width: 620px;
  margin: 0 0 28px;
  color: #9daaa4;
  font-size: 14px;
  line-height: 1.9;
}

.intro-actions,
.finale-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.action-primary {
  position: relative;
  display: grid;
  min-width: 260px;
  padding: 13px 54px 13px 19px;
  overflow: hidden;
  border: 1px solid #b8883d;
  border-radius: 3px 16px 4px 12px;
  background:
    linear-gradient(135deg, rgba(135, 57, 41, 0.98), rgba(54, 26, 24, 0.98));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(255, 213, 120, 0.08);
  cursor: pointer;
  text-align: left;
  transform: rotate(-0.4deg);
  transition: transform 0.22s ease, filter 0.22s ease, border-color 0.22s ease;
}

.action-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 224, 157, 0.12) 48%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.action-primary:hover {
  border-color: #efc767;
  filter: brightness(1.12);
  transform: rotate(0) translateY(-3px);
}

.action-primary:hover::before {
  transform: translateX(120%);
}

.action-primary span,
.action-primary strong {
  position: relative;
  z-index: 2;
  display: block;
}

.action-primary span {
  color: #c99b5a;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.action-primary strong {
  margin-top: 2px;
  color: #f1e1b9;
  font-size: 18px;
}

.action-primary > i {
  position: absolute;
  z-index: 2;
  right: 18px;
  top: 50%;
  color: #f0c96f;
  font-size: 28px;
  font-style: normal;
  transform: translateY(-50%);
}

.action-ghost {
  padding: 12px 17px;
  border: 1px solid #4c655f;
  border-radius: 4px 12px 4px 9px;
  background: rgba(8, 18, 20, 0.82);
  color: #a5b5ae;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.action-ghost:hover {
  border-color: #b48942;
  color: #e6d5ad;
  transform: translateY(-2px);
}

.intro-note {
  max-width: 560px;
  margin: 16px 0 0;
  color: #657770;
  font-size: 10px;
  line-height: 1.65;
  font-family: Georgia, "Microsoft YaHei", serif;
  letter-spacing: 0.08em;
}

.intro-note a {
  color: #8da8a0;
  text-decoration-color: rgba(141, 168, 160, 0.34);
  text-underline-offset: 3px;
}

.intro-note a:hover {
  color: #d0b77c;
}

.film-frame {
  position: relative;
  justify-self: end;
  width: min(100%, 1040px);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(191, 150, 72, 0.48);
  border-radius: 45% 45% 8px 8px / 15% 15% 8px 8px;
  background: rgba(3, 8, 10, 0.88);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.68), inset 0 0 0 8px rgba(17, 29, 31, 0.92), inset 0 0 60px #000;
  overflow: hidden;
  transform: perspective(1200px) rotateY(-3deg) rotate(0.2deg);
}

.film-frame::before {
  content: "";
  position: absolute;
  z-index: 7;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(111, 144, 133, 0.32);
  border-radius: inherit;
}

.film-frame video {
  position: absolute;
  z-index: 5;
  inset: 2.5%;
  width: 95%;
  height: 95%;
  border-radius: inherit;
  background: #020405;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.film-frame.has-video video {
  opacity: 1;
  pointer-events: auto;
}

.film-frame.has-video .film-fallback {
  opacity: 0;
  pointer-events: none;
}

.film-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 15, 17, 0.1), rgba(4, 8, 10, 0.82)),
    url("scene-investigation.png") center / cover no-repeat;
  transition: opacity 0.35s ease;
}

.film-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 46%, transparent 0 18%, rgba(2, 5, 7, 0.65) 72%);
}

.film-fallback img {
  position: relative;
  z-index: 2;
  width: 36%;
  filter: drop-shadow(0 22px 24px rgba(0, 0, 0, 0.88));
  animation: character-float 4.5s ease-in-out infinite;
}

@keyframes character-float {
  50% {
    transform: translateY(-8px) rotate(0.8deg);
  }
}

.film-moon {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 39%;
  aspect-ratio: 1;
  border: 1px solid rgba(211, 174, 88, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(54, 126, 115, 0.18), inset 0 0 70px rgba(202, 156, 67, 0.08);
  transform: translate(-50%, -50%);
}

.film-status {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 8%;
  min-width: 220px;
  padding: 8px 13px;
  border: 1px solid rgba(187, 149, 73, 0.42);
  border-radius: 3px 11px 3px 8px;
  background: rgba(4, 10, 12, 0.9);
  text-align: center;
  transform: translateX(-50%) rotate(-0.5deg);
}

.film-status span,
.film-status strong {
  display: block;
}

.film-status span {
  color: #6d827a;
  font-size: 9px;
  letter-spacing: 0.2em;
}

.film-status strong {
  margin-top: 2px;
  color: #cab98e;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 17px;
}

.film-number {
  position: absolute;
  z-index: 8;
  right: 18px;
  top: 17px;
  color: rgba(231, 205, 144, 0.55);
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.frame-corners i {
  position: absolute;
  z-index: 9;
  width: 35px;
  height: 35px;
  border-color: #c29949;
  opacity: 0.6;
}

.frame-corners i:nth-child(1) { left: 10px; top: 10px; border-left: 2px solid; border-top: 2px solid; }
.frame-corners i:nth-child(2) { right: 10px; top: 10px; border-right: 2px solid; border-top: 2px solid; }
.frame-corners i:nth-child(3) { left: 10px; bottom: 10px; border-left: 2px solid; border-bottom: 2px solid; }
.frame-corners i:nth-child(4) { right: 10px; bottom: 10px; border-right: 2px solid; border-bottom: 2px solid; }

/* Game shell and HUD */

.game-root {
  position: relative;
  display: grid;
  width: 100vw;
  height: 100vh;
  grid-template-rows: 78px minmax(0, 1fr) 58px;
  overflow: hidden;
  background: #05090b;
}

.hud {
  position: relative;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  padding: 8px clamp(18px, 2.8vw, 52px);
  border-bottom: 1px solid #4e412d;
  background:
    linear-gradient(180deg, rgba(16, 26, 29, 0.98), rgba(7, 13, 15, 0.99)),
    repeating-linear-gradient(90deg, transparent 0 40px, rgba(255, 255, 255, 0.015) 40px 41px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.46);
}

.hud-case span,
.hud-case strong {
  display: block;
}

.hud-case span {
  color: #8e6d36;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.24em;
}

.hud-case strong {
  margin-top: 2px;
  color: #decfa9;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 22px;
}

.chapter-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chapter-nav > b {
  width: clamp(28px, 3vw, 58px);
  height: 1px;
  overflow: hidden;
  background: #35413d;
}

.chapter-step {
  display: grid;
  grid-template-columns: 30px auto;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.chapter-step i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #50635d;
  border-radius: 50% 45% 49% 43%;
  color: #71847d;
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: normal;
  transform: rotate(-3deg);
}

.chapter-step span {
  color: #74877f;
  font-size: 10px;
}

.chapter-step.is-current i {
  border-color: var(--gold);
  background: #55291f;
  color: #f0cf7f;
  box-shadow: 0 0 20px rgba(205, 157, 69, 0.2);
}

.chapter-step.is-current span {
  color: #d5c39b;
}

.chapter-step.is-complete i {
  border-color: #5d8d7d;
  background: #183c36;
  color: #c0dacd;
}

.chapter-step.is-locked {
  opacity: 0.36;
}

.player-card {
  justify-self: end;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  padding: 3px 45px 3px 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.player-portrait {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #98743a;
  border-radius: 50% 45% 49% 42%;
  background: #102326;
}

.player-portrait img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.player-copy small,
.player-copy strong {
  display: block;
}

.player-copy small {
  color: #73877f;
  font-size: 9px;
}

.player-copy strong {
  margin-top: 3px;
  color: #d7c69c;
  font-size: 13px;
}

.level-ring {
  position: absolute;
  right: 3px;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #152023;
  transform: translateY(-50%);
}

.level-ring i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(var(--gold) var(--level-progress, 4%), #263432 0);
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 58%);
  mask: radial-gradient(circle, transparent 56%, #000 58%);
}

/* Scenes */

.stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #05090b;
}

.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.scene.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.scene-art {
  position: absolute;
  inset: -18px;
  background-position: center;
  background-size: cover;
  filter: saturate(0.9) contrast(1.04) brightness(0.86);
  transform: translate(var(--parallax-x), var(--parallax-y)) scale(1.025);
  transition: transform 0.2s ease-out;
}

.scene-investigation .scene-art {
  background-image: url("scene-investigation.png");
}

.scene-vault .scene-art {
  background-image: url("scene-vault.png");
}

.scene-training .scene-art {
  background-image: url("scene-training.png");
  filter: saturate(0.98) contrast(1.03) brightness(0.9);
}

.scene-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 8, 10, 0.45), transparent 24%, transparent 72%, rgba(3, 6, 8, 0.8)),
    radial-gradient(ellipse at 50% 48%, transparent 32%, rgba(2, 5, 7, 0.25) 74%, rgba(2, 5, 7, 0.68) 100%);
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(157, 200, 190, 0.22) 3px 4px);
}

.scene-caption {
  position: absolute;
  z-index: 14;
  left: 2.8%;
  top: 3.5%;
  max-width: 470px;
  padding: 13px 17px 14px 15px;
  border-left: 3px solid #a36f34;
  background: linear-gradient(90deg, rgba(5, 10, 12, 0.88), rgba(5, 10, 12, 0.42), transparent);
  text-shadow: 0 2px 10px #000;
}

.scene-caption span,
.scene-caption strong {
  display: block;
}

.scene-caption span {
  color: #b88b43;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.26em;
}

.scene-caption strong {
  margin: 3px 0;
  color: #e8d8b0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(20px, 2vw, 30px);
}

.scene-caption p {
  margin: 0;
  color: #899a93;
  font-size: 10px;
  line-height: 1.5;
}

.scene-caption-dark {
  border-left-color: #983f31;
}

.scene-caption-training {
  border-left-color: #4f8c7d;
}

/* Investigation hotspots */

.world-hotspot,
.training-station,
.vault-hotspot,
.gold-key,
.vault-chest,
.training-exit,
.growth-core,
.lab-door {
  position: absolute;
  z-index: 20;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.clue-spot {
  width: 154px;
  height: 72px;
}

.spot-market { left: 6%; top: 54%; }
.spot-sales { left: 27%; top: 37%; }
.spot-factory { left: 53%; top: 43%; }
.spot-application { left: 72%; top: 57%; }

.spot-core {
  position: absolute;
  left: 8px;
  top: 20px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #c19043;
  border-radius: 50% 44% 50% 42%;
  background: rgba(61, 28, 23, 0.9);
  box-shadow: 0 0 18px rgba(214, 165, 69, 0.15);
  transform: rotate(45deg);
  transition: transform 0.25s ease, background 0.25s ease;
}

.spot-core::before,
.spot-core::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(206, 158, 66, 0.38);
  border-radius: 50%;
  animation: pulse-ring 2.4s ease-out infinite;
}

.spot-core::after {
  animation-delay: 1.2s;
}

.spot-core i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0ca70;
  box-shadow: 0 0 12px #e5b957;
}

@keyframes pulse-ring {
  0% { opacity: 0.85; transform: scale(0.65); }
  80%, 100% { opacity: 0; transform: scale(1.7); }
}

.spot-label {
  position: absolute;
  left: 50px;
  top: 11px;
  min-width: 104px;
  padding: 7px 10px;
  border: 1px solid rgba(177, 139, 67, 0.4);
  border-radius: 3px 11px 3px 8px;
  background: rgba(5, 11, 13, 0.86);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.42);
  text-align: left;
  opacity: 0.12;
  transform: translateX(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.clue-spot:hover .spot-label,
.clue-spot:focus-visible .spot-label,
.hints-on .clue-spot .spot-label {
  opacity: 1;
  transform: translateX(0);
}

.clue-spot:hover .spot-core,
.clue-spot:focus-visible .spot-core {
  background: rgba(117, 52, 36, 0.95);
  transform: rotate(90deg) scale(1.08);
}

.spot-label small,
.spot-label strong {
  display: block;
  white-space: nowrap;
}

.spot-label small {
  color: #7f918a;
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.14em;
}

.spot-label strong {
  margin-top: 2px;
  color: #decda5;
  font-size: 12px;
}

.clue-spot.is-found .spot-core {
  border-color: #5b927f;
  background: #183f37;
}

.clue-spot.is-found .spot-core i {
  background: #b9d7ca;
  box-shadow: 0 0 12px #6daf99;
}

.clue-spot.is-found .spot-core::before,
.clue-spot.is-found .spot-core::after {
  display: none;
}

.clue-spot.is-found .spot-label {
  border-color: rgba(83, 139, 119, 0.52);
}

.clue-spot.is-found .spot-label small::after {
  content: " · 已归档";
  color: #7fb09d;
}

.lab-door {
  right: 0;
  top: 13%;
  width: 15.5%;
  height: 72%;
  cursor: not-allowed;
}

.door-scan {
  position: absolute;
  inset: 3% 18% 3% 24%;
  border: 1px solid rgba(122, 73, 48, 0.2);
  border-radius: 45% 45% 6px 6px / 14% 14% 6px 6px;
  opacity: 0.2;
  transition: opacity 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.door-lock {
  position: absolute;
  left: 0;
  top: 50%;
  min-width: 125px;
  padding: 9px 12px 9px 38px;
  border: 1px solid rgba(117, 75, 47, 0.5);
  border-radius: 18px 4px 15px 5px;
  background: rgba(7, 11, 12, 0.9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  text-align: left;
  transform: translate(-45%, -50%) rotate(-1deg);
}

.door-lock i {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 17px;
  height: 14px;
  border: 2px solid #76533d;
  border-radius: 2px;
  transform: translateY(-20%);
}

.door-lock i::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -10px;
  width: 9px;
  height: 10px;
  border: 2px solid #76533d;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.door-lock strong,
.door-lock small {
  display: block;
  white-space: nowrap;
}

.door-lock strong {
  color: #a7855e;
  font-size: 11px;
}

.door-lock small {
  margin-top: 2px;
  color: #705e4c;
  font-size: 8px;
}

.lab-door.is-ready {
  cursor: pointer;
}

.lab-door.is-ready .door-scan {
  border-color: rgba(219, 170, 72, 0.75);
  box-shadow: 0 0 45px rgba(208, 153, 59, 0.2), inset 0 0 35px rgba(215, 160, 61, 0.08);
  opacity: 1;
  animation: door-breathe 1.8s ease-in-out infinite alternate;
}

@keyframes door-breathe {
  to { box-shadow: 0 0 80px rgba(218, 164, 60, 0.38), inset 0 0 48px rgba(215, 160, 61, 0.14); }
}

.lab-door.is-ready .door-lock {
  border-color: #bd8d3c;
  background: rgba(67, 31, 23, 0.92);
}

.lab-door.is-ready .door-lock i,
.lab-door.is-ready .door-lock i::before {
  border-color: #e3bd65;
}

.lab-door.is-ready .door-lock i::before {
  transform: translateX(6px) rotate(34deg);
  transform-origin: left bottom;
}

.lab-door.is-ready .door-lock strong {
  color: #f0cf84;
}

.lab-door.is-ready .door-lock small {
  color: #bd9c65;
}

.player-sprite {
  position: absolute;
  z-index: 16;
  width: 150px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
  text-align: center;
}

.player-investigation { left: 45%; bottom: 6%; }
.player-vault { right: 10%; bottom: 5%; }
.player-training {
  left: 53.25%;
  bottom: 3.7%;
  z-index: 28;
  width: 260px;
  pointer-events: auto;
  cursor: pointer;
  transform: translateX(-50%);
}

.player-sprite img {
  position: relative;
  z-index: 2;
  width: 126px;
  height: 126px;
  object-fit: contain;
  filter: drop-shadow(0 17px 15px rgba(0, 0, 0, 0.8));
  animation: character-float 4.2s ease-in-out infinite;
}

.player-sprite small {
  position: relative;
  z-index: 3;
  display: inline-block;
  margin-top: -15px;
  padding: 4px 10px;
  border: 1px solid #765e36;
  border-radius: 3px 9px 3px 7px;
  background: rgba(5, 11, 13, 0.9);
  color: #bfae86;
  font-size: 9px;
  transform: rotate(-1deg);
}

.sprite-shadow {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 105px;
  height: 25px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  filter: blur(8px);
  transform: translateX(-50%);
}

.growth-body {
  position: relative;
  z-index: 3;
  display: block;
  width: 180px;
  height: 164px;
  margin: 0 auto;
  transform-origin: 50% 88%;
  transition: transform 0.45s cubic-bezier(0.2, 0.85, 0.2, 1), filter 0.45s ease;
}

.growth-body > .character-form {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0;
  object-fit: contain;
  transform-origin: 50% 88%;
  will-change: transform, opacity, filter;
  animation: none;
}

.form-base {
  width: 126px !important;
  height: 126px !important;
  transform: translateX(-50%);
}

.form-evolved {
  width: 225px !important;
  height: auto !important;
  opacity: 0;
  transform: translateX(-50%) translateY(18px) scale(0.38);
  filter: brightness(3) saturate(0.35) drop-shadow(0 0 12px rgba(255, 233, 155, 0));
  animation: none;
}

.player-training:hover .growth-body,
.player-training:focus-visible .growth-body {
  transform: translateY(-4px) scale(1.04);
  filter: brightness(1.08);
}

.evolution-energy {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 12px;
  width: 205px;
  height: 205px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) scale(0.25);
}

.evolution-energy::before,
.evolution-energy::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.evolution-energy::before {
  border: 3px solid rgba(255, 225, 128, 0.92);
  box-shadow: 0 0 22px #f0b741, inset 0 0 28px rgba(255, 228, 139, 0.48);
}

.evolution-energy::after {
  inset: 20px;
  border: 1px solid rgba(255, 251, 218, 0.86);
  box-shadow: 0 0 54px 16px rgba(226, 161, 52, 0.56);
}

.evolution-energy > i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 260px;
  height: 6px;
  border-radius: 100%;
  background: linear-gradient(90deg, transparent, #fff1a4 24%, #fff 50%, #fff1a4 76%, transparent);
  box-shadow: 0 0 14px #e9a936;
  transform-origin: center;
}

.evolution-energy > i:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg); }
.evolution-energy > i:nth-child(2) { transform: translate(-50%, -50%) rotate(60deg); }
.evolution-energy > i:nth-child(3) { transform: translate(-50%, -50%) rotate(120deg); }

.player-training.is-grown .growth-body {
  transform: translateY(-30px);
  filter: drop-shadow(0 0 20px rgba(237, 190, 83, 0.42)) brightness(1.05);
}

.player-training.is-grown .form-base { opacity: 0; }

.player-training.is-grown .form-evolved {
  opacity: 1;
  transform: translateX(-50%) translateY(4px) scale(1);
  filter: brightness(1.03) saturate(1.04) drop-shadow(0 15px 13px rgba(0, 0, 0, 0.74)) drop-shadow(0 0 18px rgba(234, 178, 66, 0.35));
}

.player-training.is-grown .sprite-shadow {
  width: 172px;
  height: 31px;
  background: rgba(0, 0, 0, 0.76);
  box-shadow: 0 0 25px rgba(228, 170, 59, 0.22);
}

.evolution-banner {
  position: absolute;
  z-index: 21;
  left: 50%;
  top: -108px;
  width: 320px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.5);
}

.evolution-banner strong,
.evolution-banner b {
  display: block;
  text-align: center;
  text-shadow: 0 0 15px #d99d36, 0 5px 12px #000;
}

.evolution-banner strong {
  color: #fff1b0;
  font-family: Georgia, "Microsoft YaHei", serif;
  font-size: 32px;
  font-style: italic;
  letter-spacing: 0.18em;
  -webkit-text-stroke: 1px #7c4127;
}

.evolution-banner b {
  margin-top: 5px;
  color: #e8bf68;
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.28em;
}

.skill-flames {
  position: absolute;
  z-index: 7;
  inset: -8px -8px 18px;
  pointer-events: none;
}

.skill-flames > i {
  --flame-color: #d6a84d;
  position: absolute;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--flame-color) 80%, #f9e6a8);
  border-radius: 66% 34% 64% 36% / 70% 40% 60% 30%;
  background:
    radial-gradient(circle at 42% 48%, #f7e6af 0 12%, var(--flame-color) 15% 42%, transparent 46%),
    color-mix(in srgb, var(--flame-color) 24%, rgba(7, 13, 17, 0.84));
  box-shadow: 0 0 22px color-mix(in srgb, var(--flame-color) 58%, transparent);
  font-style: normal;
  opacity: 0;
  transform: scale(0.2) rotate(45deg);
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.15, 1.45, 0.35, 1);
}

.skill-flames > i::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid color-mix(in srgb, var(--flame-color) 42%, transparent);
  border-radius: 50%;
  animation: earned-orbit 3.5s linear infinite;
}

.skill-flames > i b {
  color: #fff0c2;
  font-family: Georgia, serif;
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 4px #000;
  transform: rotate(-45deg);
}

.skill-flames > i.is-earned {
  opacity: 0.92;
  transform: scale(1) rotate(45deg);
  animation: flame-hover 2.4s ease-in-out infinite alternate;
}

.skill-flames > i.is-new {
  animation: new-flame-burst 1.4s cubic-bezier(0.15, 1.2, 0.35, 1);
}

.flame-literature { --flame-color: #d6a84d !important; left: 3px; top: 8px; }
.flame-experiment { --flame-color: #55b7ae !important; right: 1px; top: 7px; }
.flame-customer { --flame-color: #6d86d8 !important; left: -6px; bottom: 24px; }
.flame-internal { --flame-color: #bd5848 !important; right: -7px; bottom: 23px; }

@keyframes earned-orbit { to { transform: rotate(360deg); } }
@keyframes flame-hover { to { translate: 0 -7px; filter: brightness(1.22); } }
@keyframes new-flame-burst {
  0% { opacity: 0; transform: scale(0.05) rotate(-120deg); }
  35% { opacity: 1; transform: scale(1.75) rotate(65deg); filter: brightness(1.8); }
  62% { transform: scale(0.82) rotate(36deg); }
  100% { opacity: 1; transform: scale(1) rotate(45deg); }
}

.level-up-burst {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: -45px;
  min-width: 125px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.2) rotate(-8deg);
}

.level-up-burst strong,
.level-up-burst b {
  display: block;
  font-family: Georgia, serif;
  line-height: 1;
  text-align: center;
}

.level-up-burst strong {
  color: #fff1b2;
  font-size: 44px;
  font-style: italic;
  letter-spacing: -0.05em;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--level-color, #d6a84d) 70%, #63351f);
  text-shadow: 0 0 12px var(--level-color, #d6a84d), 0 7px 0 #562f25, 0 11px 20px #000;
}

.level-up-burst b {
  margin-top: 5px;
  color: #f4d98c;
  font-size: 13px;
  letter-spacing: 0.24em;
}

.player-training.is-leveling {
  z-index: 95;
}

.player-training.is-leveling .level-up-burst {
  animation: level-up-pop 1.75s cubic-bezier(0.15, 1.2, 0.35, 1) both;
}

.player-training.is-leveling .growth-body {
  animation: level-body-bounce 1.55s cubic-bezier(0.15, 1.2, 0.35, 1);
}

@keyframes level-up-pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(28px) scale(0.15) rotate(-20deg); }
  22% { opacity: 1; transform: translateX(-50%) translateY(-8px) scale(1.35) rotate(5deg); }
  42% { transform: translateX(-50%) translateY(0) scale(0.96) rotate(-4deg); }
  72% { opacity: 1; transform: translateX(-50%) translateY(-5px) scale(1.04) rotate(-2deg); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-42px) scale(1.08) rotate(-2deg); }
}

@keyframes level-body-bounce {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  20% { transform: translateY(10px) scaleX(1.08) scaleY(0.9); }
  43% { transform: translateY(-28px) scaleX(1.16) scaleY(1.16); filter: brightness(1.75) drop-shadow(0 0 28px var(--level-color, #d6a84d)); }
  70% { transform: translateY(-4px) scale(0.98); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

.player-training.is-ready::before,
.player-training.is-ready::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 47%;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(235, 189, 84, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 35px rgba(222, 168, 62, 0.28);
  transform: translate(-50%, -50%);
  animation: growth-ready-ring 1.8s ease-out infinite;
}

.player-training.is-ready::after { animation-delay: 0.85s; }

@keyframes growth-ready-ring {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.55); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

.player-training.is-ready #training-player-label {
  border-color: #d4a345;
  background: rgba(78, 42, 20, 0.94);
  color: #f1d280;
  box-shadow: 0 0 22px rgba(219, 165, 64, 0.28);
}

.player-training.is-transforming {
  z-index: 110;
  pointer-events: none;
}

.player-training.is-transforming::after {
  content: "LV.4  ·  GROWTH COMPLETE";
  position: absolute;
  z-index: 20;
  left: 50%;
  top: -154px;
  width: 260px;
  color: #fff0ae;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  text-shadow: 0 0 14px #e1a83f, 0 4px 10px #000;
  transform: translateX(-50%);
  animation: growth-complete-title 4.45s ease both;
}

.player-training.is-transforming .growth-body {
  animation: evolution-body-stage 3.85s cubic-bezier(0.16, 0.95, 0.25, 1) forwards;
}

.player-training.is-transforming .form-base {
  animation: base-form-transform 2.2s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

.player-training.is-transforming .form-evolved {
  animation: evolved-form-reveal 3.85s cubic-bezier(0.12, 0.95, 0.24, 1.16) forwards;
}

.player-training.is-transforming .evolution-energy {
  animation: evolution-energy-burst 3.2s ease-out forwards;
}

.player-training.is-transforming .evolution-energy::before {
  animation: evolution-ring-spin 0.65s linear infinite;
}

.player-training.is-transforming .evolution-energy::after {
  animation: evolution-ring-spin-reverse 0.9s linear infinite;
}

.player-training.is-transforming .evolution-banner {
  animation: evolution-banner-pop 3.7s 0.55s cubic-bezier(0.14, 1.08, 0.3, 1) both;
}

.player-training.is-transforming .skill-flames > i.is-earned {
  animation: flame-celebrate 1s ease-in-out infinite alternate;
}

.player-training.is-transforming .sprite-shadow {
  animation: evolution-shadow 3.85s ease forwards;
}

@keyframes evolution-body-stage {
  0% { transform: translateY(0); filter: brightness(1); }
  12% { transform: translateY(13px) scaleX(1.09) scaleY(0.9); }
  29% { transform: translateY(-7px) scaleX(1.04) scaleY(1.12); filter: brightness(1.5) drop-shadow(0 0 22px #dca33e); }
  46% { transform: translateY(-33px) scale(1.12); filter: brightness(2.4) drop-shadow(0 0 55px #ffd76a); }
  62% { transform: translateY(-31px) scale(1.08); }
  78% { transform: translateY(-27px) scale(0.98); }
  100% { transform: translateY(-30px) scale(1); filter: brightness(1.05) drop-shadow(0 0 20px rgba(237, 190, 83, 0.42)); }
}

@keyframes base-form-transform {
  0% { opacity: 1; transform: translateX(-50%) scale(1); filter: brightness(1); }
  14% { transform: translateX(-50%) translateY(9px) scaleX(1.13) scaleY(0.86); }
  30% { transform: translateX(-50%) translateY(-7px) scaleX(1.05) scaleY(1.22); }
  46% { transform: translateX(-50%) translateY(3px) scaleX(1.28) scaleY(1.06); filter: brightness(2.1) drop-shadow(0 0 25px #ffd35f); }
  68% { opacity: 1; transform: translateX(-50%) translateY(-14px) scale(1.48); filter: brightness(5) saturate(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(1.9); filter: brightness(7) saturate(0); }
}

@keyframes evolved-form-reveal {
  0%, 36% { opacity: 0; transform: translateX(-50%) translateY(26px) scale(0.3); filter: brightness(6) saturate(0); }
  43% { opacity: 1; transform: translateX(-50%) translateY(-5px) scale(0.68); filter: brightness(6) saturate(0) drop-shadow(0 0 38px #fff3a4); }
  58% { opacity: 1; transform: translateX(-50%) translateY(-8px) scale(1.19); filter: brightness(2.1) saturate(0.72) drop-shadow(0 0 32px #ffd25e); }
  69% { transform: translateX(-50%) translateY(5px) scale(0.94); filter: brightness(1.18) saturate(1.08) drop-shadow(0 15px 13px rgba(0, 0, 0, 0.7)); }
  82% { transform: translateX(-50%) translateY(0) scale(1.05); }
  100% { opacity: 1; transform: translateX(-50%) translateY(4px) scale(1); filter: brightness(1.03) saturate(1.04) drop-shadow(0 15px 13px rgba(0, 0, 0, 0.74)) drop-shadow(0 0 18px rgba(234, 178, 66, 0.35)); }
}

@keyframes evolution-energy-burst {
  0% { opacity: 0; transform: translateX(-50%) scale(0.15) rotate(0deg); }
  23% { opacity: 0.8; }
  46% { opacity: 1; transform: translateX(-50%) scale(1.15) rotate(100deg); filter: brightness(2.2); }
  66% { opacity: 0.72; transform: translateX(-50%) scale(1.5) rotate(170deg); }
  100% { opacity: 0; transform: translateX(-50%) scale(2.1) rotate(240deg); }
}

@keyframes evolution-ring-spin { to { transform: rotate(360deg) scale(1.08); } }
@keyframes evolution-ring-spin-reverse { to { transform: rotate(-360deg) scale(0.88); } }

@keyframes evolution-banner-pop {
  0%, 28% { opacity: 0; transform: translateX(-50%) translateY(30px) scale(0.45); }
  43% { opacity: 1; transform: translateX(-50%) translateY(-5px) scale(1.12); }
  58%, 82% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(1.03); }
}

@keyframes evolution-shadow {
  0% { width: 105px; height: 25px; opacity: 0.72; }
  25% { width: 82px; height: 18px; opacity: 0.45; }
  51% { width: 205px; height: 38px; opacity: 0.92; box-shadow: 0 0 34px rgba(255, 204, 82, 0.48); }
  100% { width: 172px; height: 31px; opacity: 1; box-shadow: 0 0 25px rgba(228, 170, 59, 0.22); }
}

@keyframes flame-celebrate { to { translate: 0 -12px; filter: brightness(1.7); } }

@keyframes growth-complete-title {
  0%, 67% { opacity: 0; transform: translateX(-50%) translateY(25px) scale(0.6); }
  76%, 93% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(1.05); }
}

/* Vault */

.after-sales-case {
  left: 1%;
  bottom: 10%;
  width: 28%;
  height: 43%;
}

.warning-pulse {
  position: absolute;
  left: 28%;
  top: 40%;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(196, 67, 44, 0.82);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(207, 65, 44, 0.28);
  animation: warning-pulse 1.45s ease-out infinite;
}

@keyframes warning-pulse {
  0% { opacity: 0.9; transform: scale(0.55); }
  100% { opacity: 0; transform: scale(1.65); }
}

.vault-marker {
  position: absolute;
  left: 28%;
  top: 40%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #bb503b;
  border-radius: 50%;
  background: rgba(93, 28, 24, 0.92);
  box-shadow: 0 0 28px rgba(210, 67, 43, 0.35);
  color: #ffd49a;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.vault-label {
  position: absolute;
  left: 34%;
  top: 40%;
  min-width: 128px;
  padding: 7px 10px;
  border: 1px solid rgba(176, 73, 54, 0.55);
  border-radius: 3px 11px 3px 8px;
  background: rgba(29, 10, 11, 0.9);
  text-align: left;
  opacity: 0.62;
  transform: translateY(-50%) translateX(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.after-sales-case:hover .vault-label,
.after-sales-case:focus-visible .vault-label,
.hints-on .after-sales-case .vault-label {
  opacity: 1;
  transform: translateY(-50%);
}

.vault-label small,
.vault-label strong {
  display: block;
}

.vault-label small { color: #b26756; font-size: 8px; }
.vault-label strong { margin-top: 2px; color: #eed2a7; font-size: 12px; }

.after-sales-case.is-solved .warning-pulse {
  border-color: rgba(92, 153, 129, 0.7);
}

.after-sales-case.is-solved .vault-marker {
  border-color: #5f977f;
  background: #1c493e;
  color: #c8e4d5;
  box-shadow: 0 0 26px rgba(82, 148, 122, 0.28);
}

.after-sales-case.is-solved .vault-marker::after {
  content: "✓";
}

.after-sales-case.is-solved .vault-marker {
  font-size: 0;
}

.after-sales-case.is-solved .vault-marker::after {
  font-size: 22px;
}

.gold-key {
  left: 8.4%;
  bottom: 15%;
  width: 150px;
  height: 100px;
  filter: drop-shadow(0 0 14px rgba(235, 189, 75, 0.6));
  animation: key-hover 1.4s ease-in-out infinite alternate;
}

@keyframes key-hover {
  to { transform: translateY(-8px) rotate(-2deg); filter: drop-shadow(0 0 26px rgba(245, 201, 86, 0.82)); }
}

.gold-key .key-head {
  position: absolute;
  left: 24px;
  top: 24px;
  width: 42px;
  height: 42px;
  border: 8px solid #d7aa44;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #76501a, 0 0 0 2px #76501a;
}

.gold-key .key-shaft {
  position: absolute;
  left: 61px;
  top: 39px;
  width: 64px;
  height: 13px;
  border: 2px solid #76501a;
  background: linear-gradient(#edc55e, #9c7128);
  transform: rotate(-8deg);
  transform-origin: left;
}

.gold-key .key-teeth {
  position: absolute;
  left: 112px;
  top: 34px;
  width: 28px;
  height: 32px;
  border: 8px solid #c79435;
  border-left: 0;
  border-top: 0;
  transform: rotate(-8deg);
}

.key-orbit {
  position: absolute;
  left: 7px;
  top: 5px;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(237, 190, 76, 0.62);
  border-radius: 50%;
  animation: spin 4s linear infinite;
}

.gold-key > span:last-child {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: max-content;
  padding: 4px 9px;
  border: 1px solid #a27b35;
  border-radius: 10px 3px 9px 3px;
  background: rgba(45, 29, 12, 0.92);
  color: #f0cf83;
  font-size: 9px;
  transform: translateX(-50%);
}

.vault-chest {
  left: 36%;
  top: 33%;
  width: 30%;
  height: 45%;
}

.chest-hitbox {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: 40%;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.vault-chest:hover .chest-hitbox,
.vault-chest:focus-visible .chest-hitbox,
.hints-on .vault-chest .chest-hitbox {
  border-color: rgba(215, 168, 70, 0.58);
  box-shadow: 0 0 55px rgba(211, 156, 54, 0.19), inset 0 0 65px rgba(215, 160, 56, 0.09);
}

.chest-ui {
  position: absolute;
  left: 50%;
  bottom: 3%;
  min-width: 185px;
  padding: 8px 13px 8px 42px;
  border: 1px solid #735a35;
  border-radius: 17px 4px 14px 5px;
  background: rgba(6, 11, 13, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
  text-align: left;
  transform: translateX(-50%);
}

.chest-ui > i {
  position: absolute;
  left: 11px;
  top: 50%;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #8c6b37;
  border-radius: 50%;
  color: #b08d4d;
  font-style: normal;
  transform: translateY(-50%);
}

.chest-ui strong,
.chest-ui small {
  display: block;
  white-space: nowrap;
}

.chest-ui strong { color: #c7b78e; font-size: 11px; }
.chest-ui small { margin-top: 2px; color: #776a55; font-size: 8px; }

.vault-chest.is-keyed .chest-hitbox {
  border-color: rgba(236, 190, 77, 0.52);
  box-shadow: 0 0 60px rgba(230, 174, 65, 0.24), inset 0 0 70px rgba(224, 167, 61, 0.1);
  animation: chest-glow 1.5s ease-in-out infinite alternate;
}

@keyframes chest-glow {
  to { box-shadow: 0 0 95px rgba(237, 188, 79, 0.38), inset 0 0 90px rgba(224, 167, 61, 0.15); }
}

.vault-chest.is-keyed .chest-ui {
  border-color: #c6963f;
  background: rgba(72, 43, 18, 0.92);
}

.vault-chest.is-keyed .chest-ui strong,
.vault-chest.is-keyed .chest-ui > i {
  color: #f1d284;
}

.vault-chest.is-open .chest-hitbox {
  box-shadow: 0 0 90px rgba(239, 196, 91, 0.3), inset 0 0 120px rgba(238, 187, 70, 0.13);
}

.vault-chest.is-open .chest-ui {
  border-color: #5a8a74;
  background: rgba(20, 58, 48, 0.92);
}

.vault-chest.is-open .chest-ui strong,
.vault-chest.is-open .chest-ui > i {
  color: #c4dfd1;
}

.vault-chest.is-opening {
  animation: chest-open 0.9s cubic-bezier(0.2, 0.85, 0.2, 1);
}

@keyframes chest-open {
  0% { transform: scale(1); filter: brightness(1); }
  35% { transform: scale(1.03) translateY(-5px); filter: brightness(1.35); }
  55% { transform: scale(0.98) translateY(4px); filter: brightness(1.1); }
  100% { transform: scale(1); filter: brightness(1.8) drop-shadow(0 0 45px #e7b752); }
}

.chest-rattle {
  animation: rattle 0.5s ease;
}

@keyframes rattle {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-1deg); }
  40% { transform: translateX(7px) rotate(1deg); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.training-exit {
  right: 2%;
  top: 16%;
  width: 18%;
  height: 62%;
}

.exit-light {
  position: absolute;
  inset: 4% 7% 5% 25%;
  border-radius: 45% 45% 4px 4px;
  opacity: 0;
  background: rgba(79, 159, 146, 0.1);
  box-shadow: inset 0 0 45px rgba(95, 182, 165, 0.16), 0 0 50px rgba(75, 156, 141, 0.12);
  transition: opacity 0.3s ease;
}

.training-exit > span:last-child {
  position: absolute;
  left: 12%;
  top: 50%;
  min-width: 130px;
  padding: 8px 11px;
  border: 1px solid rgba(74, 111, 101, 0.45);
  border-radius: 4px 12px 3px 9px;
  background: rgba(6, 13, 15, 0.88);
  opacity: 0.15;
  transform: translateY(-50%) translateX(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.training-exit:hover > span:last-child,
.training-exit:focus-visible > span:last-child,
.hints-on .training-exit > span:last-child,
.training-exit.is-ready > span:last-child {
  opacity: 1;
  transform: translateY(-50%);
}

.training-exit span small,
.training-exit span strong { display: block; }
.training-exit span small { color: #66827a; font-size: 8px; }
.training-exit span strong { margin-top: 2px; color: #c7d8ce; font-size: 11px; }

.training-exit.is-ready .exit-light {
  opacity: 1;
  animation: exit-breathe 2s ease-in-out infinite alternate;
}

@keyframes exit-breathe {
  to { box-shadow: inset 0 0 70px rgba(95, 182, 165, 0.24), 0 0 85px rgba(75, 156, 141, 0.25); }
}

.training-exit.is-ready > span:last-child {
  border-color: #5a8f80;
  background: rgba(18, 55, 48, 0.9);
}

/* Training room */

.training-station {
  width: 23%;
  height: 52%;
  top: 25%;
}

.station-literature { left: 0; }
.station-experiment { left: 23.5%; }
.station-customer { left: 51%; }
.station-internal { right: 0; }

.station-customer .station-beacon {
  left: 30%;
  top: 53%;
}

.customer-scholar {
  position: absolute;
  z-index: 4;
  left: 45%;
  top: -7%;
  width: 47%;
  height: 90%;
  pointer-events: none;
  transform-origin: 50% 92%;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1), filter 0.35s ease;
}

.customer-scholar::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 4%;
  width: 72%;
  height: 9%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  filter: blur(6px);
  transform: translateX(-50%);
}

.customer-scholar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 11px rgba(0, 0, 0, 0.86)) saturate(0.88) brightness(0.83);
}

.research-dialogue {
  position: absolute;
  z-index: 6;
  left: 30%;
  top: 31%;
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(102, 146, 172, 0.6);
  border-radius: 14px 14px 3px 14px;
  background: rgba(8, 22, 29, 0.86);
  box-shadow: 0 0 18px rgba(79, 143, 170, 0.18);
  opacity: 0.72;
  transform: rotate(-4deg);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.research-dialogue::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(102, 146, 172, 0.6);
  border-bottom: 1px solid rgba(102, 146, 172, 0.6);
  background: rgba(8, 22, 29, 0.86);
  transform: skewX(35deg);
}

.research-dialogue i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #83c6c4;
  box-shadow: 0 0 7px rgba(131, 198, 196, 0.8);
  animation: dialogue-dot 1.35s ease-in-out infinite;
}

.research-dialogue i:nth-child(2) { animation-delay: 0.18s; }
.research-dialogue i:nth-child(3) { animation-delay: 0.36s; }

@keyframes dialogue-dot {
  0%, 70%, 100% { opacity: 0.35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-4px); }
}

.station-customer:hover .customer-scholar,
.station-customer:focus-visible .customer-scholar,
.hints-on .station-customer .customer-scholar {
  filter: brightness(1.14);
  transform: translateY(-5px) rotate(-1deg) scale(1.025);
}

.station-customer:hover .research-dialogue,
.station-customer:focus-visible .research-dialogue,
.hints-on .station-customer .research-dialogue {
  opacity: 1;
  transform: translate(-5px, -4px) rotate(-2deg) scale(1.08);
}

.station-customer.is-complete .customer-scholar {
  filter: drop-shadow(0 0 18px rgba(89, 145, 181, 0.42)) brightness(1.05);
}

.station-customer.is-complete .research-dialogue {
  border-color: rgba(110, 178, 151, 0.8);
  background: rgba(18, 58, 48, 0.9);
}

.station-customer.is-complete .research-dialogue i {
  background: #b6e4d0;
  box-shadow: 0 0 8px rgba(182, 228, 208, 0.9);
}

.station-beacon {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(197, 157, 76, 0.6);
  border-radius: 50%;
  background: rgba(6, 14, 16, 0.76);
  box-shadow: 0 0 30px rgba(215, 167, 68, 0.12);
  transform: translate(-50%, -50%);
}

.station-beacon::before,
.station-beacon::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(205, 164, 78, 0.34);
  border-radius: 50%;
  animation: station-ring 2.6s linear infinite;
}

.station-beacon::after {
  inset: -18px;
  animation-direction: reverse;
  animation-duration: 4.2s;
}

@keyframes station-ring {
  to { transform: rotate(360deg); }
}

.station-beacon i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d9ab4c;
  box-shadow: 0 0 15px #d9ab4c;
  transform: translate(-50%, -50%);
}

.station-experiment .station-beacon,
.station-customer .station-beacon {
  border-color: rgba(82, 155, 149, 0.62);
}

.station-experiment .station-beacon i,
.station-customer .station-beacon i {
  background: #5fa8a3;
  box-shadow: 0 0 15px #5fa8a3;
}

.station-internal .station-beacon {
  border-color: rgba(166, 78, 61, 0.62);
}

.station-internal .station-beacon i {
  background: #a44a3d;
  box-shadow: 0 0 15px #a44a3d;
}

.colleague-tokens {
  position: absolute;
  left: 50%;
  top: 67%;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  opacity: 0.76;
  transform: translateX(-50%);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.colleague-tokens::before {
  content: "TECH PEERS";
  position: absolute;
  left: 50%;
  bottom: -14px;
  color: rgba(194, 153, 91, 0.72);
  font-family: Georgia, serif;
  font-size: 6px;
  letter-spacing: 0.17em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.colleague-tokens img {
  width: 37px;
  height: 43px;
  padding: 3px;
  border: 1px solid rgba(146, 102, 65, 0.62);
  border-radius: 50% 50% 9px 9px;
  background: rgba(7, 14, 16, 0.78);
  object-fit: contain;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.colleague-tokens img:nth-child(2) {
  width: 42px;
  height: 49px;
}

.colleague-teal {
  filter: hue-rotate(52deg) saturate(0.78) brightness(0.92);
}

.colleague-violet {
  filter: hue-rotate(244deg) saturate(0.82) brightness(0.96);
}

.colleague-red {
  filter: hue-rotate(150deg) saturate(0.86) brightness(0.9);
}

.station-internal:hover .colleague-tokens,
.station-internal:focus-visible .colleague-tokens,
.hints-on .station-internal .colleague-tokens {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px) scale(1.06);
}

.station-internal.is-complete .colleague-tokens {
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(101, 173, 145, 0.4));
}

.market-intel-chip {
  position: absolute;
  z-index: 6;
  right: -2%;
  top: 14%;
  width: 116px;
  padding: 6px 8px 7px;
  border: 1px solid rgba(115, 169, 160, 0.46);
  border-radius: 3px 11px 3px 8px;
  background: linear-gradient(135deg, rgba(8, 28, 29, 0.9), rgba(10, 18, 21, 0.82));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42), inset 0 0 18px rgba(74, 151, 139, 0.08);
  text-align: left;
  opacity: 0.6;
  transform: translateY(5px) rotate(1deg);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.market-intel-chip::after {
  content: "";
  position: absolute;
  right: 21px;
  bottom: -22px;
  width: 1px;
  height: 22px;
  background: linear-gradient(rgba(90, 165, 151, 0.7), transparent);
  transform: rotate(27deg);
  transform-origin: top;
}

.market-intel-chip b,
.market-intel-chip small {
  display: block;
  white-space: nowrap;
}

.market-intel-chip b {
  color: #73a99f;
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.15em;
}

.market-intel-chip small {
  margin-top: 2px;
  color: rgba(204, 193, 155, 0.8);
  font-size: 7px;
}

.station-internal:hover .market-intel-chip,
.station-internal:focus-visible .market-intel-chip,
.hints-on .station-internal .market-intel-chip,
.station-internal.is-complete .market-intel-chip {
  border-color: rgba(115, 169, 160, 0.7);
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.station-card {
  position: absolute;
  left: 50%;
  bottom: -2%;
  min-width: 150px;
  padding: 9px 12px;
  border: 1px solid rgba(177, 141, 70, 0.45);
  border-radius: 4px 13px 4px 9px;
  background: rgba(5, 12, 14, 0.9);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.44);
  text-align: left;
  opacity: 0.68;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.training-station:hover .station-card,
.training-station:focus-visible .station-card,
.hints-on .training-station .station-card {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.station-card small,
.station-card strong,
.station-card b {
  display: block;
  white-space: nowrap;
}

.station-card small {
  color: #6d8179;
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.14em;
}

.station-card strong {
  margin: 2px 0;
  color: #ddcca4;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 17px;
}

.station-card b {
  color: #9f824e;
  font-size: 8px;
}

.training-station:hover .station-beacon {
  filter: brightness(1.3);
  transform: translate(-50%, -50%) scale(1.08);
}

.training-station.is-complete .station-beacon {
  border-color: #69a189;
  background: rgba(19, 61, 51, 0.86);
  box-shadow: 0 0 38px rgba(84, 157, 126, 0.25);
}

.training-station.is-complete .station-beacon i {
  background: #c3dfd0;
  box-shadow: 0 0 18px #78af98;
}

.training-station.is-complete .station-card {
  border-color: rgba(83, 145, 120, 0.58);
}

.training-station.is-complete .station-card b {
  color: #76ad96;
}

.growth-core {
  left: 38%;
  bottom: 9%;
  width: 24%;
  height: 26%;
  z-index: 18;
  pointer-events: none;
  cursor: default;
  animation: core-rise 0.7s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes core-rise {
  from { opacity: 0; transform: translateY(30px) scale(0.65); }
  to { opacity: 1; transform: none; }
}

.core-rings {
  position: absolute;
  left: 50%;
  top: 35%;
  width: 90px;
  height: 90px;
  transform: translate(-50%, -50%);
}

.core-rings i {
  position: absolute;
  inset: 0;
  border: 1px solid #d5a84e;
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(220, 168, 71, 0.25);
  animation: core-spin 5s linear infinite;
}

.core-rings i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f0c96c;
  box-shadow: 0 0 16px #f0c96c;
}

.core-rings i:nth-child(2) {
  inset: 14px;
  border-color: #58a092;
  animation-direction: reverse;
  animation-duration: 3.6s;
}

.core-rings i:nth-child(3) {
  inset: 32px;
  border-color: #9f493b;
  animation-duration: 2.1s;
}

@keyframes core-spin {
  to { transform: rotate(360deg); }
}

.growth-core > span:last-child {
  position: absolute;
  left: 50%;
  bottom: 0;
  min-width: 176px;
  padding: 8px 12px;
  border: 1px solid #bd8e3c;
  border-radius: 17px 4px 14px 5px;
  background: rgba(65, 37, 19, 0.93);
  box-shadow: 0 0 35px rgba(219, 165, 63, 0.2);
  text-align: center;
  transform: translateX(-50%);
}

.growth-core small,
.growth-core strong { display: block; }
.growth-core small { color: #b48c4e; font-family: Georgia, serif; font-size: 7px; letter-spacing: 0.13em; }
.growth-core strong { margin-top: 2px; color: #f0d187; font-size: 12px; }

/* Stage utilities */

.task-bar {
  position: absolute;
  z-index: 55;
  left: 50%;
  bottom: 14px;
  display: grid;
  width: min(760px, 58vw);
  min-height: 46px;
  grid-template-columns: auto 1fr 112px;
  align-items: center;
  gap: 11px;
  padding: 7px 10px;
  border: 1px solid rgba(147, 117, 61, 0.58);
  border-radius: 4px 17px 4px 13px;
  background: rgba(4, 10, 12, 0.93);
  box-shadow: 0 13px 34px rgba(0, 0, 0, 0.55), inset 0 0 24px rgba(67, 114, 105, 0.05);
  transform: translateX(-50%);
}

.task-seal {
  padding: 5px 9px;
  border: 1px solid #845f30;
  border-radius: 50% 45% 50% 42%;
  background: #4c241e;
  color: #e4c574;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 10px;
  transform: rotate(-2deg);
}

.task-bar p {
  margin: 0;
  color: #c0b390;
  font-size: 10px;
  line-height: 1.45;
}

.task-flash {
  animation: task-flash 0.5s ease;
}

@keyframes task-flash {
  50% { color: #f0d48b; text-shadow: 0 0 10px rgba(227, 182, 83, 0.5); }
}

.task-count {
  position: relative;
  height: 8px;
  overflow: visible;
  border: 1px solid #4f5d58;
  border-radius: 8px 2px 7px 2px;
  background: #172120;
}

.task-count i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #8f3d30, #d2a349 70%, #65a08a);
  transition: width 0.45s ease;
}

.task-count span {
  position: absolute;
  right: 0;
  top: -16px;
  color: #85958f;
  font-family: Georgia, serif;
  font-size: 8px;
}

.xp-float {
  position: absolute;
  z-index: 120;
  left: 50%;
  top: 45%;
  padding: 5px 10px;
  border: 1px solid #dbad50;
  border-radius: 14px 3px 12px 4px;
  background: rgba(62, 36, 18, 0.94);
  color: #f3d886;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0) scale(0.8);
}

.xp-float.is-showing {
  animation: xp-rise 1.25s ease-out;
}

@keyframes xp-rise {
  0% { opacity: 0; transform: translate(-50%, 14px) scale(0.7); }
  20% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(1.05); }
}

.xp-celebration {
  --xp-color: #d6a84d;
  position: fixed;
  inset: 0;
  z-index: 650;
  display: grid;
  place-content: center;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.xp-celebration::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 51%, color-mix(in srgb, var(--xp-color) 22%, transparent), transparent 23%);
}

.xp-celebration.is-showing {
  visibility: visible;
  animation: xp-celebration-in 1.32s ease both;
}

.xp-rays {
  position: absolute;
  left: 50%;
  top: 49%;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  opacity: 0;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--xp-color) 70%, transparent) 0 2deg, transparent 2.5deg 16deg);
  transform: translate(-50%, -50%) scale(0.25);
}

.xp-celebration.is-showing .xp-rays {
  animation: xp-rays-burst 1.1s ease-out both;
}

.xp-celebration > strong,
.xp-celebration > span:not(.xp-rays):not(.xp-particles):not(.xp-celebration-bar) {
  position: relative;
  z-index: 3;
  text-align: center;
}

.xp-celebration > strong {
  color: #fff2b2;
  font-family: Georgia, serif;
  font-size: clamp(54px, 8vw, 94px);
  font-style: italic;
  letter-spacing: -0.06em;
  line-height: 0.9;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--xp-color) 70%, #6b3326);
  text-shadow: 0 0 20px var(--xp-color), 0 8px 0 #65342a, 0 17px 30px #000;
  transform: scale(0.35) rotate(-8deg);
}

.xp-celebration.is-showing > strong {
  animation: xp-number-pop 1.1s cubic-bezier(0.15, 1.25, 0.35, 1) both;
}

#xp-celebration-total {
  margin-top: 16px;
  color: #f4dfaa;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-shadow: 0 2px 8px #000;
}

.xp-celebration-bar {
  position: relative;
  z-index: 3;
  display: block;
  width: min(340px, 70vw);
  height: 12px;
  margin: 10px auto 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--xp-color) 70%, #6a5840);
  border-radius: 12px 3px 10px 4px;
  background: rgba(6, 12, 15, 0.9);
  box-shadow: 0 0 22px color-mix(in srgb, var(--xp-color) 24%, transparent);
}

.xp-celebration-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--xp-color) 70%, #7c3e31), #f3d57c);
  box-shadow: 0 0 12px var(--xp-color);
  transition: width 0.12s linear;
}

.xp-particles {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
}

.xp-particles i {
  --particle-x: 120px;
  --particle-y: -90px;
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid #fff1b4;
  background: var(--xp-color);
  box-shadow: 0 0 14px var(--xp-color);
  opacity: 0;
  transform: rotate(45deg);
}

.xp-celebration.is-showing .xp-particles i { animation: xp-particle 1s ease-out both; }
.xp-particles i:nth-child(1) { --particle-x: -165px; --particle-y: -105px; }
.xp-particles i:nth-child(2) { --particle-x: -92px; --particle-y: -155px; animation-delay: 0.05s !important; }
.xp-particles i:nth-child(3) { --particle-x: 15px; --particle-y: -175px; animation-delay: 0.1s !important; }
.xp-particles i:nth-child(4) { --particle-x: 145px; --particle-y: -115px; animation-delay: 0.03s !important; }
.xp-particles i:nth-child(5) { --particle-x: 175px; --particle-y: 20px; animation-delay: 0.12s !important; }
.xp-particles i:nth-child(6) { --particle-x: 95px; --particle-y: 105px; animation-delay: 0.08s !important; }
.xp-particles i:nth-child(7) { --particle-x: -105px; --particle-y: 110px; animation-delay: 0.14s !important; }
.xp-particles i:nth-child(8) { --particle-x: -180px; --particle-y: 18px; animation-delay: 0.06s !important; }

@keyframes xp-celebration-in {
  0% { opacity: 0; }
  13%, 73% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes xp-rays-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-12deg); }
  26% { opacity: 0.46; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25) rotate(14deg); }
}

@keyframes xp-number-pop {
  0% { opacity: 0; transform: translateY(24px) scale(0.25) rotate(-13deg); }
  28% { opacity: 1; transform: translateY(-8px) scale(1.25) rotate(3deg); }
  48%, 78% { opacity: 1; transform: translateY(0) scale(1) rotate(-3deg); }
  100% { opacity: 0; transform: translateY(-30px) scale(1.04) rotate(-2deg); }
}

@keyframes xp-particle {
  0% { opacity: 0; transform: translate(0, 0) scale(0.1) rotate(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--particle-x), var(--particle-y)) scale(0.75) rotate(220deg); }
}

.scene-transition {
  position: absolute;
  inset: 0;
  z-index: 160;
  pointer-events: none;
  visibility: hidden;
}

.transition-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 51%;
  background:
    linear-gradient(90deg, rgba(4, 8, 10, 0.99), rgba(15, 28, 31, 0.99)),
    repeating-linear-gradient(0deg, transparent 0 15%, rgba(193, 153, 75, 0.09) 15.2% 15.5%, transparent 15.8% 31%);
  transition: transform 0.65s cubic-bezier(0.7, 0, 0.3, 1);
}

.transition-left { left: 0; transform: translateX(-101%); border-right: 1px solid #7d6338; }
.transition-right { right: 0; transform: translateX(101%); border-left: 1px solid #7d6338; }

.transition-copy {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease 0.35s, transform 0.35s ease 0.35s;
}

.transition-copy span,
.transition-copy strong { display: block; }
.transition-copy span { color: #9e7c3f; font-family: Georgia, serif; font-size: 9px; letter-spacing: 0.28em; }
.transition-copy strong { margin-top: 8px; color: #ead9ad; font-family: "STKaiti", "KaiTi", serif; font-size: 38px; }

.scene-transition.is-running {
  visibility: visible;
}

.scene-transition.is-running .transition-door {
  transform: translateX(0);
  animation: transition-open 1.45s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}

@keyframes transition-open {
  0% { transform: translateX(var(--start)); }
  43% { transform: translateX(0); }
  57% { transform: translateX(0); }
  100% { transform: translateX(var(--end)); }
}

.scene-transition.is-running .transition-left { --start: -101%; --end: -101%; }
.scene-transition.is-running .transition-right { --start: 101%; --end: 101%; }
.scene-transition.is-running .transition-copy { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: transition-copy-fade 1.45s ease forwards; }

@keyframes transition-copy-fade {
  0%, 27%, 78%, 100% { opacity: 0; }
  43%, 65% { opacity: 1; }
}

.control-bar {
  position: relative;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px clamp(14px, 2.3vw, 42px);
  border-top: 1px solid #493c2b;
  background: linear-gradient(#091113, #0d1517);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.38);
}

.evidence-strip {
  display: flex;
  align-items: center;
  gap: 6px;
}

.evidence-strip > span {
  margin-right: 4px;
  color: #63776f;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.evidence-strip > i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px dashed #41514c;
  border-radius: 50% 44% 49% 42%;
  color: #4f615a;
  font-size: 9px;
  font-style: normal;
  transform: rotate(-4deg);
}

.evidence-strip > i:nth-of-type(even) { transform: rotate(5deg); }

.evidence-strip > i.is-found {
  border-style: solid;
  border-color: #5b917d;
  background: #183c35;
  color: #bed8cc;
}

.evidence-strip > b {
  margin-left: 7px;
  color: #655f50;
  font-size: 8px;
  font-weight: 400;
}

.evidence-strip > b.is-found {
  color: #d2aa55;
  text-shadow: 0 0 11px rgba(218, 172, 73, 0.42);
}

.motto {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #776644;
  font-family: Georgia, serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.motto i {
  width: 34px;
  height: 1px;
  background: #604d2e;
}

.control-actions {
  justify-self: end;
  display: flex;
  gap: 5px;
}

.control-actions button {
  padding: 6px 9px;
  border: 1px solid #3d4d49;
  border-radius: 3px 8px 3px 7px;
  background: #0f191b;
  color: #788b83;
  font-size: 9px;
  cursor: pointer;
}

.control-actions button:hover {
  border-color: #8e713d;
  color: #d1c19b;
}

.screen-shake {
  animation: screen-shake 0.42s ease;
}

@keyframes screen-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

/* Modals */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow-y: auto;
  background: rgba(1, 5, 7, 0.82);
  backdrop-filter: blur(8px) saturate(0.82);
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

#modal-content {
  width: min(980px, 95vw);
}

.modal-close {
  position: absolute;
  z-index: 20;
  right: 16px;
  top: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  color: #9d7c4a;
  font-family: Georgia, serif;
  font-size: 27px;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.evidence-modal {
  position: relative;
  display: grid;
  min-height: 560px;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
  border: 1px solid #8d7142;
  border-radius: 8px 28px 8px 19px;
  background: linear-gradient(90deg, #13292a 0 28.5%, #ded1ad 28.8% 100%);
  box-shadow: 30px 34px 0 rgba(0, 0, 0, 0.28), 0 32px 100px rgba(0, 0, 0, 0.55), inset 0 0 0 6px rgba(32, 23, 15, 0.19);
  color: #28251f;
  transform: rotate(-0.2deg);
}

.evidence-modal::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(93, 70, 38, 0.2);
  border-radius: 6px 24px 6px 16px;
}

.evidence-person {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 560px;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--role-color) 32%, transparent), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 30%, rgba(202, 164, 76, 0.08) 30.4% 30.8%, transparent 31.2% 62%);
}

.evidence-amber { --role-color: #d0a449; }
.evidence-red { --role-color: #a4493a; }
.evidence-blue { --role-color: #5873b2; }
.evidence-green { --role-color: #59917a; }

.role-halo {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 220px;
  height: 220px;
  border: 1px solid color-mix(in srgb, var(--role-color) 62%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 65px color-mix(in srgb, var(--role-color) 22%, transparent), inset 0 0 50px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%);
}

.evidence-person img {
  position: relative;
  z-index: 2;
  width: 340px;
  max-width: none;
  margin-bottom: 28px;
  filter: drop-shadow(0 20px 17px rgba(0, 0, 0, 0.65));
}

.evidence-person > small {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 27px;
  min-width: 130px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--role-color) 72%, #2b2318);
  border-radius: 50%;
  background: rgba(5, 12, 14, 0.9);
  color: #e0d1aa;
  text-align: center;
  transform: translateX(-50%) rotate(-2deg);
}

.evidence-content {
  position: relative;
  z-index: 2;
  padding: clamp(36px, 4.8vw, 67px);
}

.evidence-content .modal-kicker,
.challenge-modal .modal-kicker,
.training-modal .modal-kicker,
.mastery-modal .modal-kicker,
.dossier-modal .modal-kicker,
.confirm-modal .modal-kicker,
.solved-modal .modal-kicker {
  color: #77452f;
}

.evidence-content h2,
.challenge-main h2,
.training-modal h2,
.mastery-modal h2,
.dossier-content h2,
.confirm-modal h2,
.solved-modal h2 {
  margin: 9px 0 2px;
  color: #302822;
  font-family: "STKaiti", "KaiTi", Georgia, serif;
  font-size: clamp(37px, 4.5vw, 58px);
  line-height: 1.05;
}

.evidence-object {
  margin: 0 0 22px;
  color: #776142;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
}

.evidence-content h3,
.challenge-main h3,
.training-modal h3 {
  margin: 20px 0 8px;
  color: #6f3027;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 21px;
}

.evidence-content > p:not(.modal-kicker):not(.evidence-object) {
  color: #514a3b;
  font-size: 13px;
  line-height: 1.78;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 22px 0;
}

.proof-grid span {
  min-height: 67px;
  padding: 9px;
  border: 1px dashed #9a8157;
  background: rgba(255, 255, 255, 0.13);
  color: #544735;
  font-size: 11px;
  line-height: 1.45;
}

.proof-grid i {
  display: block;
  margin-bottom: 5px;
  color: #8b3e30;
  font-family: Georgia, serif;
  font-size: 9px;
  font-style: normal;
}

.evidence-content blockquote,
.dossier-content blockquote {
  margin: 19px 0;
  padding: 12px 15px;
  border-left: 3px solid #8c3b2f;
  background: rgba(109, 61, 40, 0.08);
  color: #554532;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
  line-height: 1.55;
}

.modal-action {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #4b271f;
  border-radius: 4px 13px 4px 10px;
  background: linear-gradient(#77392d, #49231e);
  box-shadow: 5px 7px 0 rgba(58, 37, 24, 0.2);
  color: #f0ddb0;
  cursor: pointer;
  font-weight: 700;
}

.modal-action:hover {
  filter: brightness(1.12);
}

/* Challenges */

.challenge-modal {
  position: relative;
  display: grid;
  min-height: 520px;
  grid-template-columns: 245px 1fr;
  overflow: hidden;
  border: 1px solid #8c5d3f;
  border-radius: 8px 26px 8px 18px;
  background: linear-gradient(105deg, #241416 0 25%, #d8c9a6 25.3% 100%);
  box-shadow: 28px 32px 0 rgba(0, 0, 0, 0.27), 0 30px 90px rgba(0, 0, 0, 0.56);
  color: #29251f;
}

.challenge-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border-right: 1px solid rgba(215, 173, 83, 0.25);
  text-align: center;
}

.warning-emblem {
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  border: 2px solid #aa4737;
  border-radius: 50%;
  background: #4d1d1d;
  box-shadow: 0 0 45px rgba(185, 59, 43, 0.25), inset 0 0 30px rgba(201, 69, 49, 0.1);
  color: #f1c88d;
  font-family: Georgia, serif;
  font-size: 58px;
  font-weight: 900;
}

.challenge-side p {
  margin: 20px 0 4px;
  color: #c2a16e;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
}

.challenge-side strong {
  color: #7d6450;
  font-family: Georgia, serif;
  font-size: 13px;
}

.challenge-dots,
.training-progress {
  display: flex;
  gap: 7px;
  margin-top: 17px;
}

.challenge-dots i,
.training-progress i {
  width: 28px;
  height: 4px;
  background: #4b3830;
  transform: skewX(-20deg);
}

.challenge-dots i.done,
.training-progress i.done {
  background: #578b76;
}

.challenge-dots i.current,
.training-progress i.current {
  background: #c09643;
  box-shadow: 0 0 10px rgba(206, 154, 62, 0.4);
}

.challenge-main {
  padding: clamp(34px, 4.5vw, 62px);
}

.challenge-main h2 {
  font-size: clamp(34px, 4vw, 50px);
}

.challenge-main h3,
.training-modal h3 {
  max-width: 650px;
  color: #4b4030;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
}

.choice-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.choice {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #9b855f;
  border-radius: 4px 12px 4px 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #40382c;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.choice:hover:not(:disabled) {
  border-color: #744033;
  background: rgba(117, 65, 45, 0.08);
  transform: translateX(4px);
}

.choice > i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid #87704b;
  border-radius: 50% 45% 50% 42%;
  color: #734134;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: normal;
}

.choice > span {
  font-size: 12px;
  line-height: 1.45;
}

.choice.is-correct {
  border-color: #4d806b;
  background: rgba(55, 115, 91, 0.12);
  color: #294b3e;
}

.choice.is-correct > i {
  border-color: #4d806b;
  background: #346d59;
  color: #e2f0e8;
}

.choice.is-wrong {
  border-color: #9f4b3c;
  background: rgba(155, 58, 44, 0.1);
  color: #714036;
}

.choice.is-wrong > i {
  border-color: #9f4b3c;
  background: #83372d;
  color: #f0d5ca;
}

.challenge-feedback {
  min-height: 22px;
  margin: 14px 0 0;
  padding-left: 10px;
  border-left: 2px solid #a18150;
  color: #776b56;
  font-size: 11px;
  line-height: 1.55;
}

.challenge-feedback.is-correct {
  border-left-color: #4f866e;
  color: #3d6b58;
}

.challenge-feedback.is-wrong {
  border-left-color: #a44839;
  color: #81483d;
}

/* Training question modal */

.training-modal {
  --skill-color: #c39242;
  position: relative;
  min-height: 535px;
  padding: clamp(34px, 4.6vw, 62px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--skill-color) 70%, #4b3e2d);
  border-radius: 8px 27px 8px 18px;
  background:
    linear-gradient(120deg, rgba(228, 215, 179, 0.98), rgba(198, 186, 151, 0.98)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(88, 70, 43, 0.08) 32px);
  box-shadow: 28px 32px 0 rgba(0, 0, 0, 0.27), 0 30px 90px rgba(0, 0, 0, 0.56);
  color: #2a2720;
}

.training-modal::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 310px;
  height: 310px;
  border: 1px solid color-mix(in srgb, var(--skill-color) 45%, transparent);
  border-radius: 50%;
  box-shadow: inset 0 0 65px color-mix(in srgb, var(--skill-color) 11%, transparent);
}

.training-amber { --skill-color: #c79541; }
.training-cyan { --skill-color: #4e8f87; }
.training-blue { --skill-color: #536ca4; }
.training-red { --skill-color: #9b4638; }

.training-modal-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 18px;
}

.training-code {
  display: grid;
  width: 110px;
  height: 78px;
  place-content: center;
  border: 1px solid color-mix(in srgb, var(--skill-color) 75%, #5b4b32);
  border-radius: 50% 45% 49% 42%;
  background: color-mix(in srgb, var(--skill-color) 12%, transparent);
  text-align: center;
  transform: rotate(-2deg);
}

.training-code span,
.training-code small {
  display: block;
}

.training-code span {
  color: color-mix(in srgb, var(--skill-color) 80%, #33291f);
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 700;
}

.training-code small {
  color: #71624d;
  font-size: 8px;
}

.training-heading h2 {
  font-size: clamp(36px, 4.5vw, 56px);
}

.training-xp {
  text-align: right;
}

.training-xp strong,
.training-xp small {
  display: block;
}

.training-xp strong {
  color: color-mix(in srgb, var(--skill-color) 82%, #45331e);
  font-family: Georgia, serif;
  font-size: 34px;
}

.training-xp small {
  color: #776b58;
  font-size: 9px;
}

.training-progress {
  position: relative;
  z-index: 2;
  margin: 22px 0 13px;
}

.training-progress i {
  width: 80px;
  height: 5px;
  background: rgba(82, 75, 59, 0.2);
}

.training-progress i.done {
  background: #4e806d;
}

.training-progress i.current {
  background: var(--skill-color);
}

.training-modal > h3,
.training-modal .choice-list,
.training-modal .challenge-feedback {
  position: relative;
  z-index: 2;
}

/* Mastery, dossier and confirmations */

.mastery-modal,
.solved-modal,
.confirm-modal {
  --skill-color: #c29140;
  position: relative;
  width: min(650px, 94vw);
  margin: 0 auto;
  padding: clamp(38px, 5vw, 68px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--skill-color) 68%, #58452d);
  border-radius: 8px 26px 8px 17px;
  background: linear-gradient(125deg, #e0d3b1, #c7b995);
  box-shadow: 26px 30px 0 rgba(0, 0, 0, 0.25), 0 30px 90px rgba(0, 0, 0, 0.55);
  color: #302a22;
  text-align: center;
}

.mastery-cyan { --skill-color: #4f8f86; }
.mastery-blue { --skill-color: #536da6; }
.mastery-red { --skill-color: #9b4638; }
.mastery-amber { --skill-color: #c29140; }

.mastery-seal {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  place-content: center;
  margin: 0 auto 20px;
  border: 2px solid var(--skill-color);
  border-radius: 50% 45% 50% 43%;
  background: color-mix(in srgb, var(--skill-color) 12%, transparent);
  box-shadow: 0 0 36px color-mix(in srgb, var(--skill-color) 18%, transparent);
  transform: rotate(-3deg);
}

.mastery-seal span {
  color: var(--skill-color);
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 700;
}

.mastery-seal i {
  position: absolute;
  right: -4px;
  bottom: 2px;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  background: #306b57;
  color: #e0f1e8;
  font-style: normal;
}

.mastery-modal h2,
.solved-modal h2,
.confirm-modal h2 {
  font-size: clamp(35px, 4.8vw, 52px);
}

.mastery-modal > p:not(.modal-kicker),
.solved-modal > p:not(.modal-kicker),
.confirm-modal > p:not(.modal-kicker) {
  color: #5f5443;
  font-size: 13px;
  line-height: 1.75;
}

.mastery-bar {
  position: relative;
  height: 13px;
  margin: 24px 0 20px;
  border: 1px solid #8d7953;
  border-radius: 9px 2px 8px 3px;
  background: rgba(68, 60, 46, 0.12);
}

.mastery-bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--skill-color), #4e806c);
}

.mastery-bar span {
  position: absolute;
  right: 0;
  top: -18px;
  color: #6c5b40;
  font-family: Georgia, serif;
  font-size: 9px;
}

.solved-modal {
  --skill-color: #4f8873;
}

.confirm-modal {
  --skill-color: #9a4335;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.confirm-actions button {
  padding: 11px 13px;
  border: 1px solid #856f4d;
  border-radius: 4px 11px 4px 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #5e513d;
  cursor: pointer;
}

.confirm-actions #confirm-reset {
  border-color: #823a30;
  background: #6c3028;
  color: #efdab2;
}

.dossier-modal {
  position: relative;
  display: grid;
  min-height: 580px;
  grid-template-columns: 300px 1fr;
  overflow: hidden;
  border: 1px solid #846a3e;
  border-radius: 9px 29px 9px 19px;
  background: linear-gradient(90deg, #142a2c 0 31%, #d9ccaa 31.3% 100%);
  box-shadow: 30px 34px 0 rgba(0, 0, 0, 0.28), 0 32px 100px rgba(0, 0, 0, 0.58);
  color: #29261f;
}

.dossier-character {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.dossier-character img {
  position: relative;
  z-index: 2;
  width: 355px;
  max-width: none;
  margin-bottom: 32px;
  filter: drop-shadow(0 22px 20px rgba(0, 0, 0, 0.68));
  transform-origin: center bottom;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.dossier-character.is-grown img {
  width: 345px;
  transform: translateY(-7px);
  filter: drop-shadow(0 22px 20px rgba(0, 0, 0, 0.68)) drop-shadow(0 0 24px rgba(225, 174, 67, 0.34));
}

.dossier-glow {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 230px;
  height: 230px;
  border: 1px solid #a88543;
  border-radius: 50%;
  box-shadow: 0 0 65px rgba(64, 132, 120, 0.2);
  transform: translate(-50%, -50%);
}

.dossier-character > b {
  position: absolute;
  z-index: 4;
  right: 20px;
  top: 20px;
  display: grid;
  width: 63px;
  height: 63px;
  place-items: center;
  border: 2px solid #c0923e;
  border-radius: 50%;
  background: #4e261f;
  color: #f0cd78;
  font-family: Georgia, serif;
}

.dossier-content {
  padding: clamp(38px, 5vw, 67px);
}

.dossier-company-logo {
  display: block;
  width: 190px;
  height: 48px;
  margin: 5px 0 16px;
  padding: 6px 9px;
  border: 1px solid rgba(95, 79, 52, 0.2);
  border-radius: 3px 11px 3px 9px;
  background: rgba(250, 248, 239, 0.72);
  object-fit: contain;
}

.dossier-content h2 {
  font-size: clamp(39px, 5vw, 60px);
}

.dossier-role {
  margin: 0 0 18px;
  color: #785f3e;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
}

.dossier-content > p:not(.modal-kicker):not(.dossier-role) {
  color: #5d5443;
  font-size: 12px;
  line-height: 1.7;
}

.dossier-boundaries {
  display: grid;
  grid-template-columns: minmax(105px, 0.8fr) auto minmax(185px, 1.35fr) auto minmax(105px, 0.8fr);
  align-items: stretch;
  gap: 7px;
  margin: 18px 0 22px;
}

.dossier-boundaries > span {
  display: grid;
  align-content: center;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(103, 83, 52, 0.3);
  background: rgba(117, 94, 57, 0.06);
}

.dossier-boundaries > span.is-primary {
  border-color: rgba(63, 112, 103, 0.64);
  background: rgba(54, 108, 99, 0.12);
  box-shadow: inset 3px 0 0 #3e746a;
}

.dossier-boundaries > span b,
.dossier-boundaries > span small {
  display: block;
}

.dossier-boundaries > span b {
  color: #4b3f2e;
  font-size: 11px;
}

.dossier-boundaries > span small {
  margin-top: 3px;
  color: #75674f;
  font-size: 8px;
  line-height: 1.4;
}

.dossier-boundaries > i {
  align-self: center;
  color: #8b6737;
  font-family: Georgia, serif;
  font-style: normal;
}

.dossier-skills {
  display: grid;
  gap: 12px;
  margin: 25px 0;
}

.dossier-skills > div {
  display: grid;
  grid-template-columns: 150px 1fr 48px;
  align-items: center;
  gap: 10px;
}

.dossier-skills > div > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dossier-skills span > i {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid #816640;
  border-radius: 50% 45% 50% 42%;
  color: #784237;
  font-family: Georgia, serif;
  font-size: 7px;
  font-style: normal;
}

.dossier-skills span > strong {
  color: #493e2f;
  font-size: 12px;
}

.dossier-skills > div > b {
  height: 8px;
  overflow: hidden;
  border: 1px solid #8c7957;
  border-radius: 8px 2px 7px 2px;
  background: rgba(70, 62, 47, 0.12);
}

.dossier-skills > div > b i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8b3e31, #c09240 58%, #50836f);
}

.dossier-skills > div > small {
  color: #6e624e;
  font-family: Georgia, serif;
  font-size: 8px;
  text-align: right;
}

.dossier-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border: 1px solid #8d744d;
  background: rgba(111, 78, 43, 0.08);
}

.dossier-total span { color: #665b48; font-size: 10px; }
.dossier-total strong { color: #70442c; font-family: Georgia, serif; font-size: 15px; }

/* Reward and finale */

.reward-overlay,
.finale-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 25px;
  background:
    radial-gradient(circle at 50% 55%, rgba(190, 139, 45, 0.24), transparent 32%),
    rgba(3, 7, 9, 0.94);
  animation: fade-in 0.5s ease;
}

.reward-rays {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 1200px;
  height: 1200px;
  opacity: 0.2;
  background: repeating-conic-gradient(from 0deg, #d1a347 0 3deg, transparent 3.5deg 14deg);
  animation: slow-spin 42s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes slow-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.reward-panel {
  position: relative;
  z-index: 2;
  width: min(960px, 94vw);
  text-align: center;
}

.reward-panel > p:first-child,
.finale-panel > p:first-child {
  margin: 0;
  color: #b18845;
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.reward-panel h2,
.finale-panel h2 {
  margin: 12px 0;
  color: #efddb0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.95;
  text-shadow: 0 13px 34px #000;
}

.reward-lead {
  color: #94a69f;
  font-size: 14px;
}

.reward-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 36px 0 31px;
}

.reward-items > div {
  min-height: 155px;
  padding: 22px 18px;
  border: 1px solid #8f6c34;
  border-radius: 6px 22px 5px 15px;
  background: linear-gradient(145deg, rgba(68, 36, 29, 0.9), rgba(10, 23, 24, 0.94));
  box-shadow: 10px 14px 0 rgba(0, 0, 0, 0.25), inset 0 0 30px rgba(204, 153, 58, 0.05);
  transform: rotate(-0.5deg);
}

.reward-items > div:nth-child(2) { transform: translateY(-10px) rotate(0.6deg); }

.reward-items span,
.reward-items strong,
.reward-items small {
  display: block;
}

.reward-items span {
  color: #9d7536;
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.reward-items strong {
  margin: 8px 0 5px;
  color: #ead6a8;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 25px;
}

.reward-items small {
  color: #81938c;
  font-size: 10px;
}

.reward-action {
  margin: 0 auto;
}

.finale-overlay {
  --finale-reveal: 0;
  --finale-light: 0;
  --finale-glow-scale: 0.92;
  --finale-wave-scale: 0.55;
  --finale-rise: 36px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  isolation: isolate;
  padding: 0;
  background: #02070a;
}

.finale-background {
  position: absolute;
  z-index: -3;
  inset: -1.5%;
  background: url("finale-growth-world.png") center / cover no-repeat;
  transform: scale(1.025);
  animation: finale-world-breathe 18s ease-in-out infinite alternate;
}

.finale-background::before,
.finale-background::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.finale-background::before {
  inset: 0;
  background: url("finale-growth-world-bright.png") center / cover no-repeat;
  opacity: var(--finale-reveal);
  transition: opacity 0.06s linear;
}

.finale-background::after {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 8, 12, 0.97) 0%, rgba(2, 8, 12, 0.9) 28%, rgba(2, 8, 12, 0.54) 46%, rgba(2, 8, 12, 0.08) 72%, rgba(2, 8, 12, 0.2) 100%),
    linear-gradient(0deg, rgba(1, 5, 8, 0.7), transparent 39%, rgba(1, 5, 8, 0.16));
}

.finale-growth-glow {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.finale-growth-glow::before,
.finale-growth-glow::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: var(--finale-light);
  transition: opacity 0.24s linear, transform 0.24s linear;
}

.finale-growth-glow::before {
  right: 4%;
  bottom: -21%;
  width: 62vw;
  height: 67vw;
  border-radius: 50%;
  background:
    radial-gradient(circle at 68% 42%, rgba(255, 235, 150, 0.38), transparent 22%),
    repeating-radial-gradient(circle, transparent 0 8%, rgba(124, 244, 164, 0.12) 8.3% 8.7%, transparent 9% 14%);
  filter: blur(2px);
  transform: scale(var(--finale-wave-scale));
}

.finale-growth-glow::after {
  right: 5%;
  bottom: -4%;
  width: 58%;
  height: 42%;
  background:
    radial-gradient(ellipse at 15% 78%, rgba(119, 255, 164, 0.38), transparent 18%),
    radial-gradient(ellipse at 42% 66%, rgba(242, 213, 91, 0.36), transparent 20%),
    radial-gradient(ellipse at 70% 43%, rgba(126, 240, 174, 0.3), transparent 18%);
  filter: blur(8px);
  transform: translateY(var(--finale-rise));
}

.finale-growth-glow i {
  position: absolute;
  right: 21%;
  bottom: 13%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffdf82;
  box-shadow: 0 0 16px 5px rgba(255, 202, 92, 0.38);
  opacity: 0;
}

.finale-growth-glow i:nth-child(2) { right: 31%; bottom: 29%; animation-delay: 0.75s; }
.finale-growth-glow i:nth-child(3) { right: 12%; bottom: 45%; animation-delay: 1.45s; }
.finale-growth-glow i:nth-child(4) { right: 43%; bottom: 18%; animation-delay: 0.35s; }
.finale-growth-glow i:nth-child(5) { right: 52%; bottom: 37%; animation-delay: 1.05s; }
.finale-growth-glow i:nth-child(6) { right: 7%; bottom: 23%; animation-delay: 1.8s; }
.finale-growth-glow i:nth-child(7) { right: 36%; bottom: 51%; animation-delay: 2.2s; }

.finale-overlay.is-narrating.is-light-revealing .finale-growth-glow i {
  animation: finale-seed-rise 1.15s ease-out both;
}

.finale-overlay.is-finished .finale-background {
  animation: none;
  transform: scale(1.055) translate3d(-0.35%, -0.2%, 0);
}

.finale-overlay.is-finished .finale-background::before {
  opacity: 1;
}

.finale-panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 100%;
  padding: clamp(28px, 4.2vw, 72px) clamp(26px, 6.4vw, 124px);
  text-align: left;
}

.finale-copy {
  width: min(700px, 47vw);
  max-height: calc(100vh - 48px);
  padding: clamp(22px, 2.5vw, 38px) clamp(24px, 3vw, 48px) clamp(22px, 2.2vw, 34px);
  overflow: auto;
  border: 1px solid rgba(210, 173, 88, 0.22);
  border-left: 3px solid rgba(225, 183, 82, 0.72);
  border-radius: 5px 34px 6px 22px;
  background: linear-gradient(115deg, rgba(2, 9, 13, 0.93), rgba(3, 13, 17, 0.78) 70%, rgba(8, 18, 19, 0.56));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46), inset 0 0 52px rgba(80, 170, 132, 0.035);
  backdrop-filter: blur(8px);
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 154, 72, 0.45) transparent;
}

.finale-kicker {
  margin: 0;
  color: #c4a05a;
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.finale-panel h2 {
  margin: 9px 0 17px;
  color: #f0dfb6;
  font-size: clamp(40px, 4.2vw, 68px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-shadow: 0 12px 32px #000, 0 0 26px rgba(225, 179, 74, 0.14);
}

.finale-panel h2 em {
  color: #ffd878;
  font-style: normal;
}

.finale-recitation {
  position: relative;
  margin-bottom: 16px;
  padding: 3px 0 1px 17px;
}

.finale-recitation::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: linear-gradient(transparent, rgba(218, 174, 83, 0.62) 17%, rgba(66, 177, 139, 0.46) 75%, transparent);
}

.finale-recitation p {
  margin: 0 0 8px;
  color: #bdc9c2;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: clamp(12px, 1.02vw, 15.5px);
  line-height: 1.55;
}

.finale-recitation .finale-theme-line {
  color: #b9cfc3;
}

.finale-theme-line b {
  color: #d5ae59;
  font-family: Georgia, serif;
  letter-spacing: 0.04em;
}

.finale-recitation .finale-coda {
  margin-top: 10px;
  color: #d9c798;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.finale-recitation .finale-coda-strong {
  margin-top: -3px;
  color: #f2d06f;
  font-size: clamp(18px, 1.48vw, 23px);
}

.finale-last-word {
  display: inline-block;
  transform-origin: 50% 72%;
  transition: color 0.18s ease, text-shadow 0.18s ease, filter 0.18s ease;
}

.finale-overlay.is-narrating.is-light-revealing .finale-last-word {
  color: #fff3a9;
  text-shadow: 0 0 10px rgba(255, 232, 143, 0.88), 0 0 32px rgba(117, 255, 178, 0.7);
  animation: finale-last-word-reveal 1.06s cubic-bezier(0.16, 0.78, 0.22, 1) both;
}

.finale-overlay.has-light-revealed .finale-last-word,
.finale-overlay.is-finished .finale-last-word {
  color: #fff1a3;
  text-shadow: 0 0 13px rgba(255, 221, 113, 0.72), 0 0 27px rgba(113, 240, 166, 0.46);
}

.finale-line {
  opacity: 0.45;
  transform: translateX(-3px);
  transition: opacity 0.35s ease, color 0.35s ease, transform 0.35s ease, text-shadow 0.35s ease;
}

.finale-line.is-spoken {
  opacity: 0.72;
  transform: translateX(0);
}

.finale-line.is-current {
  opacity: 1;
  transform: translateX(4px);
  text-shadow: 0 0 18px rgba(245, 201, 93, 0.18);
}

.finale-coda-strong.is-current {
  animation: finale-coda-emphasis 0.8s ease both;
}

.finale-audio-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 13px 0 12px;
  padding: 8px 11px;
  border: 1px solid rgba(104, 162, 139, 0.34);
  border-radius: 4px 15px 4px 10px;
  background: rgba(5, 18, 19, 0.72);
}

.finale-audio-toggle,
.finale-audio-progress {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.finale-audio-toggle {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  padding: 0;
  background: transparent;
  color: #d8c48f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.finale-audio-toggle i {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(210, 171, 84, 0.66);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(178, 127, 45, 0.28), rgba(28, 78, 65, 0.2));
  box-shadow: 0 0 18px rgba(202, 154, 61, 0.14);
}

.finale-audio-toggle i::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 7px 0 0 9px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #e4c36f;
}

.finale-overlay.is-narrating .finale-audio-toggle i::after {
  width: 7px;
  height: 9px;
  margin: 7px auto 0;
  border: 0;
  border-left: 2px solid #e4c36f;
  border-right: 2px solid #e4c36f;
}

.finale-audio-progress {
  position: relative;
  flex: 1 1 auto;
  height: 4px;
  padding: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(103, 129, 119, 0.28);
}

.finale-audio-progress i {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #58a78d, #e8bd5f, #fff0ac);
  box-shadow: 0 0 12px rgba(232, 189, 95, 0.48);
  transition: width 0.12s linear;
}

.finale-audio-card time {
  flex: 0 0 auto;
  color: #748f85;
  font-family: Consolas, monospace;
  font-size: 8px;
}

.finale-audio-toggle:focus-visible,
.finale-audio-progress:focus-visible {
  outline: 2px solid rgba(244, 205, 109, 0.78);
  outline-offset: 4px;
}

.finale-achievements {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #748d83;
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.finale-achievements b {
  color: #d8b35d;
  font-size: 10px;
}

.finale-achievements i {
  width: 18px;
  height: 1px;
  background: rgba(121, 151, 136, 0.4);
}

.finale-motto {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 9px 0 15px;
  color: #c7a454;
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.finale-motto i {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, #6e5430, #5b8978);
}

.finale-actions {
  justify-content: flex-start;
}

@keyframes finale-world-breathe {
  to { transform: scale(1.055) translate3d(-0.35%, -0.2%, 0); }
}

@keyframes finale-light-breathe {
  to { opacity: 0.7; filter: brightness(1.18); }
}

@keyframes finale-seed-rise {
  0% { opacity: 0; transform: translate3d(0, 25px, 0) scale(0.6); }
  24% { opacity: 0.95; }
  100% { opacity: 0; transform: translate3d(-36px, -190px, 0) scale(1.55); }
}

@keyframes finale-coda-emphasis {
  0% { transform: translateX(4px) scale(0.985); }
  55% { transform: translateX(7px) scale(1.018); text-shadow: 0 0 24px rgba(255, 216, 111, 0.42); }
  100% { transform: translateX(4px) scale(1); }
}

@keyframes finale-last-word-reveal {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  62% { transform: translateY(-2px) scale(1.14); filter: brightness(1.45); }
  100% { transform: translateY(0) scale(1.06); filter: brightness(1.18); }
}

@media (max-width: 900px) {
  .finale-background {
    background-position: 64% center;
  }

  .finale-background::before {
    background-position: 64% center;
  }

  .finale-background::after {
    background:
      linear-gradient(90deg, rgba(2, 8, 12, 0.96), rgba(2, 8, 12, 0.8) 58%, rgba(2, 8, 12, 0.34)),
      linear-gradient(0deg, rgba(1, 5, 8, 0.76), transparent 46%);
  }

  .finale-panel {
    padding: 22px;
  }

  .finale-copy {
    width: min(690px, 96vw);
  }
}

@media (max-height: 820px) and (min-width: 701px) {
  .finale-copy {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .finale-panel h2 {
    margin-bottom: 11px;
    font-size: clamp(34px, 4.5vw, 53px);
  }

  .finale-recitation p {
    margin-bottom: 5px;
    font-size: 12px;
    line-height: 1.42;
  }

  .finale-recitation .finale-coda { font-size: 16px; }
  .finale-recitation .finale-coda-strong { font-size: 18px; }
  .finale-audio-card { margin: 8px 0; }
  .finale-motto { margin: 6px 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .finale-background,
  .finale-background::before,
  .finale-overlay.is-narrating .finale-growth-glow i,
  .finale-coda-strong.is-current {
    animation: none;
  }
}

/* Responsive */

@media (max-width: 1120px) {
  .intro-brand > img {
    width: 160px;
  }

  .intro-layout {
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
    gap: 30px;
  }

  .film-frame {
    width: min(100%, 860px);
  }

  .scene-caption {
    max-width: 390px;
  }

  .player-sprite {
    transform: scale(0.86);
    transform-origin: bottom;
  }

  .task-bar {
    width: min(700px, 65vw);
  }

  .evidence-modal,
  .dossier-modal {
    grid-template-columns: 250px 1fr;
  }

  .evidence-person img,
  .dossier-character img {
    width: 300px;
  }
}

@media (max-width: 880px) {
  body {
    overflow: auto;
  }

  .intro-screen {
    min-height: 100svh;
  }

  .intro-brand > img {
    width: 138px;
    height: 46px;
  }

  .intro-layout {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 35px;
  }

  .intro-story {
    position: relative;
    z-index: 3;
  }

  .film-frame {
    justify-self: center;
    width: min(94vw, 850px);
  }

  .game-root {
    min-width: 780px;
  }

  .hud {
    grid-template-columns: 1fr auto;
  }

  .chapter-nav {
    order: 3;
    grid-column: 1 / -1;
    margin-top: 6px;
  }

  .game-root {
    grid-template-rows: 105px minmax(590px, 1fr) 58px;
  }

  .control-bar {
    grid-template-columns: 1fr auto;
  }

  .motto {
    display: none;
  }

  .evidence-modal,
  .dossier-modal {
    grid-template-columns: 215px 1fr;
  }

  .dossier-boundaries {
    grid-template-columns: 1fr;
  }

  .dossier-boundaries > i {
    display: none;
  }

  .challenge-modal {
    grid-template-columns: 190px 1fr;
  }
}

@media (max-height: 730px) and (min-width: 881px) {
  .game-root {
    grid-template-rows: 68px minmax(0, 1fr) 50px;
  }

  .hud-case strong {
    font-size: 18px;
  }

  .player-portrait {
    width: 44px;
    height: 44px;
  }

  .player-sprite {
    transform: scale(0.78);
    transform-origin: bottom;
  }

  .scene-caption {
    top: 2.5%;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .scene-caption strong {
    font-size: 21px;
  }

  .scene-caption p {
    display: none;
  }

  .task-bar {
    bottom: 8px;
  }

  .modal-backdrop {
    place-items: start center;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .dossier-modal {
    min-height: 0;
    grid-template-columns: 235px 1fr;
  }

  .dossier-character img {
    width: 278px;
    margin-bottom: 18px;
  }

  .dossier-content {
    padding: 24px 40px 22px;
  }

  .dossier-company-logo {
    width: 164px;
    height: 39px;
    margin-bottom: 8px;
  }

  .dossier-content h2 {
    font-size: 39px;
  }

  .dossier-role {
    margin-bottom: 9px;
  }

  .dossier-content > p:not(.modal-kicker):not(.dossier-role) {
    line-height: 1.52;
  }

  .dossier-boundaries {
    margin: 11px 0 12px;
  }

  .dossier-boundaries > span {
    min-height: 46px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .dossier-skills {
    gap: 7px;
    margin: 12px 0;
  }

  .dossier-skills span > i {
    width: 31px;
    height: 31px;
  }

  .dossier-content blockquote {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* v5 · walkable three-dimensional project room */

.room3d-shell {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 36%, rgba(36, 74, 70, 0.22), transparent 45%),
    #050a0c;
  isolation: isolate;
}

.room3d-shell.is-active {
  display: block;
}

.room3d-failed .room3d-shell {
  display: none !important;
}

#room3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  touch-action: none;
  cursor: grab;
}

#room3d-canvas:active {
  cursor: grabbing;
}

.room3d-loading {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  background:
    linear-gradient(rgba(5, 10, 12, 0.92), rgba(5, 10, 12, 0.96)),
    url("scene-investigation.png") center / cover;
  color: #dccb9f;
  text-align: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.room3d-loading::before,
.room3d-loading::after {
  content: "";
  position: absolute;
  inset: 8%;
  pointer-events: none;
  border: 1px solid rgba(205, 161, 76, 0.18);
  clip-path: polygon(0 0, 18% 0, 18% 1px, 1px 1px, 1px 18%, 0 18%, 0 0, 100% 0, 100% 18%, calc(100% - 1px) 18%, calc(100% - 1px) 1px, 82% 1px, 82% 0, 100% 0, 100% 100%, 82% 100%, 82% calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) 82%, 100% 82%, 100% 100%, 0 100%, 0 82%, 1px 82%, 1px calc(100% - 1px), 18% calc(100% - 1px), 18% 100%);
}

.room3d-loading::after {
  inset: 10%;
  border-color: rgba(79, 147, 137, 0.12);
}

.room3d-loading.is-complete {
  opacity: 0;
  visibility: hidden;
}

.room3d-loading.is-error {
  color: #d78d72;
}

.room3d-loading strong,
.room3d-loading small {
  display: block;
}

.room3d-loading strong {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 24px;
  letter-spacing: 0.08em;
}

.room3d-loading small {
  color: #66817a;
  font: 9px Georgia, serif;
  letter-spacing: 0.28em;
}

.room3d-loader {
  position: relative;
  width: 78px;
  height: 78px;
  margin-bottom: 11px;
}

.room3d-loader i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(213, 171, 82, 0.62);
  border-radius: 50%;
  animation: room3d-orbit 2.8s linear infinite;
}

.room3d-loader i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8ad55;
  box-shadow: 0 0 18px rgba(216, 173, 85, 0.9);
}

.room3d-loader i:nth-child(2) {
  inset: 12px;
  border-color: rgba(87, 166, 153, 0.72);
  animation-direction: reverse;
  animation-duration: 2.1s;
}

.room3d-loader i:nth-child(2)::after {
  background: #62a89d;
}

.room3d-loader i:nth-child(3) {
  inset: 27px;
  border-color: rgba(161, 72, 55, 0.82);
  animation-duration: 1.45s;
}

@keyframes room3d-orbit {
  to { transform: rotate(360deg); }
}

.room3d-hud {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.room3d-movement {
  position: absolute;
  left: 2.8%;
  top: clamp(116px, 18%, 164px);
  width: min(285px, 30vw);
  padding: 10px 13px 11px 17px;
  border-left: 2px solid rgba(79, 164, 150, 0.72);
  background: linear-gradient(90deg, rgba(5, 13, 15, 0.86), rgba(5, 13, 15, 0.42), transparent);
  text-shadow: 0 2px 9px #000;
}

.room3d-movement span,
.room3d-movement strong,
.room3d-movement small {
  display: block;
}

.room3d-movement span {
  color: #67aa9e;
  font: 8px Georgia, serif;
  letter-spacing: 0.24em;
}

.room3d-movement strong {
  margin: 3px 0;
  color: #ddd0ad;
  font-size: 12px;
}

.room3d-movement small {
  color: #758983;
  font-size: 8px;
  line-height: 1.55;
}

.room3d-reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  opacity: 0.58;
  transform: translate(-50%, -50%);
}

.room3d-reticle i {
  position: absolute;
  background: rgba(226, 211, 169, 0.78);
  box-shadow: 0 0 8px rgba(97, 176, 163, 0.48);
}

.room3d-reticle i:first-child {
  left: 13px;
  top: 4px;
  width: 1px;
  height: 20px;
}

.room3d-reticle i:last-child {
  left: 4px;
  top: 13px;
  width: 20px;
  height: 1px;
}

.room3d-reticle::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #d8c48e;
  border-radius: 50%;
  background: rgba(6, 15, 17, 0.6);
}

.room3d-interact {
  position: absolute;
  left: 50%;
  bottom: 48px;
  display: flex;
  align-items: center;
  min-width: 310px;
  padding: 9px 17px 10px 11px;
  border: 1px solid rgba(208, 165, 79, 0.66);
  border-radius: 5px 18px 5px 16px;
  background:
    linear-gradient(105deg, rgba(47, 29, 19, 0.97), rgba(7, 15, 17, 0.96) 48%, rgba(7, 15, 17, 0.84));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.62), inset 0 0 28px rgba(208, 160, 66, 0.06);
  color: #ddcda8;
  text-align: left;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: pointer;
  animation: interact-breathe 1.55s ease-in-out infinite alternate;
}

.room3d-interact:hover,
.room3d-interact:focus-visible {
  border-color: #efc86f;
  background: linear-gradient(105deg, rgba(82, 45, 23, 0.98), rgba(8, 19, 20, 0.98));
}

.room3d-interact > i {
  display: grid;
  flex: 0 0 42px;
  height: 42px;
  margin-right: 12px;
  place-items: center;
  border: 1px solid #d2a44d;
  border-radius: 5px 12px 5px 10px;
  background: #182624;
  color: #f2d27d;
  font: bold 19px Georgia, serif;
  font-style: normal;
  box-shadow: inset 0 0 14px rgba(76, 151, 140, 0.18);
}

.room3d-interact span,
.room3d-interact small,
.room3d-interact strong {
  display: block;
}

.room3d-interact small {
  margin-bottom: 2px;
  color: #75928a;
  font: 8px Georgia, serif;
  letter-spacing: 0.14em;
}

.room3d-interact strong {
  color: #eadab3;
  font-size: 12px;
}

.room3d-interact.is-ready {
  border-color: rgba(100, 187, 151, 0.86);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.66), 0 0 28px rgba(77, 161, 128, 0.18);
}

.room3d-interact.is-busy {
  opacity: 0.78;
  cursor: wait;
  animation-duration: 0.55s;
}

@keyframes interact-breathe {
  to { box-shadow: 0 16px 42px rgba(0, 0, 0, 0.72), 0 0 24px rgba(209, 163, 72, 0.14), inset 0 0 30px rgba(208, 160, 66, 0.1); }
}

.room3d-map {
  position: absolute;
  right: 19px;
  top: 19px;
  width: 220px;
  padding: 10px;
  border: 1px solid rgba(197, 156, 76, 0.42);
  border-radius: 4px 18px 5px 15px;
  background: rgba(5, 13, 15, 0.9);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.58), inset 0 0 28px rgba(41, 99, 91, 0.08);
  backdrop-filter: blur(9px);
  pointer-events: auto;
}

.map-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
  padding: 0 3px;
}

.map-title span {
  color: #b68a42;
  font: 8px Georgia, serif;
  letter-spacing: 0.18em;
}

.map-title strong {
  color: #d8c9a6;
  font-size: 10px;
}

.map-floor {
  position: relative;
  height: 154px;
  overflow: hidden;
  border: 1px solid rgba(92, 138, 129, 0.38);
  border-radius: 2px 9px 2px 8px;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(84, 131, 121, 0.12) 50%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(84, 131, 121, 0.12) 50%, transparent 50.5%),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(131, 170, 160, 0.055) 18px 19px),
    repeating-linear-gradient(90deg, transparent 0 20px, rgba(131, 170, 160, 0.055) 20px 21px),
    #0a191a;
}

.map-floor::before {
  content: "ENTRANCE";
  position: absolute;
  left: 50%;
  bottom: 3px;
  color: #49605b;
  font: 6px Georgia, serif;
  letter-spacing: 0.14em;
  transform: translateX(-50%);
}

.map-wall {
  position: absolute;
  background: rgba(201, 159, 78, 0.44);
}

.map-wall-a {
  left: 58%;
  top: 0;
  width: 2px;
  height: 39%;
}

.map-wall-b {
  left: 18%;
  top: 64%;
  width: 34%;
  height: 2px;
}

.map-node {
  position: absolute;
  display: grid;
  grid-template-columns: 22px auto;
  align-items: center;
  min-width: 54px;
  height: 24px;
  padding: 0 7px 0 3px;
  border: 1px solid rgba(153, 117, 60, 0.5);
  border-radius: 3px 8px 3px 7px;
  background: rgba(19, 28, 27, 0.94);
  color: #9c8a68;
  font-size: 7px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.map-node:hover,
.map-node:focus-visible {
  z-index: 4;
  border-color: #d2a44d;
  background: #22332f;
  color: #eed49a;
}

.map-node b {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #4a2b22;
  color: #d7a759;
  font: bold 7px Georgia, serif;
}

.map-node.is-complete {
  border-color: rgba(83, 163, 130, 0.74);
  color: #add0bf;
}

.map-node.is-complete b {
  background: #244c3f;
  color: #bce6d1;
}

.map-node.is-complete b::after {
  content: "✓";
  position: absolute;
  transform: translate(5px, -6px);
}

.node-market { left: 24%; top: 43%; }
.node-sales { left: 22%; top: 78%; }
.node-factory { left: 51%; top: 14%; }
.node-application { left: 67%; top: 56%; }
.node-door { left: 86%; top: 15%; }

.map-player {
  --map-bearing: 0rad;
  position: absolute;
  left: 50%;
  top: 88%;
  z-index: 8;
  width: 13px;
  height: 13px;
  border: 2px solid #f2d27b;
  border-radius: 50%;
  background: #396f67;
  box-shadow: 0 0 0 4px rgba(72, 139, 128, 0.17), 0 0 13px rgba(117, 199, 184, 0.76);
  transform: translate(-50%, -50%);
  transition: left 0.08s linear, top 0.08s linear;
}

.map-player i {
  position: absolute;
  left: 50%;
  top: -9px;
  width: 0;
  height: 0;
  border-right: 3px solid transparent;
  border-bottom: 7px solid #f2d27b;
  border-left: 3px solid transparent;
  transform: translateX(-50%) rotate(var(--map-bearing));
  transform-origin: 50% 15px;
}

.room3d-map > p {
  overflow: hidden;
  margin: 7px 2px 0;
  color: #718983;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room3d-navpad {
  position: absolute;
  left: 22px;
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(3, 34px);
  grid-template-rows: repeat(2, 34px);
  gap: 4px;
  pointer-events: auto;
}

.room3d-navpad button {
  border: 1px solid rgba(202, 163, 82, 0.5);
  border-radius: 4px 9px 4px 8px;
  background: rgba(6, 15, 17, 0.84);
  color: #bca675;
  font-size: 10px;
  cursor: pointer;
  user-select: none;
}

.room3d-navpad button:hover,
.room3d-navpad button:active {
  border-color: #e1bc69;
  background: rgba(39, 69, 63, 0.94);
  color: #f1d995;
}

.room3d-navpad button:nth-child(1) { grid-column: 2; }
.room3d-navpad button:nth-child(2) { grid-column: 1; grid-row: 2; }
.room3d-navpad button:nth-child(3) { grid-column: 2; grid-row: 2; }
.room3d-navpad button:nth-child(4) { grid-column: 3; grid-row: 2; }

.room3d-arrival {
  position: absolute;
  left: 50%;
  top: 22%;
  display: grid;
  min-width: 190px;
  justify-items: center;
  padding: 10px 22px;
  border-top: 1px solid rgba(210, 166, 77, 0.68);
  border-bottom: 1px solid rgba(210, 166, 77, 0.68);
  background: linear-gradient(90deg, transparent, rgba(5, 13, 15, 0.86) 18% 82%, transparent);
  text-shadow: 0 3px 12px #000;
  transform: translateX(-50%);
  animation: arrival-in 0.4s ease-out both;
}

.room3d-arrival span {
  color: #65aa9d;
  font: 8px Georgia, serif;
  letter-spacing: 0.32em;
}

.room3d-arrival strong {
  margin-top: 3px;
  color: #ead9ae;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
}

@keyframes arrival-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
}

.room3d-enabled .scene-investigation > .scene-art,
.room3d-enabled .scene-investigation > .scene-vignette,
.room3d-enabled .scene-investigation > .world-hotspot,
.room3d-enabled .scene-investigation > .lab-door,
.room3d-enabled .scene-investigation > .player-investigation {
  visibility: hidden;
  pointer-events: none;
}

.room3d-enabled .scene-investigation::after {
  z-index: 20;
  opacity: 0.035;
}

.room3d-enabled .scene-investigation .scene-caption {
  z-index: 35;
  pointer-events: none;
}

@media (max-width: 900px) {
  .room3d-map {
    right: 10px;
    top: 10px;
    width: 185px;
    transform: scale(0.9);
    transform-origin: right top;
  }

  .room3d-movement {
    display: none;
  }

  .room3d-interact {
    bottom: 22px;
    min-width: min(300px, 62vw);
  }

  .room3d-navpad {
    left: 12px;
    bottom: 16px;
  }
}

@media (max-width: 620px) {
  .room3d-map {
    width: 156px;
    transform: scale(0.82);
  }

  .room3d-interact {
    left: auto;
    right: 9px;
    bottom: 12px;
    min-width: 0;
    width: calc(100% - 142px);
    padding-right: 9px;
    transform: none;
  }

  .room3d-interact > i {
    flex-basis: 34px;
    height: 34px;
  }

  .room3d-interact strong {
    font-size: 10px;
  }

  .room3d-reticle {
    display: none;
  }
}

/* ================================================================
   B7 integrated presentation: prologue film, proof gate, next steps
   ================================================================ */

.prologue-screen {
  position: fixed;
  z-index: 400;
  inset: 0;
  display: grid;
  min-height: 100vh;
  grid-template-rows: 78px minmax(0, 1fr) 38px;
  isolation: isolate;
  background: #03080a;
  transition: opacity 0.7s ease, filter 0.7s ease, transform 0.7s ease;
}

.prologue-screen.is-entering {
  opacity: 0;
  filter: brightness(2.1) blur(7px);
  transform: scale(1.035);
  pointer-events: none;
}

.prologue-backdrop {
  position: absolute;
  z-index: -3;
  inset: -4%;
  background:
    linear-gradient(90deg, rgba(2, 6, 8, 0.98) 0 27%, rgba(3, 8, 10, 0.74) 49%, rgba(2, 6, 8, 0.96) 100%),
    linear-gradient(0deg, #020607 0 8%, transparent 46%),
    url("scene-investigation.png") center / cover no-repeat;
  filter: saturate(0.62) contrast(1.14) brightness(0.58);
  animation: b7-prologue-drift 18s ease-in-out infinite alternate;
}

.prologue-backdrop::before,
.prologue-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.prologue-backdrop::before {
  opacity: 0.48;
  background:
    linear-gradient(90deg, transparent 49.86%, rgba(218, 175, 84, 0.24) 49.95% 50.02%, transparent 50.12%),
    repeating-linear-gradient(90deg, transparent 0 9.9vw, rgba(111, 151, 139, 0.045) 10vw 10.05vw);
}

.prologue-backdrop::after {
  background: radial-gradient(ellipse at 69% 48%, rgba(56, 133, 119, 0.19), transparent 36%);
}

@keyframes b7-prologue-drift {
  to { transform: scale(1.035) translate3d(-0.8%, -0.4%, 0); }
}

.prologue-header,
.prologue-footer {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: rgba(207, 169, 83, 0.2);
  background: linear-gradient(90deg, rgba(3, 8, 10, 0.94), rgba(3, 8, 10, 0.58), rgba(3, 8, 10, 0.94));
}

.prologue-header {
  padding: 12px clamp(24px, 3.5vw, 68px);
  border-bottom: 1px solid rgba(207, 169, 83, 0.2);
}

.prologue-header .intro-brand > img {
  width: 174px;
  height: 46px;
}

.prologue-header > p {
  margin: 0;
  color: #788e85;
  font: 700 9px/1.2 Georgia, serif;
  letter-spacing: 0.34em;
}

.prologue-layout {
  position: relative;
  z-index: 5;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(280px, 0.38fr) minmax(600px, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px clamp(28px, 4vw, 74px);
  padding: clamp(22px, 3.4vh, 50px) clamp(24px, 4vw, 78px) 22px;
}

.prologue-copy {
  align-self: center;
  max-width: 520px;
}

.prologue-copy h1 {
  margin: 16px 0 22px;
  color: #ecd9aa;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(48px, 5.2vw, 92px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.88;
  text-shadow: 0 18px 48px #000, 3px 3px 0 rgba(120, 45, 34, 0.72);
}

.prologue-copy > p:not(.kicker) {
  max-width: 440px;
  margin: 0;
  color: #9aaba4;
  font-size: 13px;
  line-height: 1.9;
}

.prologue-route {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

.prologue-route > span {
  display: grid;
  gap: 4px;
  color: #62756e;
  font-size: 9px;
  white-space: nowrap;
}

.prologue-route > span b {
  color: #94733e;
  font: 700 9px Georgia, serif;
  letter-spacing: 0.13em;
}

.prologue-route > span.is-current {
  color: #ddc78e;
}

.prologue-route > span.is-current b {
  color: #edbd58;
}

.prologue-route > i {
  height: 1px;
  background: linear-gradient(90deg, #866a39, rgba(82, 111, 102, 0.32));
}

.prologue-player {
  --film-progress: 0%;
  justify-self: stretch;
  width: min(100%, 1180px);
  max-height: calc(100vh - 185px);
  border-radius: 8px 56px 8px 30px;
  border-color: rgba(213, 168, 74, 0.62);
  background: #010405;
  box-shadow:
    0 42px 110px rgba(0, 0, 0, 0.82),
    18px 18px 0 rgba(2, 7, 9, 0.48),
    inset 0 0 0 7px #0a1517,
    inset 0 0 80px #000;
  transform: perspective(1500px) rotateY(-2deg);
}

.prologue-player.is-pseudo-fullscreen,
.prologue-player:fullscreen,
.prologue-player:-webkit-full-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
  transform: none;
}

.has-prologue-fullscreen,
.has-prologue-fullscreen body {
  overflow: hidden;
}

.prologue-player.is-pseudo-fullscreen::before,
.prologue-player.is-pseudo-fullscreen::after,
.prologue-player:fullscreen::before,
.prologue-player:fullscreen::after,
.prologue-player:-webkit-full-screen::before,
.prologue-player:-webkit-full-screen::after {
  display: none;
}

.prologue-player.is-pseudo-fullscreen video,
.prologue-player.is-pseudo-fullscreen .prologue-placeholder,
.prologue-player:fullscreen video,
.prologue-player:-webkit-full-screen video,
.prologue-player:fullscreen .prologue-placeholder,
.prologue-player:-webkit-full-screen .prologue-placeholder {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
}

.prologue-player::before {
  inset: 11px;
  z-index: 20;
  border-color: rgba(117, 156, 143, 0.38);
}

.prologue-player::after {
  content: "";
  position: absolute;
  z-index: 19;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(255, 255, 255, 0.035) 4px 5px);
  mix-blend-mode: soft-light;
}

.prologue-player video {
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  border-radius: 3px 46px 3px 22px;
  object-fit: cover;
}

.prologue-placeholder {
  inset: 12px;
  border-radius: 3px 46px 3px 22px;
  background:
    linear-gradient(180deg, rgba(4, 12, 16, 0.05), rgba(2, 7, 9, 0.78)),
    radial-gradient(circle at 75% 22%, rgba(219, 177, 79, 0.22), transparent 28%),
    linear-gradient(155deg, #0f2528 0 38%, #071113 38% 100%);
}

.prologue-placeholder::after {
  z-index: 10;
  background:
    linear-gradient(90deg, rgba(1, 4, 5, 0.48), transparent 24% 72%, rgba(1, 4, 5, 0.5)),
    linear-gradient(0deg, rgba(1, 4, 5, 0.78), transparent 46%);
}

.placeholder-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.placeholder-sky::before {
  content: "";
  position: absolute;
  left: -15%;
  right: -15%;
  bottom: -27%;
  height: 56%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(ellipse at 50% 0, rgba(57, 101, 91, 0.42), transparent 56%),
    repeating-linear-gradient(93deg, #0a1719 0 50px, #0d2022 51px 54px);
  transform: rotate(-2deg);
}

.placeholder-sky > i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #e7c773;
  box-shadow: 130px 42px #9bb7ad, 290px 88px #d8b45d, 460px 30px #92aea5, 670px 74px #d8b45d;
  opacity: 0.5;
}

.placeholder-sky > i:nth-child(1) { left: 7%; top: 14%; }
.placeholder-sky > i:nth-child(2) { left: 35%; top: 7%; transform: scale(0.7); }
.placeholder-sky > i:nth-child(3) { left: 54%; top: 20%; transform: scale(1.3); }

.placeholder-building {
  position: absolute;
  z-index: 2;
  right: 16%;
  bottom: 17%;
  width: 37%;
  height: 48%;
  border: 1px solid rgba(198, 165, 86, 0.45);
  clip-path: polygon(13% 0, 100% 0, 100% 100%, 0 100%, 0 12%);
  background:
    repeating-linear-gradient(90deg, transparent 0 15%, rgba(119, 161, 148, 0.17) 15.5% 16.5%),
    repeating-linear-gradient(0deg, transparent 0 17%, rgba(119, 161, 148, 0.16) 17.5% 19%),
    linear-gradient(145deg, #192c2e, #071012);
  box-shadow: -24px 23px 44px rgba(0, 0, 0, 0.62);
}

.placeholder-building::before {
  content: "TOP-UNISTAR";
  position: absolute;
  left: 10%;
  top: 9%;
  color: #c2a35d;
  font: 700 clamp(6px, 0.7vw, 11px) Georgia, serif;
  letter-spacing: 0.18em;
}

.placeholder-building span {
  position: absolute;
  right: 9%;
  bottom: 8%;
  color: rgba(226, 192, 104, 0.76);
  font: 900 clamp(28px, 4vw, 70px)/1 Georgia, serif;
}

.placeholder-building > i {
  position: absolute;
  left: 8%;
  bottom: 0;
  width: 18%;
  height: 23%;
  border: 1px solid rgba(222, 181, 86, 0.6);
  background: #020607;
  box-shadow: 0 0 22px rgba(206, 159, 65, 0.22);
}

.prologue-placeholder .placeholder-jay {
  position: absolute;
  z-index: 7;
  left: 9%;
  top: -36%;
  width: clamp(68px, 11%, 145px);
  max-height: 54%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.92));
  animation: none;
  transform-origin: 50% 100%;
}

.prologue-player.is-placeholder-playing .placeholder-jay {
  animation: b7-jay-route 6.2s cubic-bezier(0.47, 0.03, 0.28, 1) both;
}

@keyframes b7-jay-route {
  0% { left: 9%; top: -36%; transform: rotate(16deg) scale(0.82); opacity: 0; }
  7% { opacity: 1; }
  28% { left: 18%; top: 48%; transform: rotate(-4deg) scale(0.96); }
  34% { left: 18%; top: 44%; transform: rotate(2deg) scale(0.96); }
  45% { left: 35%; top: 51%; transform: rotate(7deg) scale(0.9) scaleX(1); }
  58% { left: 61%; top: 43%; transform: rotate(-5deg) scale(0.78) scaleX(1); }
  67% { left: 72%; top: 38%; transform: rotate(1deg) scale(0.69) scaleX(-1); }
  79% { left: 48%; top: 49%; transform: rotate(-6deg) scale(0.88) scaleX(-1); }
  91% { left: 22%; top: 48%; transform: rotate(0) scale(0.98); }
  100% { left: 18%; top: 45%; transform: rotate(0) scale(0.98); opacity: 1; }
}

.placeholder-door {
  position: absolute;
  z-index: 6;
  left: 14.5%;
  bottom: 13%;
  width: 10%;
  height: 25%;
  border: 2px solid #79613a;
  border-radius: 45% 45% 3px 3px / 17% 17% 3px 3px;
  background: linear-gradient(90deg, #071012 49%, #152425 50%);
  box-shadow: 0 0 0 5px rgba(5, 12, 14, 0.78), 0 0 28px rgba(226, 180, 75, 0.16);
}

.placeholder-door > i {
  position: absolute;
  inset: 46% 48% auto;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f1c968;
  box-shadow: 0 0 10px #e8b957;
}

.prologue-player.is-placeholder-playing .placeholder-door {
  animation: b7-door-arrival 6.2s ease both;
}

@keyframes b7-door-arrival {
  0%, 84% { filter: brightness(0.7); }
  92%, 100% { filter: brightness(1.8); box-shadow: 0 0 0 5px rgba(5, 12, 14, 0.78), 0 0 52px rgba(237, 189, 83, 0.62); }
}

.prologue-player-shade {
  position: absolute;
  z-index: 11;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, transparent 0 29%, rgba(0, 0, 0, 0.46) 92%);
}

.prologue-play,
.evidence-play {
  position: absolute;
  z-index: 24;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 220px;
  padding: 13px 18px;
  border: 1px solid rgba(228, 187, 90, 0.7);
  border-radius: 4px 18px 4px 13px;
  background: rgba(4, 10, 12, 0.89);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 0 24px rgba(211, 167, 70, 0.08);
  cursor: pointer;
  text-align: left;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

.prologue-play:hover,
.evidence-play:hover {
  filter: brightness(1.18);
  transform: translate(-50%, calc(-50% - 4px));
}

.prologue-play > i,
.evidence-play > i {
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  border: 1px solid #d4aa53;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 154, 63, 0.18), transparent 70%);
}

.prologue-play > i::after,
.evidence-play > i::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 13px 0 0 17px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #e4c06d;
}

.prologue-play small,
.prologue-play strong,
.evidence-play span {
  display: block;
}

.prologue-play small {
  color: #9b7940;
  font: 700 8px Georgia, serif;
  letter-spacing: 0.16em;
}

.prologue-play strong,
.evidence-play span {
  margin-top: 3px;
  color: #e8d5a7;
  font-size: 15px;
}

.prologue-player.is-playing .prologue-play,
.evidence-screen.is-playing .evidence-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -45%) scale(0.93);
}

.prologue-progress {
  position: absolute;
  z-index: 23;
  left: 4%;
  right: 4%;
  bottom: 4.5%;
  height: 2px;
  overflow: hidden;
  background: rgba(182, 202, 194, 0.18);
}

.prologue-progress > i {
  display: block;
  width: var(--film-progress);
  height: 100%;
  background: linear-gradient(90deg, #98653c, #f3cd6c);
  box-shadow: 0 0 15px #dba94d;
}

.prologue-player.is-placeholder-playing .prologue-progress > i {
  animation: b7-placeholder-progress 6.8s linear both;
}

@keyframes b7-placeholder-progress { to { width: 100%; } }

.prologue-player .film-status {
  z-index: 18;
  left: auto;
  right: 4%;
  bottom: 7%;
  min-width: 245px;
  transform: none;
}

.film-number {
  position: absolute;
  z-index: 22;
  left: 4%;
  top: 5%;
  padding: 6px 9px;
  border-left: 2px solid #b88c42;
  background: rgba(3, 8, 10, 0.68);
  color: #c8a65d;
  font: 700 9px Georgia, serif;
  letter-spacing: 0.18em;
}

.prologue-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.prologue-actions .action-ghost {
  display: grid;
  min-width: 226px;
  padding: 9px 14px;
}

.prologue-actions .action-ghost span {
  color: #667c74;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.prologue-actions .action-ghost strong {
  margin-top: 2px;
  color: #b9c6c0;
  font-size: 12px;
}

.prologue-actions > small {
  max-width: 300px;
  color: #5c7069;
  font-size: 9px;
  line-height: 1.6;
}

.prologue-footer {
  padding: 0 clamp(24px, 3.5vw, 68px);
  border-top: 1px solid rgba(207, 169, 83, 0.15);
  color: #596b65;
  font-size: 9px;
  letter-spacing: 0.11em;
}

.prologue-footer a {
  color: #8fa099;
  text-decoration: none;
}

/* Proof gate */

.proof-gate-overlay,
.staircase-overlay,
.evidence-film-overlay {
  position: fixed;
  inset: 0;
  overflow: hidden;
  animation: fade-in 0.55s ease both;
}

.proof-gate-overlay {
  z-index: 610;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: clamp(22px, 3.5vh, 46px) clamp(24px, 4vw, 72px) clamp(20px, 3vh, 40px);
  background: #030607;
}

.proof-world {
  position: absolute;
  z-index: -2;
  inset: -4%;
  background:
    linear-gradient(90deg, rgba(2, 5, 6, 0.97) 0 16%, rgba(2, 5, 6, 0.46) 49%, rgba(2, 5, 6, 0.93) 100%),
    linear-gradient(0deg, #020405 0 8%, transparent 55%),
    url("scene-vault.png") center / cover no-repeat;
  filter: grayscale(0.35) saturate(0.62) brightness(0.47) contrast(1.18);
  transform: scale(1.05);
}

.proof-gate-overlay::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.4;
  background:
    radial-gradient(ellipse at 40% 54%, rgba(45, 105, 94, 0.24), transparent 36%),
    repeating-linear-gradient(90deg, transparent 0 12vw, rgba(208, 169, 81, 0.028) 12.05vw 12.1vw);
}

.proof-header {
  position: relative;
  z-index: 5;
  max-width: 920px;
  padding-left: 18px;
  border-left: 3px solid #a6783c;
}

.proof-header p,
.staircase-copy > p,
.evidence-film-shell > header > p {
  margin: 0 0 8px;
  color: #a78145;
  font: 700 9px Georgia, serif;
  letter-spacing: 0.27em;
}

.proof-header h2 {
  display: inline-block;
  margin: 0 18px 0 0;
  color: #e8d5aa;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(40px, 4.2vw, 72px);
  line-height: 0.92;
  text-shadow: 0 12px 35px #000;
}

.proof-header > span {
  display: inline-block;
  max-width: 550px;
  color: #82958e;
  font-size: 12px;
  line-height: 1.7;
  vertical-align: bottom;
}

.proof-layout {
  position: relative;
  z-index: 3;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(480px, 1fr) minmax(330px, 430px);
  align-items: center;
  gap: clamp(32px, 5vw, 90px);
}

.proof-door-zone {
  display: grid;
  min-height: 0;
  justify-items: center;
  align-content: center;
}

.proof-gate {
  position: relative;
  width: min(43vw, 510px);
  aspect-ratio: 0.84;
  overflow: hidden;
  border: clamp(12px, 1.4vw, 22px) solid #202726;
  border-bottom-width: clamp(17px, 1.8vw, 28px);
  border-radius: 48% 48% 5px 5px / 19% 19% 5px 5px;
  background: #05090a;
  box-shadow:
    0 42px 70px rgba(0, 0, 0, 0.78),
    0 0 0 2px #766343,
    0 0 0 12px rgba(8, 13, 14, 0.78),
    inset 0 0 70px #000;
  perspective: 1300px;
  transition: filter 0.5s ease, box-shadow 0.7s ease;
}

.proof-gate::before {
  content: "";
  position: absolute;
  z-index: 20;
  inset: -15px;
  pointer-events: none;
  border: 1px solid rgba(205, 167, 86, 0.32);
  border-radius: inherit;
  background:
    repeating-linear-gradient(0deg, transparent 0 78px, rgba(211, 181, 112, 0.08) 79px 81px),
    repeating-linear-gradient(90deg, transparent 0 96px, rgba(0, 0, 0, 0.22) 97px 100px);
  mix-blend-mode: screen;
}

.gate-glow {
  position: absolute;
  z-index: 1;
  inset: 8%;
  border-radius: 45% 45% 0 0 / 16% 16% 0 0;
  opacity: 0.28;
  background: radial-gradient(ellipse at 50% 55%, rgba(78, 151, 135, 0.38), transparent 58%);
  transition: opacity 0.6s ease, filter 0.6s ease;
}

.gate-leaf {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: 50.35%;
  overflow: hidden;
  border-color: rgba(199, 167, 101, 0.3);
  background:
    radial-gradient(circle at 50% 46%, rgba(183, 153, 94, 0.09), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 3px, transparent 4px 71px),
    linear-gradient(112deg, #343b39, #161c1c 48%, #252c2b);
  box-shadow: inset 0 0 45px #080b0c, inset 0 0 0 1px rgba(230, 197, 126, 0.09);
  transition: transform 1.8s cubic-bezier(0.65, 0, 0.22, 1), filter 1s ease;
}

.gate-left {
  left: 0;
  border-right: 2px solid rgba(4, 7, 8, 0.96);
  transform-origin: left center;
}

.gate-right {
  right: 0;
  border-left: 2px solid rgba(126, 102, 60, 0.35);
  transform-origin: right center;
}

.gate-leaf::before,
.gate-leaf::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(197, 164, 96, 0.22);
  border-radius: 50%;
}

.gate-leaf::before {
  width: 78%;
  aspect-ratio: 1;
  top: 23%;
}

.gate-left::before { right: -39%; }
.gate-right::before { left: -39%; }

.gate-leaf::after {
  width: 42%;
  aspect-ratio: 1;
  top: 36%;
  background: repeating-conic-gradient(from 0deg, rgba(196, 157, 79, 0.25) 0 5deg, transparent 5deg 28deg);
}

.gate-left::after { right: -21%; }
.gate-right::after { left: -21%; }

.gate-leaf > i {
  position: absolute;
  top: 7%;
  bottom: 7%;
  width: 2px;
  background: linear-gradient(transparent, rgba(202, 169, 99, 0.25), transparent);
}

.gate-left > i { left: 15%; }
.gate-right > i { right: 15%; }

.gate-leaf > b {
  position: absolute;
  top: 49%;
  width: 26px;
  height: 44px;
  border: 1px solid #856d42;
  background: #111718;
  box-shadow: 0 0 22px rgba(211, 168, 79, 0.12);
}

.gate-left > b { right: 13px; border-radius: 50% 3px 3px 50%; }
.gate-right > b { left: 13px; border-radius: 3px 50% 50% 3px; }

.gate-inscription {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 28%;
  display: grid;
  min-width: 64%;
  justify-items: center;
  padding: 13px 18px;
  border-top: 1px solid rgba(215, 175, 85, 0.5);
  border-bottom: 1px solid rgba(215, 175, 85, 0.5);
  background: rgba(7, 12, 13, 0.7);
  text-align: center;
  text-shadow: 0 4px 12px #000;
  transform: translateX(-50%);
  transition: opacity 0.5s ease;
}

.gate-inscription small {
  color: #9c7e46;
  font: 700 8px Georgia, serif;
  letter-spacing: 0.2em;
}

.gate-inscription strong {
  margin-top: 5px;
  color: #ddcba1;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(15px, 1.5vw, 22px);
}

.gate-lock {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: 12%;
  display: grid;
  width: 104px;
  aspect-ratio: 1;
  place-content: center;
  border: 1px solid #8c713f;
  border-radius: 50%;
  background: radial-gradient(circle, #25302e, #070c0d 72%);
  box-shadow: 0 0 0 8px rgba(10, 16, 16, 0.82), 0 0 35px rgba(206, 163, 73, 0.17);
  text-align: center;
  transform: translateX(-50%);
  transition: opacity 0.5s ease, transform 0.7s ease;
}

.gate-lock span,
.gate-lock small {
  display: block;
}

.gate-lock span {
  color: #e0bd69;
  font: 700 22px Georgia, serif;
}

.gate-lock small {
  margin-top: 3px;
  color: #778c84;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.gate-fractures {
  position: absolute;
  z-index: 11;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.fracture {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.fracture > span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(7px, 0.72vw, 10px);
  height: var(--h);
  opacity: 0;
  clip-path: polygon(30% 0, 78% 0, 100% 17%, 67% 37%, 94% 58%, 64% 73%, 83% 100%, 31% 100%, 48% 77%, 7% 62%, 40% 39%, 0 18%);
  background: linear-gradient(90deg, #8e846f 0 17%, #282922 18% 27%, #020405 29% 70%, #4f4d42 73% 87%, #9e8b67 88% 100%);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.82), -1px 0 0 rgba(188, 167, 121, 0.28);
  filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.86));
  transform: rotate(var(--r)) scaleY(0);
  transform-origin: 50% 0;
}

.fracture > span::after {
  content: "";
  position: absolute;
  left: 48%;
  top: 2%;
  bottom: 3%;
  width: 1px;
  opacity: 0.42;
  background: linear-gradient(transparent, #c4974d 18%, #5f472d 74%, transparent);
}

.fracture > span.is-branch {
  width: clamp(4px, 0.45vw, 7px);
  background: linear-gradient(90deg, #756e60 0 16%, #090b0b 22% 70%, #47463f 77% 100%);
}

.fracture > b {
  position: absolute;
  width: clamp(30px, 3.1vw, 44px);
  aspect-ratio: 1;
  opacity: 0;
  clip-path: polygon(50% 0, 65% 28%, 93% 15%, 77% 43%, 100% 57%, 69% 61%, 83% 94%, 55% 72%, 38% 100%, 34% 67%, 3% 83%, 24% 54%, 0 35%, 34% 38%);
  background: radial-gradient(circle, #010303 0 17%, #302f29 19% 32%, #786d58 35% 45%, transparent 48%);
  filter: drop-shadow(0 2px 2px #000);
  transform: scale(0.18) rotate(-16deg);
}

.fracture-one > b { left: 40%; top: 11%; }
.fracture-two > b { left: 63%; top: 14%; transform: scale(0.18) rotate(17deg); }
.fracture-three > b { left: 48%; top: 16%; }

.fracture::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 46% 54% 60% 40%;
  opacity: 0;
  background: #827662;
  box-shadow: -18px 8px 0 1px #393a34, 24px 17px 0 #766a55, -31px 30px 0 #222521, 39px 37px 0 1px #554f43, 4px 49px 0 #918168;
}

.fracture-one::after { left: 44%; top: 15%; }
.fracture-two::after { left: 68%; top: 18%; }
.fracture-three::after { left: 52%; top: 20%; }

.proof-gate.cracks-1 .fracture-one,
.proof-gate.cracks-2 .fracture-two,
.proof-gate.cracks-3 .fracture-three {
  opacity: 1;
}

.proof-gate.cracks-1 .fracture-one > span,
.proof-gate.cracks-2 .fracture-two > span,
.proof-gate.cracks-3 .fracture-three > span {
  animation: b7-fissure-grow 0.62s cubic-bezier(0.16, 0.74, 0.21, 1) var(--d) both;
}

.proof-gate.cracks-1 .fracture-one > b,
.proof-gate.cracks-2 .fracture-two > b,
.proof-gate.cracks-3 .fracture-three > b {
  animation: b7-fracture-impact 0.48s ease-out both;
}

.proof-gate.cracks-1 .fracture-one::after,
.proof-gate.cracks-2 .fracture-two::after,
.proof-gate.cracks-3 .fracture-three::after {
  animation: b7-stone-chips 0.75s ease-out 0.14s both;
}

@keyframes b7-fissure-grow {
  0% { opacity: 0; transform: rotate(var(--r)) scaleY(0); filter: brightness(1.8) drop-shadow(0 0 5px rgba(218, 174, 80, 0.5)); }
  24% { opacity: 1; }
  100% { opacity: 1; transform: rotate(var(--r)) scaleY(1); filter: brightness(1) drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.86)); }
}

@keyframes b7-fracture-impact {
  0% { opacity: 0; transform: scale(0.18) rotate(-16deg); }
  62% { opacity: 1; transform: scale(1.2) rotate(5deg); }
  100% { opacity: 0.92; transform: scale(1) rotate(0); }
}

@keyframes b7-stone-chips {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(-6px, 24px) rotate(32deg) scale(1); }
}

.push-hands-layer {
  position: absolute;
  z-index: 32;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.push-hands-layer img {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: -2%;
  width: 138%;
  max-width: none;
  opacity: 0;
  user-select: none;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.9));
  transform: translate(-50%, 92%) scale(0.96);
  transform-origin: 50% 100%;
}

.push-pressure {
  position: absolute;
  z-index: 2;
  top: 45%;
  width: 74px;
  aspect-ratio: 1;
  border: 2px solid rgba(202, 177, 118, 0.62);
  border-radius: 50%;
  opacity: 0;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.72), 0 0 17px rgba(209, 173, 91, 0.28);
  transform: translate(-50%, -50%) scale(0.2);
}

.push-pressure::before,
.push-pressure::after {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(140, 127, 96, 0.42);
  border-radius: 50%;
}

.push-pressure::after { inset: -24px; opacity: 0.48; }
.pressure-left { left: 26%; }
.pressure-right { left: 74%; }

.proof-gate.is-pushing .push-hands-layer { opacity: 1; }
.proof-gate.is-pushing .push-hands-layer img { animation: b7-hands-push 2.35s cubic-bezier(0.22, 0.75, 0.2, 1) both; }
.proof-gate.is-pushing .push-pressure { animation: b7-push-pressure 1.5s ease-out 0.48s both; }
.proof-gate.is-pushing .gate-left { animation: b7-leaf-resist-left 2.35s ease both; }
.proof-gate.is-pushing .gate-right { animation: b7-leaf-resist-right 2.35s ease both; }

@keyframes b7-hands-push {
  0% { opacity: 0; transform: translate(-50%, 92%) scale(0.96); }
  18% { opacity: 1; transform: translate(-50%, 8%) scale(0.98); }
  27% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  36% { transform: translate(-49.2%, -1%) scale(1.018); }
  43% { transform: translate(-50.8%, 0) scale(1.024); }
  51% { transform: translate(-49.4%, -1.3%) scale(1.028); }
  60% { transform: translate(-50.7%, 0) scale(1.03); }
  70% { opacity: 1; transform: translate(-50%, -1%) scale(1.032); }
  82% { opacity: 1; transform: translate(-50%, 7%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, 92%) scale(0.96); }
}

@keyframes b7-push-pressure {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  22% { opacity: 0.76; transform: translate(-50%, -50%) scale(0.72); }
  72% { opacity: 0.38; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.55); }
}

@keyframes b7-leaf-resist-left {
  0%, 22%, 100% { transform: translateX(0); }
  37% { transform: translateX(-2px); }
  46% { transform: translateX(1px); }
  57% { transform: translateX(-3px); }
  70% { transform: translateX(0); }
}

@keyframes b7-leaf-resist-right {
  0%, 22%, 100% { transform: translateX(0); }
  37% { transform: translateX(2px); }
  46% { transform: translateX(-1px); }
  57% { transform: translateX(3px); }
  70% { transform: translateX(0); }
}

.proof-gate.is-rejected {
  animation: b7-gate-refuse 0.62s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.proof-gate.is-straining {
  box-shadow:
    0 42px 70px rgba(0, 0, 0, 0.82),
    0 0 0 2px #8e7650,
    0 0 0 12px rgba(8, 13, 14, 0.84),
    inset 0 0 78px #000,
    0 0 34px rgba(171, 137, 78, 0.22);
}

@keyframes b7-gate-refuse {
  12%, 88% { transform: translateX(-4px); }
  26%, 74% { transform: translateX(7px); }
  42%, 58% { transform: translateX(-9px); filter: brightness(1.18); }
}

.proof-gate.is-cracking {
  animation: b7-gate-crack 0.95s ease both;
}

@keyframes b7-gate-crack {
  0%, 100% { filter: brightness(1); transform: translate(0, 0); }
  18% { transform: translate(-3px, 1px); }
  31% { filter: brightness(1.28); transform: translate(4px, -1px); box-shadow: 0 42px 70px rgba(0, 0, 0, 0.78), 0 0 0 2px #9c7d49, 0 0 42px rgba(197, 153, 67, 0.28); }
  49% { transform: translate(-2px, 0); }
}

.proof-gate.is-open {
  box-shadow: 0 42px 70px rgba(0, 0, 0, 0.78), 0 0 0 2px #b68d42, 0 0 100px rgba(238, 194, 84, 0.5), inset 0 0 90px #f0c663;
}

.proof-gate.is-open .gate-left { transform: perspective(1000px) rotateY(-82deg); filter: brightness(1.3); }
.proof-gate.is-open .gate-right { transform: perspective(1000px) rotateY(82deg); filter: brightness(1.3); }
.proof-gate.is-open .gate-glow { opacity: 1; filter: brightness(3); }
.proof-gate.is-open .gate-fractures,
.proof-gate.is-open .push-hands-layer { opacity: 0; transition: opacity 0.32s ease; }
.proof-gate.is-open .gate-inscription,
.proof-gate.is-open .gate-lock { opacity: 0; transform: translateX(-50%) scale(0.65); }

.force-gate {
  display: grid;
  min-width: 245px;
  margin-top: 21px;
  padding: 10px 24px;
  border: 1px solid #8d7041;
  border-radius: 4px 15px 4px 11px;
  background: linear-gradient(135deg, rgba(111, 47, 37, 0.94), rgba(15, 26, 27, 0.96));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
  cursor: pointer;
  text-align: center;
  transition: opacity 0.3s ease, transform 0.25s ease, filter 0.25s ease;
}

.force-gate:hover:not(:disabled) { transform: translateY(-3px); filter: brightness(1.18); }
.force-gate span { color: #ad8650; font-size: 8px; letter-spacing: 0.14em; }
.force-gate strong { margin-top: 3px; color: #ead9af; font-size: 16px; }
.force-gate.is-spent { opacity: 0.52; }
.force-gate.is-busy {
  opacity: 1;
  border-color: #c3994f;
  animation: b7-force-button 0.72s ease-in-out infinite alternate;
}

@keyframes b7-force-button {
  to { filter: brightness(1.18); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), 0 0 24px rgba(206, 159, 72, 0.26); }
}

.gate-message {
  max-width: 610px;
  min-height: 38px;
  margin: 13px 0 0;
  color: #84968f;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.evidence-dock {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 20px;
  border: 1px solid rgba(188, 148, 70, 0.48);
  border-radius: 5px 24px 5px 18px;
  background: linear-gradient(145deg, rgba(10, 21, 23, 0.95), rgba(4, 9, 10, 0.94));
  box-shadow: 18px 23px 0 rgba(0, 0, 0, 0.23), inset 0 0 50px rgba(72, 132, 117, 0.05);
  transition: filter 0.45s ease, opacity 0.45s ease, transform 0.45s ease;
}

.evidence-dock::before {
  content: "EVIDENCE LOCKED\A先尝试推门";
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-content: center;
  border-radius: inherit;
  background: rgba(3, 7, 8, 0.81);
  color: #8c754a;
  font: 700 10px/2 Georgia, "Microsoft YaHei", sans-serif;
  letter-spacing: 0.16em;
  text-align: center;
  white-space: pre;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.evidence-dock.is-locked::before { opacity: 1; pointer-events: auto; }
.evidence-dock.is-locked > * { filter: blur(2px); opacity: 0.45; }

.evidence-dock > p {
  margin: 0 0 3px;
  color: #8a754d;
  font: 700 9px Georgia, serif;
  letter-spacing: 0.25em;
}

.evidence-dock > button {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 84px;
  padding: 13px 72px 13px 15px;
  overflow: hidden;
  border: 1px solid rgba(110, 143, 132, 0.4);
  border-radius: 3px 14px 3px 10px;
  background:
    linear-gradient(90deg, rgba(25, 52, 51, 0.84), rgba(7, 14, 16, 0.92)),
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(255, 255, 255, 0.02) 9px 10px);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}

.evidence-dock > button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #b08642;
  box-shadow: 0 0 20px rgba(209, 167, 77, 0.25);
}

.evidence-dock > button:hover:not(:disabled) {
  border-color: #c29747;
  filter: brightness(1.15);
  transform: translateX(-5px);
}

.evidence-dock > button span,
.evidence-dock > button strong,
.evidence-dock > button small {
  display: block;
  grid-column: 1;
}

.evidence-dock > button span { color: #9a7843; font: 700 8px Georgia, serif; letter-spacing: 0.13em; }
.evidence-dock > button strong { margin: 4px 0 2px; color: #d8c9a3; font-size: 14px; }
.evidence-dock > button small { color: #647a72; font-size: 8px; }
.evidence-dock > button i {
  position: absolute;
  right: 13px;
  top: 50%;
  min-width: 43px;
  padding: 5px 7px;
  border: 1px solid #75613e;
  color: #caa85e;
  font-size: 8px;
  font-style: normal;
  text-align: center;
  transform: translateY(-50%);
}

.evidence-dock > button.is-complete {
  border-color: rgba(96, 150, 128, 0.64);
  background: linear-gradient(90deg, rgba(32, 76, 65, 0.82), rgba(7, 20, 18, 0.94));
  opacity: 0.7;
}

.evidence-dock > button.is-complete::after {
  content: "✓";
  position: absolute;
  right: 27px;
  top: 13px;
  color: #75b79c;
  font: 700 18px Georgia, serif;
}

.evidence-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-top: 5px;
  padding-top: 13px;
  border-top: 1px solid rgba(126, 105, 66, 0.35);
}

.evidence-note span { color: #8d7548; font-size: 8px; letter-spacing: 0.12em; white-space: nowrap; }
.evidence-note p { margin: 0; color: #677a73; font-size: 9px; line-height: 1.65; }

/* Evidence film player */

.evidence-film-overlay {
  z-index: 720;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(45, 104, 93, 0.22), transparent 45%),
    rgba(1, 4, 5, 0.965);
}

.evidence-film-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.23;
  background: repeating-linear-gradient(90deg, transparent 0 11vw, rgba(207, 171, 88, 0.08) 11.05vw 11.1vw);
}

.evidence-film-shell {
  position: relative;
  z-index: 2;
  width: min(1120px, 94vw);
  padding: clamp(18px, 2.4vw, 32px);
  border: 1px solid rgba(198, 157, 76, 0.58);
  border-radius: 6px 35px 6px 23px;
  background: linear-gradient(145deg, rgba(10, 21, 23, 0.98), rgba(3, 8, 9, 0.98));
  box-shadow: 0 46px 120px #000, 18px 20px 0 rgba(0, 0, 0, 0.28), inset 0 0 60px rgba(72, 131, 117, 0.05);
}

.evidence-film-shell > header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 30px;
  margin-bottom: 17px;
  padding-left: 14px;
  border-left: 3px solid #a87b3b;
}

.evidence-film-shell > header > p { grid-column: 1 / -1; }
.evidence-film-shell > header h2 {
  margin: 0;
  color: #e7d5aa;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(28px, 3.1vw, 50px);
  line-height: 1;
}

.evidence-film-shell > header > span {
  color: #667b73;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.evidence-screen {
  --evidence-progress: 0%;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 58vh;
  overflow: hidden;
  border: 1px solid rgba(153, 132, 85, 0.62);
  border-radius: 3px 23px 3px 16px;
  background: #020506;
  box-shadow: inset 0 0 70px #000;
}

.evidence-screen::before {
  content: "";
  position: absolute;
  z-index: 15;
  left: 3%;
  right: 3%;
  bottom: 3%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, #d19b43 var(--evidence-progress), rgba(168, 191, 182, 0.18) var(--evidence-progress));
}

.evidence-screen video {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.evidence-screen.has-video video { opacity: 1; }
.evidence-screen.has-video .evidence-placeholder { opacity: 0; }

.evidence-placeholder {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: clamp(10px, 2vw, 35px);
  padding: 9%;
  opacity: 0.62;
  background:
    radial-gradient(circle at 50% 45%, rgba(56, 120, 105, 0.22), transparent 34%),
    linear-gradient(135deg, #102426, #04090a 70%);
  transition: opacity 0.3s ease;
}

.placeholder-beat {
  position: relative;
  display: grid;
  min-height: 130px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(126, 163, 150, 0.36);
  border-radius: 4px 18px 4px 12px;
  background: rgba(7, 16, 18, 0.82);
  opacity: 0.35;
  transform: translateY(12px) scale(0.96);
}

.placeholder-beat b { color: #a77f3d; font: 700 10px Georgia, serif; letter-spacing: 0.14em; }
.placeholder-beat strong { margin-top: 8px; color: #d1c4a1; font-size: 13px; line-height: 1.55; }
.evidence-placeholder > i { width: clamp(18px, 3vw, 55px); height: 1px; background: linear-gradient(90deg, #8a6b3b, #547f72); }

.placeholder-timeline {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 8%;
  height: 2px;
  overflow: hidden;
  background: rgba(156, 183, 173, 0.16);
}

.placeholder-timeline > i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #9d7040, #efc862);
  box-shadow: 0 0 12px #d6a348;
}

.evidence-screen.is-placeholder-playing .evidence-placeholder { opacity: 1; }
.evidence-screen.is-placeholder-playing .placeholder-beat:nth-of-type(1) { animation: b7-proof-beat 3.4s ease 0.25s both; }
.evidence-screen.is-placeholder-playing .placeholder-beat:nth-of-type(2) { animation: b7-proof-beat 3.4s ease 3.8s both; }
.evidence-screen.is-placeholder-playing .placeholder-beat:nth-of-type(3) { animation: b7-proof-beat 3.4s ease 7.45s both; }
.evidence-screen.is-placeholder-playing .placeholder-timeline > i { animation: b7-evidence-timeline 12s linear both; }

@keyframes b7-proof-beat {
  0% { opacity: 0.28; transform: translateY(12px) scale(0.96); border-color: rgba(126, 163, 150, 0.28); }
  28%, 78% { opacity: 1; transform: translateY(0) scale(1.035); border-color: #c29445; box-shadow: 0 0 45px rgba(211, 166, 72, 0.2); }
  100% { opacity: 0.6; transform: translateY(0) scale(1); }
}

@keyframes b7-evidence-timeline { to { width: 100%; } }

.evidence-slot-status {
  min-height: 18px;
  margin: 11px 0 0;
  color: #768b82;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-align: center;
}

.evidence-film-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 13px;
}

.evidence-film-actions .action-primary,
.evidence-film-actions .action-ghost {
  min-width: 190px;
}

/* Golden staircase, inspired by the mid-year announcement */

.staircase-overlay {
  z-index: 620;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 70px);
  background:
    linear-gradient(0deg, rgba(10, 17, 18, 0.18), transparent 50%),
    linear-gradient(135deg, #16333c 0 24%, #4d706d 42%, #cf9b4b 73%, #edc96f 100%);
}

.staircase-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background:
    radial-gradient(circle at 75% 10%, #fff6bd 0 2%, rgba(255, 230, 135, 0.5) 3%, transparent 21%),
    repeating-linear-gradient(112deg, transparent 0 13%, rgba(255, 255, 255, 0.07) 13.2% 13.5%);
}

.staircase-sun {
  position: absolute;
  right: 10%;
  top: 8%;
  width: min(24vw, 330px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 251, 205, 0.98) 0 7%, rgba(255, 221, 117, 0.52) 22%, transparent 68%);
  filter: blur(1px);
}

.staircase-dunes,
.staircase-dunes > i {
  position: absolute;
  pointer-events: none;
}

.staircase-dunes {
  inset: 0;
  overflow: hidden;
}

.staircase-dunes::before,
.staircase-dunes::after,
.staircase-dunes > i {
  content: "";
  position: absolute;
  left: -15%;
  width: 130%;
  border-radius: 50% 50% 0 0;
}

.staircase-dunes::before {
  bottom: -38%;
  height: 72%;
  background: linear-gradient(145deg, #09283a, #24628a 45%, #0b2638 72%);
  box-shadow: inset 0 18px 36px rgba(174, 221, 225, 0.24);
  transform: rotate(6deg);
}

.staircase-dunes::after {
  right: -15%;
  left: auto;
  bottom: -43%;
  height: 69%;
  background: linear-gradient(155deg, #dca758, #f0ca75 50%, #b87538);
  transform: rotate(-4deg);
}

.staircase-dunes > i:nth-child(1) {
  bottom: -53%;
  height: 72%;
  background: rgba(246, 202, 113, 0.5);
}

.staircase-content {
  position: relative;
  z-index: 4;
  display: grid;
  width: min(1350px, 94vw);
  grid-template-columns: minmax(330px, 0.7fr) minmax(560px, 1.3fr);
  align-items: center;
  gap: clamp(40px, 6vw, 110px);
}

.staircase-copy {
  padding: clamp(22px, 3vw, 42px);
  border-left: 4px solid rgba(238, 190, 90, 0.84);
  background: linear-gradient(90deg, rgba(4, 13, 17, 0.82), rgba(4, 13, 17, 0.38), transparent);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.75);
}

.staircase-copy > p { color: #f0c868; }
.staircase-copy h2 {
  margin: 12px 0 22px;
  color: #fff0bd;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(43px, 5vw, 82px);
  line-height: 0.98;
}

.staircase-copy blockquote {
  max-width: 570px;
  margin: 0 0 28px;
  padding-left: 17px;
  border-left: 1px solid rgba(239, 201, 113, 0.57);
  color: #d5e1d8;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.8;
}

.golden-staircase {
  position: relative;
  height: min(72vh, 680px);
  perspective: 1300px;
}

.golden-staircase > span {
  position: absolute;
  display: grid;
  width: 60%;
  height: 11%;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  border: 2px solid #ffe18d;
  background: linear-gradient(180deg, rgba(255, 221, 125, 0.92), rgba(171, 109, 45, 0.88));
  box-shadow: 0 0 24px rgba(255, 222, 117, 0.72), inset 0 0 16px rgba(255, 249, 206, 0.65), 0 20px 22px rgba(69, 34, 12, 0.22);
  color: #4b311d;
  transform: skewX(-12deg);
}

.golden-staircase > span b {
  font: 800 clamp(12px, 1.2vw, 18px) Georgia, serif;
}

.golden-staircase > span strong {
  font-size: clamp(11px, 1.1vw, 16px);
  letter-spacing: 0.05em;
}

.golden-staircase .step-one { left: 4%; bottom: 5%; width: 88%; }
.golden-staircase .step-two { left: 12%; bottom: 21%; width: 76%; }
.golden-staircase .step-three { left: 22%; bottom: 37%; width: 65%; }
.golden-staircase .step-four { left: 34%; bottom: 53%; width: 53%; }
.golden-staircase .step-five {
  left: 49%;
  bottom: 69%;
  width: 40%;
  border-style: dashed;
  background: rgba(63, 61, 42, 0.5);
  color: rgba(255, 236, 176, 0.68);
  filter: grayscale(0.7) brightness(0.72);
  transition: filter 0.8s ease, background 0.8s ease, box-shadow 0.8s ease;
}

.golden-staircase > img {
  position: absolute;
  z-index: 6;
  left: 0;
  bottom: 12%;
  width: min(33%, 280px);
  max-height: 58%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 22px 24px rgba(27, 14, 7, 0.48));
  animation: b7-stair-hero 3.4s ease-in-out infinite alternate;
}

@keyframes b7-stair-hero { to { transform: translateY(-8px); filter: drop-shadow(0 28px 29px rgba(27, 14, 7, 0.58)) brightness(1.08); } }

.future-seed {
  position: absolute;
  z-index: 8;
  right: 8%;
  bottom: 8%;
  width: 90px;
  height: 170px;
  opacity: 0;
  transform: translateY(20px) scale(0.65);
  transition: opacity 0.8s ease, transform 1.2s cubic-bezier(0.2, 0.9, 0.25, 1.3);
}

.future-seed > i {
  position: absolute;
  left: 44px;
  bottom: 0;
  width: 5px;
  height: 120px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(#8dd47c, #4b814d);
  transform-origin: bottom;
}

.future-seed > span,
.future-seed > b {
  position: absolute;
  top: 42px;
  width: 43px;
  height: 24px;
  background: linear-gradient(145deg, #bde58a, #4b9857);
}

.future-seed > span { left: 4px; border-radius: 100% 0 100% 0; transform: rotate(17deg); }
.future-seed > b { right: 0; top: 22px; border-radius: 0 100% 0 100%; transform: rotate(-17deg); }

.staircase-overlay.is-planting .future-seed,
.staircase-overlay.is-planted .future-seed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.staircase-overlay.is-planted .golden-staircase .step-five {
  border-style: solid;
  background: linear-gradient(180deg, #ffe291, #c88643);
  color: #4b311d;
  filter: none;
  box-shadow: 0 0 45px rgba(255, 228, 145, 0.9), inset 0 0 18px #fff1bd;
}

/* B7 overlay responsiveness */

@media (max-width: 1120px) {
  .prologue-layout {
    grid-template-columns: minmax(255px, 0.34fr) minmax(520px, 1fr);
    gap: 20px 32px;
  }

  .prologue-copy h1 { font-size: clamp(45px, 5vw, 68px); }
  .proof-layout { grid-template-columns: minmax(430px, 1fr) minmax(300px, 370px); gap: 35px; }
  .proof-gate { width: min(44vw, 455px); }
  .staircase-content { grid-template-columns: minmax(300px, 0.7fr) minmax(500px, 1.3fr); gap: 35px; }
}

@media (max-width: 880px) {
  .prologue-screen { position: relative; min-width: 760px; min-height: 100vh; }
  .prologue-layout { grid-template-columns: 1fr; grid-template-rows: auto auto auto; overflow: auto; }
  .prologue-copy { max-width: 700px; }
  .prologue-copy h1 br { display: none; }
  .prologue-player { justify-self: center; width: min(88vw, 820px); max-height: none; transform: none; }
  .prologue-actions { grid-column: 1; }
  .proof-gate-overlay,
  .staircase-overlay,
  .evidence-film-overlay { min-width: 760px; overflow: auto; }
  .proof-gate-overlay { min-height: 720px; }
  .proof-layout { grid-template-columns: minmax(390px, 1fr) 320px; }
  .proof-gate { width: 390px; }
  .staircase-content { grid-template-columns: 310px 1fr; }
  .golden-staircase { height: 570px; }
}

@media (max-height: 820px) and (min-width: 881px) {
  .prologue-screen { grid-template-rows: 66px minmax(0, 1fr) 30px; }
  .prologue-layout { padding-top: 13px; padding-bottom: 10px; }
  .prologue-copy h1 { margin: 10px 0 14px; font-size: clamp(42px, 4.6vw, 66px); }
  .prologue-copy > p:not(.kicker) { line-height: 1.65; }
  .prologue-route { margin-top: 18px; }
  .proof-gate-overlay { padding-top: 16px; padding-bottom: 14px; }
  .proof-header h2 { font-size: 43px; }
  .proof-gate { width: min(35vw, 390px); }
  .force-gate { margin-top: 12px; }
  .gate-message { margin-top: 8px; }
  .evidence-dock { padding: 14px; }
  .evidence-dock > button { min-height: 70px; padding-top: 9px; padding-bottom: 9px; }
  .evidence-film-shell { width: min(980px, 93vw); padding: 17px; }
  .evidence-screen { max-height: 55vh; }
  .golden-staircase { height: 590px; }
}

@media (prefers-reduced-motion: reduce) {
  .prologue-backdrop,
  .golden-staircase > img { animation: none; }
  .prologue-player.is-placeholder-playing .placeholder-jay { animation-duration: 1.2s; }
  .prologue-player.is-placeholder-playing .prologue-progress > i,
  .evidence-screen.is-placeholder-playing .placeholder-timeline > i { animation-duration: 1.2s; }
  .evidence-screen.is-placeholder-playing .placeholder-beat { animation-duration: 0.3s !important; animation-delay: 0s !important; }
}
