:root {
  color-scheme: dark;
  --bg: #101111;
  --shell: #050606;
  --panel: rgba(6, 7, 7, 0.72);
  --ink: #f7f5ef;
  --muted: rgba(247, 245, 239, 0.62);
  --quiet: rgba(247, 245, 239, 0.34);
  --line: rgba(247, 245, 239, 0.12);
  --strong-line: rgba(247, 245, 239, 0.28);
  --heat: #ff6038;
  --ember: #ffbc61;
  --cyan: #70d8e6;
  --mint: #77d5ae;
  --rose: #ff5f83;
  --blue: #76a9ff;
  --shadow: rgba(0, 0, 0, 0.68);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 96, 56, 0.11), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(112, 216, 230, 0.11), transparent 26%),
    linear-gradient(180deg, #151616 0%, #0b0c0c 46%, #050606 100%);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.23;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  width: min(1480px, calc(100vw - 28px));
  height: 100dvh;
  margin: 0 auto;
  padding: 14px 0;
}

.topbar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px 16px;
  border: 1px solid var(--strong-line);
  border-radius: 18px;
  background: rgba(6, 7, 7, 0.82);
  box-shadow: 0 24px 70px var(--shadow);
  backdrop-filter: blur(16px);
}

.brand,
.toplinks button,
.route-card,
.database-return,
.guide-button,
.brain-controls button,
.scene-card {
  border: 1px solid var(--strong-line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 13px 0 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.brand-mark,
.home-logo-mark {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid rgba(247, 245, 239, 0.22);
  background:
    url("./assets/mindspace-dual-track-logo.svg") center / contain no-repeat,
    rgba(5, 6, 6, 0.82);
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 9px;
}

.home-logo-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  box-shadow: 0 0 64px rgba(112, 216, 230, 0.24);
}

.brand-mark::before,
.brand-mark::after,
.home-logo-mark::before,
.home-logo-mark::after {
  display: none;
}

.toplinks {
  display: flex;
  gap: 8px;
}

.toplinks button {
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.brand:hover,
.toplinks button:hover,
.route-card:hover,
.database-return:hover,
.guide-button:hover,
.brain-controls button:hover,
.scene-card:hover {
  border-color: rgba(247, 245, 239, 0.48);
  background: rgba(255, 255, 255, 0.09);
}

.brand:active,
.toplinks button:active,
.route-card:active,
.database-return:active,
.guide-button:active,
.brain-controls button:active,
.scene-card:active {
  transform: translateY(1px);
}

.screen {
  position: absolute;
  inset: 84px 0 14px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.985);
  transition: opacity 520ms ease, transform 520ms ease, visibility 520ms ease;
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.home-page {
  border: 1px solid var(--strong-line);
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(3, 4, 4, 0.72), rgba(3, 4, 4, 0.24) 46%, rgba(3, 4, 4, 0.5)),
    url("./assets/mindspace-hero-console-v1.png") center / cover no-repeat,
    #050606;
  box-shadow: 0 36px 100px var(--shadow);
  isolation: isolate;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0.92;
  mix-blend-mode: screen;
}

.home-page::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 63% 42%, rgba(255, 255, 255, 0.16), transparent 2%, transparent 19%, rgba(0, 0, 0, 0.28) 58%),
    linear-gradient(90deg, rgba(5, 6, 6, 0.94), rgba(5, 6, 6, 0.35) 42%, rgba(5, 6, 6, 0.5));
}

.home-page::after {
  position: absolute;
  inset: 0;
  z-index: 4;
  content: "";
  pointer-events: none;
  opacity: 0.22;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

.hero-grid {
  position: absolute;
  inset: 34px 42px 34px 38%;
  z-index: 1;
  display: none;
  perspective: 900px;
}

.hero-monitor {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(247, 245, 239, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    rgba(2, 3, 3, 0.76);
  background-size: 26px 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 28px 80px rgba(0, 0, 0, 0.52);
}

.hero-monitor-main {
  inset: 6% 4% 14% 10%;
  transform: rotateY(-12deg) rotateX(4deg);
}

.hero-monitor-main img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0.74;
  filter: saturate(0.86) brightness(0.76) contrast(1.18);
}

.hero-monitor-chart {
  left: 0;
  bottom: 5%;
  width: 34%;
  height: 24%;
  transform: rotateY(-18deg) translateZ(42px);
}

.hero-monitor-chart::before,
.hero-monitor-scan::before {
  position: absolute;
  inset: 14px;
  content: "";
  background:
    radial-gradient(circle at 20% 72%, rgba(255, 96, 56, 0.86), transparent 8%),
    radial-gradient(circle at 68% 38%, rgba(112, 216, 230, 0.76), transparent 7%),
    linear-gradient(120deg, transparent 0 24%, rgba(255, 188, 97, 0.72) 25% 27%, transparent 28% 44%, rgba(112, 216, 230, 0.62) 45% 47%, transparent 48%);
}

.hero-monitor-scan {
  right: 2%;
  top: 8%;
  width: 26%;
  height: 22%;
  transform: rotateY(18deg) translateZ(62px);
}

.home-content {
  position: relative;
  z-index: 5;
  width: min(440px, 78vw);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 82px;
}

.home-logo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
}

.home-logo span:last-child {
  display: none;
}

.home-content h1 {
  margin: 0;
  color: rgba(247, 245, 239, 0.92);
  font-size: 44px;
  line-height: 1;
  font-weight: 680;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(112, 216, 230, 0.22);
}

.home-content p {
  max-width: 21ch;
  margin: 12px 0 0;
  color: rgba(247, 245, 239, 0.72);
  font-size: 17px;
  line-height: 1.24;
  font-weight: 500;
}

.home-routes {
  display: grid;
  width: min(330px, 100%);
  gap: 10px;
  margin-top: 30px;
}

.route-card {
  position: relative;
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 10px 14px;
  border-radius: 16px;
  text-align: left;
  background:
    radial-gradient(circle at 22% 50%, rgba(112, 216, 230, 0.18), transparent 34%),
    linear-gradient(90deg, rgba(247, 245, 239, 0.075), rgba(247, 245, 239, 0.018));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 54px rgba(0, 0, 0, 0.34);
}

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

.route-card::before {
  inset: 0;
  opacity: 0.4;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(90deg, black, transparent 82%);
}

.route-card::after {
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(112, 216, 230, 0.9), 0 0 44px rgba(112, 216, 230, 0.38);
  transform: translateY(-50%);
}

.route-card-primary::after {
  background: var(--ember);
  box-shadow: 0 0 18px rgba(255, 188, 97, 0.9), 0 0 44px rgba(255, 96, 56, 0.42);
}

.route-card span,
.route-card strong,
.route-card small {
  position: relative;
  z-index: 1;
}

.route-card span {
  grid-row: span 2;
  color: rgba(247, 245, 239, 0.42);
  font-size: 11px;
  font-weight: 900;
}

.route-card strong {
  color: rgba(247, 245, 239, 0.94);
  font-size: 14px;
  line-height: 1.05;
}

.route-card small {
  color: rgba(247, 245, 239, 0.52);
  font-size: 11px;
}

.route-card:hover,
.route-card.is-hovered {
  border-color: rgba(247, 245, 239, 0.46);
  background:
    radial-gradient(circle at 22% 50%, rgba(112, 216, 230, 0.24), transparent 36%),
    linear-gradient(90deg, rgba(247, 245, 239, 0.11), rgba(247, 245, 239, 0.03));
}

.route-card-primary:hover,
.route-card-primary.is-hovered {
  background:
    radial-gradient(circle at 22% 50%, rgba(255, 188, 97, 0.25), transparent 36%),
    linear-gradient(90deg, rgba(247, 245, 239, 0.12), rgba(247, 245, 239, 0.03));
}

.lab-page {
  border-radius: 26px;
}

.database-page {
  border-radius: 26px;
}

.database-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--strong-line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 70% 36%, rgba(112, 216, 230, 0.15), transparent 27%),
    radial-gradient(circle at 43% 58%, rgba(255, 188, 97, 0.11), transparent 28%),
    linear-gradient(rgba(255, 255, 255, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #030404;
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
  box-shadow: 0 36px 100px var(--shadow);
}

.database-copy {
  position: relative;
  z-index: 2;
  width: min(520px, 78vw);
  padding: clamp(42px, 7vw, 96px);
}

.database-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.database-copy h2 {
  margin: 12px 0 10px;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 0.96;
}

.database-copy p {
  margin: 0;
  color: rgba(247, 245, 239, 0.68);
  font-size: 16px;
  line-height: 1.6;
}

.database-return {
  min-height: 40px;
  margin-top: 26px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.database-map {
  position: absolute;
  inset: 8% 7% 10% 38%;
  border: 1px solid rgba(247, 245, 239, 0.1);
  border-radius: 22px;
  background:
    radial-gradient(circle at 48% 48%, rgba(247, 245, 239, 0.11), transparent 4%, transparent 16%, rgba(112, 216, 230, 0.08) 17%, transparent 34%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(3, 4, 4, 0.36);
  background-size: auto, 42px 42px, 42px 42px, auto;
  box-shadow: inset 0 0 80px rgba(112, 216, 230, 0.08);
}

.database-map i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(112, 216, 230, 0.82);
}

.database-map i:nth-child(1) { left: 18%; top: 24%; }
.database-map i:nth-child(2) { left: 34%; top: 62%; background: var(--ember); box-shadow: 0 0 24px rgba(255, 188, 97, 0.82); }
.database-map i:nth-child(3) { left: 52%; top: 38%; }
.database-map i:nth-child(4) { left: 72%; top: 22%; background: var(--heat); box-shadow: 0 0 24px rgba(255, 96, 56, 0.76); }
.database-map i:nth-child(5) { left: 78%; top: 72%; }
.database-map i:nth-child(6) { left: 48%; top: 76%; background: var(--mint); box-shadow: 0 0 24px rgba(119, 213, 174, 0.76); }

.lab-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--strong-line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 60% 44%, rgba(112, 216, 230, 0.1), transparent 30%),
    radial-gradient(circle at 26% 58%, rgba(255, 96, 56, 0.12), transparent 26%),
    linear-gradient(rgba(255, 255, 255, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #030404;
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
  box-shadow: 0 36px 100px var(--shadow);
  isolation: isolate;
}

.lab-frame::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 54% 50%, transparent 0 18%, rgba(0, 0, 0, 0.22) 42%, rgba(0, 0, 0, 0.64) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 34%, rgba(0, 0, 0, 0.2));
}

#linkCanvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.brain-panel {
  position: absolute;
  left: clamp(16px, 2.4vw, 34px);
  top: clamp(16px, 2.5vw, 34px);
  z-index: 4;
  width: min(650px, 48%);
  height: min(650px, calc(100% - 160px));
  overflow: hidden;
  border: 1px solid rgba(247, 245, 239, 0.2);
  border-radius: 24px;
  background: rgba(3, 4, 4, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 28px 90px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
}

.panel-head {
  position: absolute;
  inset: 18px 20px auto 20px;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.guide-button,
.brain-controls button {
  min-height: 34px;
  border-radius: 999px;
}

.guide-button {
  padding: 0 15px;
  font-size: 12px;
  font-weight: 850;
}

.activity-legend {
  display: grid;
  grid-template-columns: auto 82px auto;
  align-items: center;
  gap: 8px;
  color: rgba(247, 245, 239, 0.76);
  font-size: 11px;
  font-weight: 760;
}

.activity-legend i {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 96, 56, 0.26), var(--heat), #ffe59c);
  box-shadow: 0 0 18px rgba(255, 96, 56, 0.42);
}

.activity-legend b {
  grid-column: 2;
  justify-self: center;
  margin-top: -2px;
  color: var(--muted);
  font-size: 10px;
}

.brain-stage,
#eegCanvas {
  position: absolute;
  inset: 0;
}

.brain-stage img {
  width: 138%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 38% 50%;
  transform: translateX(-21%);
  filter: contrast(1.03) brightness(0.94) saturate(0.92);
}

.brain-stage::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 56%, rgba(5, 6, 6, 0.18) 75%, rgba(5, 6, 6, 0.46) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent 30%, rgba(0, 0, 0, 0.18));
}

.brain-copy {
  position: absolute;
  inset: 138px 30px auto 30px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  color: rgba(247, 245, 239, 0.34);
  font-size: 12px;
  pointer-events: none;
}

.brain-controls {
  position: absolute;
  inset: auto 20px 18px 20px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.brain-controls button {
  min-width: 0;
  padding: 0 8px;
  color: rgba(247, 245, 239, 0.76);
  font-size: 12px;
}

.brain-controls button[aria-pressed="true"] {
  color: #070808;
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(247, 245, 239, 0.82);
}

.scene-field {
  position: absolute;
  inset: 28px 28px 160px 36%;
  z-index: 2;
  min-width: 0;
}

.scene-title {
  position: absolute;
  left: 16%;
  right: 4%;
  top: 0;
  z-index: 6;
  max-width: 640px;
}

.scene-title p,
.signal-dock-head span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scene-title h2 {
  margin: 7px 0 8px;
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: 0.98;
  font-weight: 950;
}

.scene-title span {
  display: block;
  max-width: 42em;
  color: rgba(247, 245, 239, 0.7);
  font-size: 14px;
  line-height: 1.45;
}

.spatial-stage {
  position: absolute;
  right: 0;
  top: 15%;
  bottom: 0;
  width: min(760px, 82%);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(247, 245, 239, 0.16);
  border-radius: 18px;
  background: #020303;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 28px 96px rgba(0, 0, 0, 0.62);
  transform: perspective(1200px) rotateY(-5deg) rotateX(1deg);
}

.spatial-stage img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 52%;
  opacity: 0.9;
  filter: contrast(1.12) saturate(0.92) brightness(0.88);
  transition: opacity 320ms ease, transform 520ms ease;
}

.spatial-stage.is-recomputing img {
  opacity: 0.68;
  transform: scale(1.03);
}

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

.spatial-stage::before {
  z-index: 1;
  background:
    radial-gradient(circle at 45% 52%, transparent 0 34%, rgba(0, 0, 0, 0.34) 74%, rgba(0, 0, 0, 0.66)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 52%, rgba(0, 0, 0, 0.34));
}

.spatial-stage::after {
  z-index: 2;
  opacity: 0.28;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
}

.spatial-stage figcaption {
  position: absolute;
  left: 16px;
  bottom: 13px;
  z-index: 4;
  color: rgba(247, 245, 239, 0.74);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recompute-badge {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 4;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(112, 216, 230, 0.36);
  border-radius: 999px;
  color: rgba(247, 245, 239, 0.84);
  background: rgba(4, 5, 5, 0.58);
  font-size: 11px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.spatial-stage.is-recomputing .recompute-badge {
  opacity: 1;
  transform: translateY(0);
}

.scene-orbit {
  position: absolute;
  left: 0;
  top: 17%;
  z-index: 8;
  width: min(360px, 38%);
  display: grid;
  gap: 12px;
  outline: none;
}

.scene-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border-radius: 14px;
  text-align: left;
  background: rgba(5, 6, 6, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.44);
  transform: translateX(calc(var(--depth, 0) * 18px)) scale(calc(1 - var(--depth, 0) * 0.035));
}

.scene-card[aria-pressed="true"] {
  border-color: rgba(247, 245, 239, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.scene-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(0.84) brightness(0.72) contrast(1.18);
}

.scene-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18)),
    radial-gradient(circle at var(--pulse-x, 72%) 50%, rgba(112, 216, 230, 0.22), transparent 28%);
}

.scene-card strong,
.scene-card small {
  position: relative;
  z-index: 1;
  display: block;
  padding-left: 16px;
}

.scene-card strong {
  padding-top: 46px;
  font-size: 18px;
  font-weight: 950;
}

.scene-card small {
  margin-top: 4px;
  color: rgba(247, 245, 239, 0.62);
  font-size: 11px;
  font-weight: 760;
}

.signal-dock {
  position: absolute;
  left: min(590px, 42%);
  right: 24px;
  bottom: 24px;
  z-index: 9;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(247, 245, 239, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 50%, rgba(112, 216, 230, 0.08), transparent 42%),
    rgba(3, 4, 4, 0.62);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.signal-dock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.signal-dock-head strong {
  color: rgba(247, 245, 239, 0.82);
  font-size: 13px;
}

.signal-atlas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.signal-row {
  position: relative;
  min-height: 78px;
  overflow: hidden;
  border: 1px solid rgba(247, 245, 239, 0.1);
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    rgba(255, 255, 255, 0.018);
  background-size: 22px 22px;
}

.signal-label {
  position: absolute;
  left: 9px;
  top: 8px;
  z-index: 2;
  display: grid;
  gap: 2px;
}

.signal-label span {
  color: rgba(247, 245, 239, 0.42);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.signal-label strong {
  color: rgba(247, 245, 239, 0.9);
  font-size: 12px;
  line-height: 1.1;
}

.signal-label small {
  color: rgba(247, 245, 239, 0.48);
  font-size: 10px;
}

.signal-row canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.signal-value {
  position: absolute;
  right: 9px;
  bottom: 8px;
  z-index: 2;
  display: grid;
  justify-items: end;
  gap: 1px;
}

.signal-value strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  font-weight: 950;
}

.signal-value small {
  color: rgba(247, 245, 239, 0.52);
  font-size: 10px;
}

@media (prefers-reduced-motion: no-preference) {
  .home-logo-mark {
    animation: logoDrift 5s ease-in-out infinite;
  }

  .scene-card[aria-pressed="true"] {
    animation: activeScenePulse 1.8s ease-in-out infinite;
  }
}

@keyframes logoDrift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes activeScenePulse {
  0%, 100% { box-shadow: 0 18px 54px rgba(0, 0, 0, 0.44), 0 0 0 rgba(112, 216, 230, 0); }
  50% { box-shadow: 0 18px 54px rgba(0, 0, 0, 0.44), 0 0 42px rgba(112, 216, 230, 0.24); }
}

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

  .app-shell {
    width: min(780px, calc(100vw - 24px));
    min-height: 100dvh;
    height: auto;
  }

  .screen {
    position: relative;
    inset: auto;
    min-height: calc(100dvh - 98px);
    display: none;
  }

  .screen.is-active {
    display: block;
  }

  .home-page,
  .lab-frame,
  .database-frame {
    min-height: calc(100dvh - 98px);
  }

  .hero-grid {
    inset: 24px;
    opacity: 0.68;
  }

  .home-content {
    width: min(560px, 88vw);
    min-height: calc(100dvh - 98px);
    justify-content: flex-end;
    padding: 40px 28px;
  }

  .home-routes {
    width: 100%;
  }

  .lab-frame {
    height: auto;
    min-height: 1200px;
  }

  .brain-panel {
    left: 16px;
    right: 16px;
    top: 16px;
    width: auto;
    height: 520px;
  }

  .scene-field {
    position: relative;
    inset: auto;
    padding: 560px 16px 270px;
  }

  .scene-title {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    margin-bottom: 16px;
  }

  .scene-orbit {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scene-card {
    min-height: 120px;
    transform: none;
  }

  .spatial-stage {
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: 440px;
    margin-top: 16px;
    transform: none;
  }

  .signal-dock {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .database-copy {
    width: min(620px, 100%);
    padding: 42px 28px;
  }

  .database-map {
    inset: auto 16px 16px;
    height: 48%;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: calc(100vw - 18px);
    padding-top: 9px;
  }

  .topbar {
    min-height: 54px;
    padding: 8px;
  }

  .toplinks button {
    padding: 0 11px;
  }

  #navReset {
    display: none;
  }

  .home-page,
  .lab-frame,
  .database-frame {
    border-radius: 22px;
  }

  .hero-grid {
    inset: 110px -80px 0 40px;
  }

  .home-content {
    padding: 30px 26px;
  }

  .home-content h1 {
    font-size: clamp(38px, 12vw, 52px);
  }

  .home-content p {
    font-size: clamp(16px, 5vw, 20px);
  }

  .route-card {
    min-height: 62px;
  }

  .lab-frame {
    min-height: 1380px;
  }

  .brain-panel {
    height: 520px;
  }

  .brain-stage img {
    width: 154%;
    transform: translateX(-26%);
  }

  .brain-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scene-field {
    padding: 552px 12px 430px;
  }

  .scene-title h2 {
    font-size: 38px;
  }

  .scene-orbit {
    grid-template-columns: 1fr;
  }

  .scene-card {
    min-height: 92px;
  }

  .scene-card strong {
    padding-top: 30px;
  }

  .spatial-stage {
    height: 300px;
  }

  .signal-dock {
    padding: 12px;
  }

  .signal-dock-head {
    display: grid;
  }

  .signal-atlas {
    grid-template-columns: 1fr;
  }
}

/* Perspective corridor v4: spatial slices plus selected volumetric cube. */
body.is-lab .fusion-frame {
  --corridor-vanish-x: 12%;
  --corridor-vanish-y: 48%;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 48%, rgba(250, 248, 238, 0.5), transparent 1.1%, transparent 7%, rgba(112, 216, 230, 0.11) 8%, transparent 25%),
    radial-gradient(circle at 53% 48%, rgba(255, 188, 97, 0.13), transparent 23%),
    radial-gradient(circle at 72% 42%, rgba(112, 216, 230, 0.11), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(2, 3, 3, 0.82) 36%, rgba(0, 0, 0, 0.96)),
    #020303;
  perspective: 1900px;
}

body.is-lab .fusion-frame::before {
  opacity: 0.92;
  background:
    radial-gradient(circle at var(--corridor-vanish-x) var(--corridor-vanish-y), rgba(247, 245, 239, 0.44), transparent 1.2%, transparent 10%, rgba(0, 0, 0, 0.12) 12%, rgba(0, 0, 0, 0.72) 86%),
    repeating-radial-gradient(circle at var(--corridor-vanish-x) var(--corridor-vanish-y), rgba(112, 216, 230, 0.07) 0 1px, transparent 1px 40px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), transparent 35%, rgba(0, 0, 0, 0.5));
}

body.is-lab #linkCanvas {
  z-index: 5;
  mix-blend-mode: screen;
}

body.is-lab .fusion-depth {
  z-index: 1;
}

body.is-lab .fusion-depth::before,
body.is-lab .fusion-depth::after {
  left: var(--corridor-vanish-x);
  top: var(--corridor-vanish-y);
  width: 128vw;
  opacity: 0.72;
  background: linear-gradient(90deg, rgba(247, 245, 239, 0.72), rgba(112, 216, 230, 0.22) 26%, rgba(255, 188, 97, 0.1) 48%, transparent 76%);
}

body.is-lab .fusion-depth::before {
  transform: rotate(-19deg);
}

body.is-lab .fusion-depth::after {
  transform: rotate(20deg);
}

body.is-lab .fusion-plane {
  left: -4%;
  right: -18%;
  height: 56%;
  border-color: rgba(247, 245, 239, 0.1);
  opacity: 0.4;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 15% 53%, rgba(247, 245, 239, 0.2), transparent 6%, transparent 14%, rgba(112, 216, 230, 0.1) 15%, transparent 36%),
    transparent;
  background-size: 70px 70px, 70px 70px, auto, auto;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 88%, transparent);
}

body.is-lab .fusion-plane-top {
  top: -34%;
  transform: rotateX(-74deg) rotateZ(-1.2deg);
}

body.is-lab .fusion-plane-bottom {
  bottom: -28%;
  transform: rotateX(72deg) rotateZ(0.9deg);
}

body.is-lab .fusion-vanish {
  left: var(--corridor-vanish-x);
  top: var(--corridor-vanish-y);
  width: 14px;
  height: 14px;
}

body.is-lab .fusion-frame .scene-orbit {
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  perspective: 1800px;
  pointer-events: none;
}

body.is-lab .fusion-frame .scene-card {
  left: var(--node-x, 16%);
  top: var(--node-y, 54%);
  width: min(420px, 34vw);
  aspect-ratio: 16 / 10;
  display: block;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: var(--node-opacity, 0.55);
  filter: brightness(0.86) saturate(0.86) contrast(1.08);
  pointer-events: auto;
  transform:
    translate(-50%, -50%)
    scale(var(--node-scale, 0.5));
  transform-origin: left center;
  transition:
    opacity 560ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 560ms ease;
}

body.is-lab .fusion-frame .scene-card::before,
body.is-lab .fusion-frame .scene-card::after {
  display: none;
}

body.is-lab .fusion-frame .scene-card[aria-pressed="true"] {
  opacity: 0;
  pointer-events: none;
}

body.is-lab .fusion-frame .scene-card .scene-card-text {
  display: none;
}

body.is-lab .fusion-frame .scene-card .orbit-cube {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  transform: rotateX(-7deg) rotateY(-31deg) translateZ(-80px);
}

body.is-lab .fusion-frame .scene-card[data-offset="1"] .orbit-cube {
  transform: rotateX(-5deg) rotateY(-22deg) translateZ(-30px);
}

body.is-lab .orbit-face,
body.is-lab .orbit-ground {
  position: absolute;
  display: block;
  pointer-events: none;
}

body.is-lab .orbit-front {
  inset: 0;
  border: 1px solid rgba(247, 245, 239, 0.42);
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    var(--card-image) center / cover no-repeat;
  background-size: 34px 34px, 34px 34px, cover;
  box-shadow:
    inset 0 0 38px rgba(112, 216, 230, 0.14),
    0 0 30px rgba(112, 216, 230, 0.16);
  transform: translateZ(58px);
}

body.is-lab .orbit-front::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 78% 18%, rgba(247, 245, 239, 0.36), transparent 3%, transparent 16%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 42%, rgba(112, 216, 230, 0.14));
}

body.is-lab .orbit-side {
  top: 0;
  right: -116px;
  width: 116px;
  height: 100%;
  border: 1px solid rgba(247, 245, 239, 0.26);
  transform: rotateY(-90deg);
  transform-origin: left center;
  background:
    linear-gradient(90deg, rgba(247, 245, 239, 0.12), transparent),
    var(--card-image) right center / cover no-repeat;
  filter: brightness(0.58) saturate(0.72);
}

body.is-lab .orbit-top {
  left: 0;
  top: -116px;
  width: 100%;
  height: 116px;
  border: 1px solid rgba(247, 245, 239, 0.24);
  transform: rotateX(-90deg);
  transform-origin: bottom center;
  background:
    linear-gradient(rgba(112, 216, 230, 0.14), transparent),
    var(--card-image) center top / cover no-repeat;
  filter: brightness(0.62) saturate(0.74);
}

body.is-lab .orbit-ground {
  left: -22%;
  top: 72%;
  width: 162%;
  height: 94%;
  clip-path: polygon(7% 0, 92% 0, 100% 100%, 0 100%);
  border: 1px solid rgba(112, 216, 230, 0.18);
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.08) 1px, transparent 1px),
    var(--card-image) center bottom / cover no-repeat;
  background-size: 26px 26px, 26px 26px, cover;
  opacity: 0.46;
  filter: brightness(0.52) saturate(0.7) blur(0.1px);
  transform: rotateX(72deg) skewX(-20deg) translateZ(-58px);
  transform-origin: center top;
  mask-image: linear-gradient(90deg, transparent, black 14%, black 82%, transparent);
}

body.is-lab .fusion-frame .spatial-stage {
  left: 30%;
  top: 17%;
  width: min(560px, 38vw);
  height: min(610px, 68vh);
  z-index: 9;
  perspective: 1800px;
}

body.is-lab .fusion-frame .spatial-stage::before {
  display: block;
  position: absolute;
  left: 70%;
  top: 5%;
  width: 42%;
  height: 90%;
  z-index: 11;
  content: "";
  clip-path: polygon(0 0, 100% 13%, 100% 100%, 0 88%);
  border: 1px solid rgba(247, 245, 239, 0.32);
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.075) 1px, transparent 1px),
    linear-gradient(110deg, rgba(112, 216, 230, 0.16), transparent 42%, rgba(255, 188, 97, 0.14)),
    var(--scene-image) right center / cover no-repeat;
  background-size: 34px 34px, 34px 34px, auto, cover;
  opacity: 0.56;
  filter: brightness(0.72) saturate(0.82) contrast(1.12);
  transform: skewY(2deg) translateZ(0);
  transform-origin: left center;
  box-shadow:
    inset 0 0 44px rgba(112, 216, 230, 0.18),
    0 0 54px rgba(112, 216, 230, 0.18);
  pointer-events: none;
}

body.is-lab .fusion-frame .spatial-stage::after {
  display: block;
  position: absolute;
  left: -14%;
  right: -20%;
  top: 72%;
  height: 46%;
  z-index: -1;
  content: "";
  clip-path: polygon(8% 0, 86% 0, 100% 100%, 0 100%);
  border: 1px solid rgba(247, 245, 239, 0.22);
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.08) 1px, transparent 1px),
    var(--scene-image) center bottom / cover no-repeat;
  background-size: 34px 34px, 34px 34px, cover;
  opacity: 0.58;
  filter: brightness(0.64) saturate(0.82) contrast(1.05);
  transform: rotateX(72deg) skewX(-19deg) translateZ(-132px);
  transform-origin: center top;
  box-shadow:
    inset 0 0 44px rgba(112, 216, 230, 0.16),
    0 0 46px rgba(112, 216, 230, 0.18);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 86%, transparent);
}

body.is-lab .scene-cube {
  transform: rotateX(-8deg) rotateY(-36deg) translateZ(54px);
}

body.is-lab .spatial-stage.is-recomputing .scene-cube {
  transform: rotateX(-8deg) rotateY(-36deg) translateZ(104px) scale(1.045);
}

body.is-lab .cube-front {
  left: 0;
  right: auto;
  width: 76%;
  height: 100%;
  transform: translateZ(140px);
}

body.is-lab .cube-back {
  left: 0;
  right: auto;
  width: 76%;
  height: 100%;
  transform: translateZ(-140px) scale(0.96);
  opacity: 0.36;
}

body.is-lab .cube-left,
body.is-lab .cube-right {
  width: 280px;
  opacity: 0.72;
}

body.is-lab .cube-left {
  left: -140px;
  transform-origin: right center;
  transform: rotateY(90deg);
}

body.is-lab .cube-right {
  left: 76%;
  right: auto;
  transform-origin: left center;
  transform: rotateY(-90deg);
}

body.is-lab .cube-top,
body.is-lab .cube-bottom {
  left: 0;
  width: 76%;
  height: 300px;
  opacity: 0.58;
}

body.is-lab .cube-top {
  top: -150px;
  transform-origin: bottom center;
  transform: rotateX(-90deg);
}

body.is-lab .cube-bottom {
  bottom: -150px;
  transform-origin: top center;
  transform: rotateX(90deg);
}

body.is-lab .cube-face {
  border-color: rgba(247, 245, 239, 0.42);
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.044) 1px, transparent 1px),
    var(--scene-image) center / cover no-repeat,
    rgba(3, 4, 4, 0.16);
  background-size: 40px 40px, 40px 40px, cover, auto;
  box-shadow:
    inset 0 0 64px rgba(112, 216, 230, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 54px rgba(112, 216, 230, 0.24);
}

body.is-lab .cube-top,
body.is-lab .cube-bottom,
body.is-lab .cube-left,
body.is-lab .cube-right,
body.is-lab .cube-back {
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(115deg, rgba(112, 216, 230, 0.18), rgba(247, 245, 239, 0.04) 42%, rgba(255, 188, 97, 0.1)),
    var(--scene-image) center / cover no-repeat;
  background-size: 34px 34px, 34px 34px, auto, cover;
  filter: brightness(0.72) saturate(0.86) contrast(1.16);
}

body.is-lab .cube-front img {
  opacity: 0.96;
  filter: contrast(1.18) saturate(0.9) brightness(0.78);
}

body.is-lab .cube-core {
  inset: -24%;
  opacity: 0.18;
}

@media (max-width: 1080px) {
  body.is-lab .fusion-frame .spatial-stage {
    left: 26%;
    top: 22%;
    width: 56vw;
    height: 56vh;
  }

  body.is-lab .fusion-frame .scene-card {
    width: 34vw;
  }
}

@media (max-width: 620px) {
  body.is-lab .fusion-frame .spatial-stage {
    left: 22%;
    top: 31%;
    width: 70vw;
    height: 42vh;
  }

  body.is-lab .fusion-frame .scene-card {
    width: 48vw;
  }

  body.is-lab .orbit-side {
    right: -72px;
    width: 72px;
  }

  body.is-lab .orbit-top {
    top: -72px;
    height: 72px;
  }

  body.is-lab .cube-left,
  body.is-lab .cube-right {
    width: 156px;
  }

  body.is-lab .cube-left {
    left: -78px;
  }

  body.is-lab .cube-right {
    right: -78px;
  }

  body.is-lab .cube-top,
  body.is-lab .cube-bottom {
    height: 156px;
  }

  body.is-lab .cube-top {
    top: -78px;
  }

  body.is-lab .cube-bottom {
    bottom: -78px;
  }

  body.is-lab .cube-front {
    transform: translateZ(78px);
  }

  body.is-lab .cube-back {
    transform: translateZ(-78px) scale(0.96);
  }
}

/* Corridor-only second page pass. */
body.is-lab {
  background: #020303;
}

body.is-lab .app-shell {
  width: 100vw;
  height: 100dvh;
  padding: 0;
}

body.is-lab .topbar {
  display: none;
}

body.is-lab .screen {
  inset: 0;
}

body.is-lab .lab-frame {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.is-lab .fusion-title,
body.is-lab .fusion-brain {
  display: none;
}

body.is-lab .fusion-frame {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 48%, rgba(247, 245, 239, 0.38), transparent 1.4%, transparent 8%, rgba(112, 216, 230, 0.12) 9%, transparent 22%),
    radial-gradient(circle at 52% 48%, rgba(255, 188, 97, 0.08), transparent 22%),
    radial-gradient(circle at 74% 42%, rgba(112, 216, 230, 0.08), transparent 28%),
    #020303;
  perspective: 1600px;
}

body.is-lab .fusion-frame::before {
  background:
    radial-gradient(circle at 12% 48%, rgba(247, 245, 239, 0.42), transparent 1.6%, transparent 11%, rgba(0, 0, 0, 0.08) 12%, rgba(0, 0, 0, 0.64) 82%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), transparent 34%, rgba(0, 0, 0, 0.46));
}

body.is-lab .fusion-depth::before,
body.is-lab .fusion-depth::after {
  left: 12%;
  top: 48%;
  width: 116vw;
  opacity: 0.9;
}

body.is-lab .fusion-depth::before {
  transform: rotate(-18deg);
}

body.is-lab .fusion-depth::after {
  transform: rotate(18deg);
}

body.is-lab .fusion-plane {
  left: 4%;
  right: -18%;
  height: 54%;
  opacity: 0.38;
  background-size: 68px 68px, 68px 68px, auto, auto;
}

body.is-lab .fusion-plane-top {
  top: -32%;
  transform: rotateX(-72deg) rotateZ(-1deg);
}

body.is-lab .fusion-plane-bottom {
  bottom: -24%;
  transform: rotateX(70deg) rotateZ(0.6deg);
}

body.is-lab .fusion-vanish {
  left: 12%;
  top: 48%;
  width: 12px;
  height: 12px;
  background: rgba(247, 245, 239, 0.92);
  box-shadow:
    0 0 36px rgba(247, 245, 239, 0.96),
    0 0 110px rgba(112, 216, 230, 0.5),
    0 0 190px rgba(255, 188, 97, 0.28);
}

body.is-lab .fusion-frame .spatial-stage {
  left: 43%;
  top: 20%;
  width: min(720px, 46vw);
  height: min(540px, 62vh);
  z-index: 8;
}

body.is-lab .scene-cube {
  transform: rotateX(-10deg) rotateY(-22deg) translateZ(42px);
}

body.is-lab .spatial-stage.is-recomputing .scene-cube {
  transform: rotateX(-10deg) rotateY(-22deg) translateZ(86px) scale(1.04);
}

body.is-lab .cube-front {
  transform: translateZ(116px);
}

body.is-lab .cube-back {
  transform: translateZ(-116px) scale(0.96);
}

body.is-lab .cube-left,
body.is-lab .cube-right {
  width: 232px;
  opacity: 0.44;
}

body.is-lab .cube-left {
  left: -116px;
}

body.is-lab .cube-right {
  right: -116px;
}

body.is-lab .cube-top,
body.is-lab .cube-bottom {
  height: 232px;
  opacity: 0.3;
}

body.is-lab .cube-top {
  top: -116px;
}

body.is-lab .cube-bottom {
  bottom: -116px;
}

body.is-lab .cube-face {
  border-color: rgba(247, 245, 239, 0.38);
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    var(--scene-image) center / cover no-repeat,
    rgba(3, 4, 4, 0.1);
  background-size: 42px 42px, 42px 42px, cover, auto;
  box-shadow:
    inset 0 0 54px rgba(112, 216, 230, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 42px rgba(112, 216, 230, 0.2);
}

body.is-lab .cube-top,
body.is-lab .cube-bottom,
body.is-lab .cube-left,
body.is-lab .cube-right,
body.is-lab .cube-back {
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(120deg, rgba(112, 216, 230, 0.18), rgba(247, 245, 239, 0.035) 42%, rgba(255, 188, 97, 0.1)),
    var(--scene-image) center / cover no-repeat;
  background-size: 34px 34px, 34px 34px, auto, cover;
  backdrop-filter: blur(1px);
  filter: brightness(0.48) saturate(0.85) contrast(1.1);
}

body.is-lab .cube-front img {
  opacity: 0.96;
  filter: contrast(1.16) saturate(0.9) brightness(0.82);
}

body.is-lab .cube-core {
  opacity: 0.14;
  background:
    radial-gradient(circle at 48% 48%, rgba(247, 245, 239, 0.18), transparent 4%, transparent 22%, rgba(112, 216, 230, 0.12) 23%, transparent 44%);
}

body.is-lab .fusion-frame .spatial-stage figcaption,
body.is-lab .fusion-frame .recompute-badge {
  display: none;
}

body.is-lab .fusion-frame .scene-orbit {
  left: 4%;
  top: 30%;
  width: 36%;
  height: 48%;
  z-index: 7;
}

body.is-lab .fusion-frame .scene-card {
  width: min(320px, 24vw);
  aspect-ratio: 16 / 10;
  min-height: 0;
  display: block;
  border: 1px solid rgba(247, 245, 239, 0.22);
  background:
    radial-gradient(circle at 50% 45%, rgba(247, 245, 239, 0.12), transparent 16%),
    var(--card-image) center / cover no-repeat,
    rgba(3, 4, 4, 0.28);
  opacity: var(--node-opacity, 0.5);
  filter: brightness(0.72) saturate(0.75);
  transform:
    translate(-50%, -50%)
    perspective(800px)
    rotateY(-35deg)
    rotateX(-7deg)
    scale(var(--node-scale, 0.56));
  box-shadow:
    inset 0 0 28px rgba(112, 216, 230, 0.12),
    0 0 30px rgba(112, 216, 230, 0.1);
}

body.is-lab .fusion-frame .scene-card::before {
  position: absolute;
  inset: -1px;
  width: auto;
  height: auto;
  border: 1px solid rgba(247, 245, 239, 0.26);
  border-radius: 0;
  background: linear-gradient(135deg, rgba(247, 245, 239, 0.08), transparent 52%);
  box-shadow: none;
}

body.is-lab .fusion-frame .scene-card::after {
  position: absolute;
  display: block;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent);
  background-size: 22px 22px, 22px 22px, auto;
}

body.is-lab .fusion-frame .scene-card[aria-pressed="true"] {
  opacity: 0;
  pointer-events: none;
}

body.is-lab .fusion-frame .scene-card span {
  display: none;
}

@media (max-width: 1080px) {
  body.is-lab .fusion-frame .spatial-stage {
    left: 32%;
    top: 25%;
    width: 60vw;
    height: 48vh;
  }

  body.is-lab .fusion-frame .scene-orbit {
    width: 42%;
  }
}

@media (max-width: 620px) {
  body.is-lab .fusion-frame .spatial-stage {
    left: 22%;
    top: 34%;
    width: 82vw;
    height: 38vh;
  }

  body.is-lab .fusion-frame .scene-orbit {
    left: 2%;
    top: 42%;
    width: 42%;
  }

  body.is-lab .fusion-frame .scene-card {
    width: 42vw;
  }
}

/* Fusion corridor replaces the old separated second-page panels. */
.fusion-frame {
  --scene-image: url("./assets/mindspace-spatial-cubes-v2.png");
  --active-color: var(--heat);
  background:
    radial-gradient(circle at 24% 45%, rgba(247, 245, 239, 0.08), transparent 8%),
    radial-gradient(circle at 54% 43%, rgba(112, 216, 230, 0.12), transparent 24%),
    radial-gradient(circle at 76% 58%, rgba(255, 188, 97, 0.1), transparent 26%),
    #030404;
  perspective: 1300px;
}

.fusion-frame::before {
  background:
    radial-gradient(circle at 31% 44%, rgba(247, 245, 239, 0.14), transparent 2%, transparent 12%, rgba(0, 0, 0, 0.34) 52%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.68), transparent 36%, rgba(0, 0, 0, 0.42));
}

.fusion-frame::after {
  position: absolute;
  inset: 0;
  z-index: 12;
  content: "";
  pointer-events: none;
  opacity: 0.18;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
}

.fusion-depth {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  transform-style: preserve-3d;
}

.fusion-depth::before,
.fusion-depth::after {
  position: absolute;
  left: 30%;
  top: 43%;
  width: 86vw;
  height: 1px;
  content: "";
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(247, 245, 239, 0.56), rgba(112, 216, 230, 0.2), transparent 78%);
  box-shadow: 0 0 24px rgba(112, 216, 230, 0.22);
}

.fusion-depth::before {
  transform: rotate(-13deg);
}

.fusion-depth::after {
  transform: rotate(17deg);
}

.fusion-plane {
  position: absolute;
  left: 7%;
  right: -10%;
  height: 46%;
  border: 1px solid rgba(247, 245, 239, 0.12);
  background:
    linear-gradient(rgba(255, 255, 255, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.052) 1px, transparent 1px),
    radial-gradient(circle at 25% 50%, rgba(112, 216, 230, 0.13), transparent 26%),
    transparent;
  background-size: 54px 54px, 54px 54px, auto, auto;
  opacity: 0.52;
  mask-image: linear-gradient(90deg, transparent, black 11%, black 82%, transparent);
}

.fusion-plane-top {
  top: -23%;
  transform: rotateX(-67deg) rotateZ(0.5deg);
  transform-origin: center bottom;
}

.fusion-plane-bottom {
  bottom: -18%;
  transform: rotateX(67deg) rotateZ(-0.5deg);
  transform-origin: center top;
}

.fusion-vanish {
  position: absolute;
  left: 30%;
  top: 43%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(247, 245, 239, 0.84);
  box-shadow:
    0 0 32px rgba(247, 245, 239, 0.9),
    0 0 88px rgba(112, 216, 230, 0.42),
    0 0 140px rgba(255, 188, 97, 0.2);
}

.fusion-title {
  position: absolute;
  left: clamp(26px, 3.8vw, 58px);
  top: clamp(28px, 4vw, 58px);
  z-index: 11;
  width: min(430px, 32vw);
  pointer-events: none;
}

.fusion-title p {
  margin: 0 0 10px;
  color: rgba(247, 245, 239, 0.48);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fusion-title h2 {
  margin: 0;
  color: rgba(247, 245, 239, 0.92);
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1.03;
  font-weight: 920;
}

.fusion-title span {
  display: block;
  max-width: 34em;
  margin-top: 12px;
  color: rgba(247, 245, 239, 0.58);
  font-size: 13px;
  line-height: 1.55;
}

.fusion-brain {
  position: absolute;
  left: 23%;
  top: 12%;
  z-index: 7;
  width: min(640px, 44vw);
  height: 76%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.fusion-brain::before {
  position: absolute;
  inset: 8% 1% 2% -5%;
  content: "";
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 46%, rgba(112, 216, 230, 0.13), transparent 33%),
    radial-gradient(circle at 21% 54%, rgba(255, 96, 56, 0.16), transparent 26%);
  filter: blur(18px);
}

.fusion-brain-label {
  position: absolute;
  left: 49%;
  top: 16%;
  z-index: 3;
  display: grid;
  gap: 5px;
  color: rgba(247, 245, 239, 0.58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 0 22px rgba(0, 0, 0, 0.9);
}

.fusion-brain-label strong {
  color: rgba(247, 245, 239, 0.84);
  font-size: 12px;
}

.fusion-brain .brain-stage {
  inset: 0;
  overflow: visible;
}

.fusion-brain .brain-stage img {
  width: 122%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: translateX(-14%);
  opacity: 0.88;
  filter: contrast(1.08) brightness(0.96) saturate(0.88) drop-shadow(0 0 34px rgba(112, 216, 230, 0.12));
}

.fusion-brain .brain-stage::after {
  background:
    radial-gradient(circle at 54% 47%, transparent 0 28%, rgba(3, 4, 4, 0.14) 55%, rgba(3, 4, 4, 0.7) 100%),
    linear-gradient(90deg, transparent 0 64%, rgba(3, 4, 4, 0.38));
}

.fusion-scene {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.fusion-frame .scene-orbit {
  position: absolute;
  left: 12%;
  top: 29%;
  z-index: 10;
  width: 32%;
  height: 50%;
  display: block;
  outline: none;
  perspective: 800px;
}

.fusion-frame .scene-card {
  position: absolute;
  left: var(--node-x, 50%);
  top: var(--node-y, 50%);
  min-height: 0;
  width: min(230px, 28vw);
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(247, 245, 239, 0.76);
  text-align: left;
  background: transparent;
  box-shadow: none;
  opacity: var(--node-opacity, 0.58);
  transform: translate(-50%, -50%) scale(var(--node-scale, 0.86));
  transform-origin: left center;
}

.fusion-frame .scene-card::before {
  position: relative;
  width: 12px;
  height: 12px;
  content: "";
  border: 1px solid rgba(247, 245, 239, 0.58);
  border-radius: 999px;
  background: rgba(3, 4, 4, 0.46);
  box-shadow:
    0 0 18px rgba(112, 216, 230, 0.34),
    0 0 48px rgba(255, 188, 97, 0.14);
}

.fusion-frame .scene-card::after {
  display: none;
}

.fusion-frame .scene-card[aria-pressed="true"] {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
  opacity: 1;
}

.fusion-frame .scene-card[aria-pressed="true"]::before {
  width: 16px;
  height: 16px;
  background: var(--active-color);
  border-color: rgba(247, 245, 239, 0.82);
  box-shadow:
    0 0 20px var(--active-color),
    0 0 84px var(--active-color);
}

.fusion-frame .scene-card strong,
.fusion-frame .scene-card small {
  position: static;
  z-index: 1;
  display: block;
  padding: 0;
}

.fusion-frame .scene-card strong {
  color: rgba(247, 245, 239, 0.92);
  font-size: 14px;
  font-weight: 880;
  line-height: 1.05;
}

.fusion-frame .scene-card small {
  margin-top: 4px;
  color: rgba(247, 245, 239, 0.46);
  font-size: 10px;
  font-weight: 740;
}

.fusion-frame .scene-card[aria-pressed="true"] small {
  color: rgba(247, 245, 239, 0.68);
}

.fusion-frame .spatial-stage {
  position: absolute;
  left: 50%;
  top: 30%;
  z-index: 6;
  width: min(620px, 43vw);
  height: min(390px, 43vh);
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  perspective: 1300px;
  transform-style: preserve-3d;
}

.fusion-frame .spatial-stage::before,
.fusion-frame .spatial-stage::after {
  display: none;
}

.scene-cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(-9deg) rotateY(-24deg) translateZ(18px);
  transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1), filter 620ms ease;
}

.spatial-stage.is-recomputing .scene-cube {
  filter: blur(0.4px) saturate(1.18);
  transform: rotateX(-9deg) rotateY(-24deg) translateZ(18px) scale(1.035);
}

.cube-face {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(247, 245, 239, 0.3);
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    var(--scene-image) center / cover no-repeat,
    rgba(3, 4, 4, 0.28);
  background-size: 42px 42px, 42px 42px, cover, auto;
  box-shadow:
    inset 0 0 46px rgba(112, 216, 230, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 34px rgba(112, 216, 230, 0.15);
}

.cube-front,
.cube-back {
  inset: 0;
}

.cube-front {
  transform: translateZ(112px);
  background: rgba(3, 4, 4, 0.36);
}

.cube-front img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0.92;
  filter: contrast(1.12) saturate(0.92) brightness(0.88);
  transform: none;
}

.cube-front::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 48% 42%, transparent 0 24%, rgba(0, 0, 0, 0.12) 48%, rgba(0, 0, 0, 0.48)),
    linear-gradient(90deg, rgba(112, 216, 230, 0.14), transparent 32%, rgba(255, 188, 97, 0.1));
}

.cube-back {
  opacity: 0.42;
  transform: translateZ(-112px) scale(0.96);
}

.cube-left,
.cube-right {
  top: 0;
  width: 224px;
  height: 100%;
  opacity: 0.42;
}

.cube-left {
  left: -112px;
  transform: rotateY(90deg);
}

.cube-right {
  right: -112px;
  transform: rotateY(-90deg);
}

.cube-top,
.cube-bottom {
  left: 0;
  width: 100%;
  height: 224px;
  opacity: 0.35;
}

.cube-top {
  top: -112px;
  transform: rotateX(-90deg);
}

.cube-bottom {
  bottom: -112px;
  transform: rotateX(90deg);
}

.cube-core {
  position: absolute;
  inset: -18%;
  transform: translateZ(8px);
  pointer-events: none;
  background:
    radial-gradient(circle at 54% 48%, rgba(247, 245, 239, 0.18), transparent 4%, transparent 15%, rgba(112, 216, 230, 0.09) 16%, transparent 38%),
    radial-gradient(circle at 70% 56%, var(--active-color), transparent 10%);
  opacity: 0.44;
  mix-blend-mode: screen;
}

.fusion-frame .spatial-stage figcaption {
  position: absolute;
  left: 4%;
  bottom: -44px;
  z-index: 5;
  color: rgba(247, 245, 239, 0.72);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: none;
}

.fusion-frame .recompute-badge {
  right: -18px;
  top: -42px;
  border-color: rgba(247, 245, 239, 0.24);
  background: rgba(3, 4, 4, 0.36);
  backdrop-filter: blur(12px);
}

@media (prefers-reduced-motion: no-preference) {
  .fusion-vanish {
    animation: fusionPulse 2.9s ease-in-out infinite;
  }

  .scene-cube {
    animation: cubeFloat 6.2s ease-in-out infinite;
  }
}

@keyframes fusionPulse {
  0%, 100% { transform: scale(1); opacity: 0.82; }
  50% { transform: scale(1.55); opacity: 1; }
}

@keyframes cubeFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@media (max-width: 1080px) {
  .fusion-frame {
    min-height: calc(100dvh - 98px);
  }

  .fusion-title {
    width: min(620px, 86vw);
  }

  .fusion-brain {
    left: 8%;
    top: 17%;
    width: 66%;
    height: 54%;
  }

  .fusion-frame .scene-orbit {
    left: 8%;
    top: 66%;
    width: 48%;
    height: 25%;
  }

  .fusion-frame .spatial-stage {
    left: 39%;
    top: 50%;
    width: min(520px, 54vw);
    height: 300px;
  }
}

@media (max-width: 620px) {
  .fusion-frame {
    min-height: calc(100dvh - 88px);
  }

  .fusion-title {
    top: 24px;
    left: 22px;
    width: calc(100% - 44px);
  }

  .fusion-title h2 {
    font-size: 28px;
  }

  .fusion-title span {
    font-size: 12px;
  }

  .fusion-brain {
    left: -12%;
    top: 17%;
    width: 105%;
    height: 47%;
  }

  .fusion-brain-label {
    left: 55%;
    top: 18%;
  }

  .fusion-frame .spatial-stage {
    left: 18%;
    top: 55%;
    width: 72%;
    height: 230px;
  }

  .fusion-frame .scene-orbit {
    left: 8%;
    top: 70%;
    width: 56%;
    height: 22%;
  }

  .fusion-frame .scene-card {
    width: 180px;
  }

  .cube-left,
  .cube-right {
    width: 150px;
  }

  .cube-left {
    left: -75px;
  }

  .cube-right {
    right: -75px;
  }

  .cube-top,
  .cube-bottom {
    height: 150px;
  }

  .cube-top {
    top: -75px;
  }

  .cube-bottom {
    bottom: -75px;
  }

  .cube-front {
    transform: translateZ(75px);
  }

  .cube-back {
    transform: translateZ(-75px) scale(0.96);
  }
}

/* Shared-vanishing-point correction: every spatial box recedes to the left light source. */
body.is-lab .fusion-frame {
  --corridor-vanish-x: 12%;
  --corridor-vanish-y: 48%;
}

body.is-lab .fusion-frame .spatial-stage {
  left: 37%;
  top: 15%;
  width: min(760px, 54vw);
  height: min(650px, 70vh);
  z-index: 9;
  perspective: none;
}

body.is-lab .fusion-frame .spatial-stage::before {
  display: none;
}

body.is-lab .fusion-frame .spatial-stage::after {
  display: block;
  position: absolute;
  left: -42%;
  top: 72%;
  width: 142%;
  height: 42%;
  z-index: 0;
  content: "";
  clip-path: polygon(0 16%, 61% 0, 100% 24%, 33% 100%);
  border: 1px solid rgba(247, 245, 239, 0.2);
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 16% 26%, rgba(247, 245, 239, 0.28), transparent 8%, transparent 18%),
    var(--scene-image) center bottom / cover no-repeat;
  background-size: 34px 34px, 34px 34px, auto, cover;
  opacity: 0.58;
  filter: brightness(0.62) saturate(0.78) contrast(1.08);
  box-shadow:
    inset 0 0 50px rgba(112, 216, 230, 0.16),
    0 0 48px rgba(112, 216, 230, 0.16);
  mask-image: linear-gradient(90deg, transparent, black 9%, black 88%, transparent);
}

body.is-lab .scene-cube,
body.is-lab .spatial-stage.is-recomputing .scene-cube {
  inset: 0;
  transform: none;
  animation: none;
  filter: none;
}

body.is-lab .cube-front,
body.is-lab .cube-left,
body.is-lab .cube-top,
body.is-lab .cube-bottom {
  position: absolute;
  display: block;
  transform: none;
  transform-origin: center;
}

body.is-lab .cube-front {
  left: 38%;
  top: 4%;
  width: 58%;
  height: 74%;
  z-index: 4;
  border-color: rgba(247, 245, 239, 0.48);
}

body.is-lab .cube-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
  filter: contrast(1.18) saturate(0.9) brightness(0.78);
}

body.is-lab .cube-left {
  left: -2%;
  top: 8%;
  width: 42%;
  height: 68%;
  z-index: 3;
  clip-path: polygon(100% 0, 0 22%, 0 76%, 100% 100%);
  border-color: rgba(247, 245, 239, 0.3);
  opacity: 0.58;
  background:
    linear-gradient(rgba(255, 255, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.08) 1px, transparent 1px),
    linear-gradient(100deg, rgba(112, 216, 230, 0.16), rgba(247, 245, 239, 0.035) 46%, rgba(255, 188, 97, 0.1)),
    var(--scene-image) 18% center / cover no-repeat;
  background-size: 30px 30px, 30px 30px, auto, cover;
  filter: brightness(0.58) saturate(0.78) contrast(1.12);
}

body.is-lab .cube-top {
  left: -2%;
  top: -10%;
  width: 98%;
  height: 18%;
  z-index: 2;
  clip-path: polygon(41% 100%, 0 34%, 100% 0, 100% 100%);
  border-color: rgba(247, 245, 239, 0.24);
  opacity: 0.46;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.07) 1px, transparent 1px),
    linear-gradient(120deg, rgba(112, 216, 230, 0.16), transparent 54%, rgba(255, 188, 97, 0.1)),
    var(--scene-image) center 12% / cover no-repeat;
  background-size: 30px 30px, 30px 30px, auto, cover;
  filter: brightness(0.52) saturate(0.7);
}

body.is-lab .cube-bottom {
  left: -2%;
  top: 76%;
  width: 98%;
  height: 22%;
  z-index: 2;
  clip-path: polygon(0 0, 41% 0, 100% 100%, 22% 100%);
  border-color: rgba(112, 216, 230, 0.18);
  opacity: 0.36;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.07) 1px, transparent 1px),
    var(--scene-image) center bottom / cover no-repeat;
  background-size: 30px 30px, 30px 30px, cover;
  filter: brightness(0.46) saturate(0.64);
}

body.is-lab .cube-right,
body.is-lab .cube-back,
body.is-lab .cube-core {
  display: none;
}

body.is-lab .fusion-frame .scene-card .orbit-cube {
  transform: none;
}

body.is-lab .orbit-front {
  left: 36%;
  top: 5%;
  width: 62%;
  height: 74%;
  transform: none;
  z-index: 4;
}

body.is-lab .orbit-side {
  left: 0;
  top: 10%;
  width: 38%;
  height: 66%;
  right: auto;
  transform: none;
  transform-origin: center;
  clip-path: polygon(100% 0, 0 25%, 0 75%, 100% 100%);
  opacity: 0.56;
  background:
    linear-gradient(90deg, rgba(112, 216, 230, 0.12), transparent),
    var(--card-image) 18% center / cover no-repeat;
}

body.is-lab .orbit-top {
  left: 0;
  top: -11%;
  width: 98%;
  height: 20%;
  transform: none;
  clip-path: polygon(37% 100%, 0 35%, 100% 0, 100% 100%);
}

body.is-lab .orbit-ground {
  left: -50%;
  top: 72%;
  width: 148%;
  height: 76%;
  transform: none;
  clip-path: polygon(0 18%, 58% 0, 100% 42%, 30% 100%);
  transform-origin: center;
}

@media (max-width: 1080px) {
  body.is-lab .fusion-frame .spatial-stage {
    left: 30%;
    top: 22%;
    width: 64vw;
    height: 54vh;
  }
}

@media (max-width: 620px) {
  body.is-lab .fusion-frame .spatial-stage {
    left: 18%;
    top: 32%;
    width: 88vw;
    height: 42vh;
  }
}

/* Reference-procession v9: a continuous cube train sharing the left vanishing point. */
body.is-lab .fusion-frame {
  --corridor-vanish-x: 12%;
  --corridor-vanish-y: 48%;
  background:
    radial-gradient(circle at 12% 48%, rgba(247, 245, 239, 0.46), transparent 1.1%, transparent 6%, rgba(112, 216, 230, 0.1) 7%, transparent 23%),
    radial-gradient(circle at 72% 46%, rgba(112, 216, 230, 0.08), transparent 30%),
    linear-gradient(90deg, rgba(1, 2, 2, 0.96), rgba(4, 8, 8, 0.86) 42%, rgba(1, 2, 2, 0.94)),
    #020303;
}

body.is-lab .fusion-frame::before {
  opacity: 0.9;
  background:
    radial-gradient(circle at var(--corridor-vanish-x) var(--corridor-vanish-y), rgba(247, 245, 239, 0.52), transparent 1.2%, transparent 8%, rgba(0, 0, 0, 0.14) 9%, rgba(0, 0, 0, 0.7) 86%),
    repeating-radial-gradient(circle at var(--corridor-vanish-x) var(--corridor-vanish-y), rgba(112, 216, 230, 0.055) 0 1px, transparent 1px 48px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), transparent 38%, rgba(0, 0, 0, 0.42));
}

body.is-lab .fusion-frame::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 6% 16%, rgba(112, 216, 230, 0.32) 0 1px, transparent 2px),
    radial-gradient(circle at 23% 9%, rgba(247, 245, 239, 0.28) 0 1px, transparent 2px),
    radial-gradient(circle at 39% 18%, rgba(112, 216, 230, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 12%, rgba(247, 245, 239, 0.2) 0 1px, transparent 2px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.026) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    auto,
    auto,
    42px 42px,
    42px 42px;
  mask-image: radial-gradient(circle at 55% 50%, black, transparent 74%);
  opacity: 0.62;
}

body.is-lab .fusion-plane {
  opacity: 0.24;
  mask-image: linear-gradient(90deg, transparent, black 18%, black 82%, transparent);
}

body.is-lab .fusion-frame .scene-orbit {
  z-index: 7;
}

body.is-lab .fusion-frame .scene-orbit::before,
body.is-lab .fusion-frame .scene-orbit::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(247, 245, 239, 0.18);
  clip-path: polygon(38% 0, 100% 13%, 100% 87%, 38% 100%, 0 72%, 0 28%);
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.05) 1px, transparent 1px),
    rgba(112, 216, 230, 0.025);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow:
    inset 0 0 26px rgba(112, 216, 230, 0.12),
    0 0 22px rgba(112, 216, 230, 0.1);
}

body.is-lab .fusion-frame .scene-orbit::before {
  left: 4.6%;
  top: 44%;
  width: min(150px, 15vw);
  height: min(92px, 10vw);
  opacity: 0.48;
}

body.is-lab .fusion-frame .scene-orbit::after {
  left: 20%;
  top: 38%;
  width: min(290px, 24vw);
  height: min(178px, 15vw);
  opacity: 0.38;
}

body.is-lab .fusion-frame .scene-card {
  width: min(430px, 34vw);
  transform:
    translate(-50%, -50%)
    scale(var(--node-scale, 0.5));
  filter: brightness(0.76) saturate(0.82) contrast(1.08);
}

body.is-lab .fusion-frame .scene-card[data-offset="-1"] {
  filter: brightness(0.82) saturate(0.76) contrast(1.12);
}

body.is-lab .fusion-frame .scene-card[data-offset="1"] {
  filter: brightness(0.94) saturate(0.82) contrast(1.12);
}

body.is-lab .fusion-frame .scene-card .orbit-cube {
  transform: none;
  filter:
    drop-shadow(0 0 8px rgba(247, 245, 239, 0.2))
    drop-shadow(0 0 24px rgba(112, 216, 230, 0.14));
}

body.is-lab .fusion-frame .scene-card .orbit-cube::after {
  position: absolute;
  inset: -4%;
  z-index: 8;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 0 50%, rgba(247, 245, 239, 0.9) 0 2px, transparent 4px),
    radial-gradient(circle at 38% 5%, rgba(247, 245, 239, 0.72) 0 2px, transparent 4px),
    radial-gradient(circle at 99% 6%, rgba(247, 245, 239, 0.72) 0 2px, transparent 4px),
    radial-gradient(circle at 99% 82%, rgba(247, 245, 239, 0.62) 0 2px, transparent 4px),
    radial-gradient(circle at 38% 94%, rgba(247, 245, 239, 0.62) 0 2px, transparent 4px);
  opacity: 0.82;
}

body.is-lab .orbit-front {
  left: 42%;
  top: 5%;
  width: 56%;
  height: 76%;
  z-index: 5;
  border-color: rgba(247, 245, 239, 0.42);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.055) 1px, transparent 1px),
    var(--card-image) center / cover no-repeat;
  background-size: 28px 28px, 28px 28px, cover;
  opacity: 0.92;
  filter: brightness(0.92) saturate(0.84) contrast(1.12);
}

body.is-lab .orbit-front::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 78% 18%, rgba(247, 245, 239, 0.3), transparent 3%, transparent 16%),
    linear-gradient(90deg, rgba(3, 4, 4, 0.12), transparent 44%, rgba(112, 216, 230, 0.1));
}

body.is-lab .orbit-side {
  left: 1%;
  top: 13%;
  width: 43%;
  height: 63%;
  z-index: 4;
  clip-path: polygon(100% 0, 0 28%, 0 72%, 100% 100%);
  border: 1px solid rgba(247, 245, 239, 0.28);
  opacity: 0.62;
  background:
    linear-gradient(90deg, rgba(112, 216, 230, 0.18), rgba(247, 245, 239, 0.035) 54%, rgba(255, 188, 97, 0.08)),
    var(--card-image) 18% center / cover no-repeat;
  filter: brightness(0.68) saturate(0.76) contrast(1.12);
}

body.is-lab .orbit-top {
  left: 1%;
  top: -8%;
  width: 97%;
  height: 20%;
  z-index: 3;
  clip-path: polygon(43% 100%, 0 34%, 100% 0, 100% 100%);
  border: 1px solid rgba(247, 245, 239, 0.2);
  opacity: 0.56;
  background:
    linear-gradient(120deg, rgba(112, 216, 230, 0.16), transparent 56%, rgba(255, 188, 97, 0.08)),
    var(--card-image) center top / cover no-repeat;
}

body.is-lab .orbit-ground {
  left: -54%;
  top: 74%;
  width: 152%;
  height: 70%;
  z-index: 2;
  clip-path: polygon(0 18%, 61% 0, 100% 42%, 29% 100%);
  opacity: 0.42;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.055) 1px, transparent 1px),
    var(--card-image) center bottom / cover no-repeat;
  background-size: 24px 24px, 24px 24px, cover;
  filter: brightness(0.46) saturate(0.66);
}

body.is-lab .fusion-frame .spatial-stage {
  left: 26%;
  top: 7%;
  width: min(1030px, 72vw);
  height: min(720px, 80vh);
  z-index: 9;
  perspective: none;
}

body.is-lab .fusion-frame .spatial-stage::before {
  display: block;
  left: 4%;
  top: 10%;
  width: 91%;
  height: 71%;
  z-index: 8;
  clip-path: polygon(0 31%, 55% 0, 94% 0, 94% 100%, 55% 100%, 0 68%);
  border: 1px solid rgba(247, 245, 239, 0.22);
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.045) 1px, transparent 1px),
    linear-gradient(108deg, rgba(112, 216, 230, 0.1), transparent 48%, rgba(255, 188, 97, 0.06));
  background-size: 34px 34px, 34px 34px, auto;
  opacity: 0.92;
  filter: none;
  box-shadow:
    inset 0 0 54px rgba(112, 216, 230, 0.12),
    0 0 48px rgba(112, 216, 230, 0.12);
}

body.is-lab .fusion-frame .spatial-stage::after {
  display: block;
  left: -18%;
  top: 78%;
  width: 116%;
  height: 28%;
  z-index: 0;
  clip-path: polygon(0 32%, 63% 0, 100% 26%, 48% 100%, 12% 78%);
  border: 1px solid rgba(112, 216, 230, 0.18);
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.055) 1px, transparent 1px),
    var(--scene-image) center bottom / cover no-repeat;
  background-size: 32px 32px, 32px 32px, cover;
  opacity: 0.42;
  filter: brightness(0.5) saturate(0.66) contrast(1.05);
  box-shadow:
    inset 0 0 42px rgba(112, 216, 230, 0.14),
    0 0 42px rgba(112, 216, 230, 0.1);
  mask-image: linear-gradient(90deg, transparent, black 9%, black 84%, transparent);
}

body.is-lab .scene-cube,
body.is-lab .spatial-stage.is-recomputing .scene-cube {
  inset: 0;
  transform: none;
  animation: none;
  filter:
    drop-shadow(0 0 12px rgba(247, 245, 239, 0.22))
    drop-shadow(0 0 44px rgba(112, 216, 230, 0.18));
}

body.is-lab .scene-cube::before,
body.is-lab .scene-cube::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

body.is-lab .scene-cube::before {
  z-index: 9;
  clip-path: polygon(4% 31%, 55% 8%, 94% 8%, 94% 80%, 55% 80%, 4% 66%);
  border: 1px solid rgba(247, 245, 239, 0.36);
  box-shadow:
    inset 0 0 58px rgba(112, 216, 230, 0.12),
    0 0 58px rgba(112, 216, 230, 0.14);
}

body.is-lab .scene-cube::after {
  z-index: 10;
  background:
    radial-gradient(circle at 4% 31%, rgba(247, 245, 239, 0.95) 0 3px, transparent 6px),
    radial-gradient(circle at 4% 66%, rgba(247, 245, 239, 0.82) 0 3px, transparent 6px),
    radial-gradient(circle at 55% 8%, rgba(247, 245, 239, 0.95) 0 3px, transparent 7px),
    radial-gradient(circle at 55% 80%, rgba(247, 245, 239, 0.86) 0 3px, transparent 7px),
    radial-gradient(circle at 94% 8%, rgba(247, 245, 239, 0.95) 0 3px, transparent 7px),
    radial-gradient(circle at 94% 80%, rgba(247, 245, 239, 0.9) 0 3px, transparent 7px);
  filter: drop-shadow(0 0 12px rgba(247, 245, 239, 0.72));
}

body.is-lab .cube-face {
  position: absolute;
  display: block;
  transform: none;
  transform-origin: center;
  border: 1px solid rgba(247, 245, 239, 0.34);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.052) 1px, transparent 1px),
    var(--scene-image) center / cover no-repeat,
    rgba(3, 4, 4, 0.14);
  background-size: 38px 38px, 38px 38px, cover, auto;
  box-shadow:
    inset 0 0 62px rgba(112, 216, 230, 0.14),
    0 0 34px rgba(112, 216, 230, 0.12);
}

body.is-lab .cube-front {
  left: 55%;
  top: 8%;
  width: 39%;
  height: 72%;
  z-index: 7;
  opacity: 0.94;
  border-color: rgba(247, 245, 239, 0.5);
}

body.is-lab .cube-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  filter: contrast(1.16) saturate(0.86) brightness(0.72);
}

body.is-lab .cube-back {
  left: 4%;
  top: 31%;
  width: 22%;
  height: 35%;
  z-index: 2;
  display: block;
  clip-path: polygon(0 9%, 100% 0, 100% 100%, 0 91%);
  opacity: 0.26;
  filter: brightness(0.42) saturate(0.62) contrast(1.08);
}

body.is-lab .cube-left {
  left: 4%;
  top: 8%;
  width: 51%;
  height: 72%;
  z-index: 4;
  display: block;
  clip-path: polygon(0 32%, 100% 0, 100% 100%, 0 68%);
  opacity: 0.5;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.05) 1px, transparent 1px),
    linear-gradient(100deg, rgba(112, 216, 230, 0.15), rgba(247, 245, 239, 0.03) 52%, rgba(255, 188, 97, 0.08)),
    var(--scene-image) 18% center / cover no-repeat;
  background-size: 34px 34px, 34px 34px, auto, cover;
  filter: brightness(0.52) saturate(0.72) contrast(1.12);
}

body.is-lab .cube-top {
  left: 4%;
  top: -7%;
  width: 90%;
  height: 15%;
  z-index: 5;
  display: block;
  clip-path: polygon(56% 100%, 0 100%, 56% 0, 100% 0, 100% 100%);
  opacity: 0.46;
  background:
    linear-gradient(116deg, rgba(112, 216, 230, 0.14), transparent 58%, rgba(255, 188, 97, 0.08)),
    var(--scene-image) center top / cover no-repeat;
}

body.is-lab .cube-bottom {
  left: 4%;
  top: 80%;
  width: 90%;
  height: 18%;
  z-index: 3;
  display: block;
  clip-path: polygon(0 0, 56% 0, 100% 0, 100% 100%, 56% 100%);
  opacity: 0.34;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 216, 230, 0.052) 1px, transparent 1px),
    var(--scene-image) center bottom / cover no-repeat;
  background-size: 32px 32px, 32px 32px, cover;
  filter: brightness(0.44) saturate(0.64);
}

body.is-lab .cube-right,
body.is-lab .cube-core {
  display: none;
}

@media (max-width: 1080px) {
  body.is-lab .fusion-frame .spatial-stage {
    left: 22%;
    top: 14%;
    width: 80vw;
    height: 60vh;
  }

  body.is-lab .fusion-frame .scene-card {
    width: 38vw;
  }
}

@media (max-width: 620px) {
  body.is-lab .fusion-frame .spatial-stage {
    left: 14%;
    top: 30%;
    width: 92vw;
    height: 43vh;
  }

  body.is-lab .fusion-frame .scene-card {
    width: 52vw;
  }

  body.is-lab .fusion-frame .scene-orbit::after {
    opacity: 0.16;
  }
}

/* Brain-signal v10: restore the integrated neural layer over the city procession. */
body.is-lab .fusion-frame {
  --corridor-vanish-x: 12%;
  --corridor-vanish-y: 48%;
  background:
    radial-gradient(circle at 76% 23%, rgba(112, 216, 230, 0.15), transparent 21%),
    radial-gradient(circle at 63% 17%, rgba(247, 245, 239, 0.08), transparent 16%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.24) 44%, rgba(0, 0, 0, 0.54)),
    url("./assets/mindspace-city-procession-approved-annotated.png") center / cover no-repeat,
    #020303;
}

body.is-lab .fusion-frame::before {
  z-index: 1;
  opacity: 0.86;
  background:
    radial-gradient(circle at 75% 24%, rgba(112, 216, 230, 0.18), transparent 16%, rgba(0, 0, 0, 0.08) 32%, rgba(0, 0, 0, 0.52) 88%),
    radial-gradient(circle at var(--corridor-vanish-x) var(--corridor-vanish-y), rgba(247, 245, 239, 0.28), transparent 1.1%, transparent 7%, rgba(0, 0, 0, 0.18) 8%, rgba(0, 0, 0, 0.45) 76%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 36%, rgba(0, 0, 0, 0.38));
}

body.is-lab .fusion-frame::after {
  z-index: 20;
  opacity: 0.42;
  mix-blend-mode: screen;
}

body.is-lab .fusion-depth {
  opacity: 0.7;
}

body.is-lab .fusion-plane {
  opacity: 0.13;
}

body.is-lab .fusion-title {
  display: none;
}

body.is-lab .fusion-frame .scene-orbit {
  left: 3%;
  top: 27%;
  width: 54%;
  height: 49%;
  z-index: 6;
  opacity: 0.72;
}

body.is-lab .fusion-frame .scene-card {
  width: min(340px, 25vw);
}

body.is-lab .fusion-frame .spatial-stage {
  left: 28%;
  top: 19%;
  width: min(640px, 38vw);
  height: min(520px, 50vh);
  z-index: 5;
  opacity: 0.42;
  pointer-events: none;
}

body.is-lab .fusion-frame .spatial-stage::before,
body.is-lab .fusion-frame .spatial-stage::after,
body.is-lab .scene-cube::before,
body.is-lab .scene-cube::after {
  opacity: 0.42;
}

body.is-lab .fusion-brain {
  display: block;
  left: 79.5%;
  top: 5.6%;
  z-index: 15;
  width: min(320px, 15.4vw);
  height: min(250px, 22vh);
  opacity: 0.42;
  pointer-events: none;
  mix-blend-mode: normal;
  isolation: isolate;
}

body.is-lab .fusion-brain::before {
  inset: 10% 8% 6% 2%;
  opacity: 0.12;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(112, 216, 230, 0.2), transparent 52%),
    radial-gradient(ellipse at 32% 58%, rgba(255, 96, 56, 0.16), transparent 36%);
  filter: blur(14px);
}

body.is-lab .fusion-brain-label {
  left: 8%;
  top: 3%;
  gap: 3px;
  color: rgba(247, 245, 239, 0.48);
  font-size: 10px;
}

body.is-lab .fusion-brain-label span {
  color: rgba(247, 245, 239, 0.5);
}

body.is-lab .fusion-brain-label strong {
  color: rgba(247, 245, 239, 0.78);
  font-size: 11px;
}

body.is-lab .fusion-brain .brain-stage {
  inset: 8% 2% 4% 0;
  overflow: visible;
  mask-image: radial-gradient(ellipse at 52% 51%, black 0 38%, rgba(0, 0, 0, 0.52) 54%, transparent 74%);
}

body.is-lab .fusion-brain .brain-stage img {
  width: 114%;
  height: 104%;
  object-fit: contain;
  object-position: center;
  transform: translate(-8%, -1%);
  opacity: 0.2;
  filter:
    contrast(1.12)
    brightness(0.44)
    saturate(0.48)
    drop-shadow(0 0 18px rgba(112, 216, 230, 0.1));
}

body.is-lab .fusion-brain .brain-stage::after {
  background:
    radial-gradient(ellipse at 54% 50%, transparent 0 36%, rgba(2, 3, 3, 0.16) 55%, rgba(2, 3, 3, 0.72) 100%),
    linear-gradient(90deg, rgba(2, 3, 3, 0.18), transparent 44%, rgba(2, 3, 3, 0.48));
}

body.is-lab #eegCanvas {
  mix-blend-mode: screen;
  opacity: 0.52;
}

.neuro-signal-field {
  position: absolute;
  left: 59.5%;
  top: 7.6%;
  z-index: 16;
  width: min(430px, 21vw);
  height: min(270px, 22vh);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 4px;
  color: rgba(247, 245, 239, 0.88);
  pointer-events: none;
}

.neuro-signal-field::before {
  position: absolute;
  left: 2%;
  right: 9%;
  top: 19%;
  height: 48%;
  content: "";
  background:
    linear-gradient(rgba(247, 245, 239, 0.94), rgba(247, 245, 239, 0.94)) 0 6% / 86% 2px no-repeat,
    linear-gradient(rgba(247, 245, 239, 0.84), rgba(247, 245, 239, 0.84)) 8% 34% / 82% 2px no-repeat,
    linear-gradient(rgba(247, 245, 239, 0.76), rgba(247, 245, 239, 0.76)) 0 62% / 92% 2px no-repeat,
    linear-gradient(rgba(247, 245, 239, 0.74), rgba(247, 245, 239, 0.74)) 8% 90% / 80% 2px no-repeat;
  filter: drop-shadow(0 0 10px rgba(247, 245, 239, 0.28));
  opacity: 0.16;
}

.signal-head {
  position: relative;
  z-index: 2;
  display: none;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.signal-head span {
  color: rgba(247, 245, 239, 0.58);
  font-size: 11px;
  font-weight: 760;
}

.signal-head strong {
  color: rgba(247, 245, 239, 0.86);
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

#victoryCanvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 120px;
  mix-blend-mode: screen;
  opacity: 0.72;
}

.neuro-signal-field .signal-atlas {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  max-width: 96%;
  opacity: 0.72;
}

.neuro-signal-field .signal-row {
  min-height: 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.neuro-signal-field .signal-label {
  left: 0;
  top: 0;
  gap: 0;
}

.neuro-signal-field .signal-label strong {
  max-width: 10ch;
  overflow: hidden;
  color: rgba(247, 245, 239, 0.54);
  font-size: 8px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neuro-signal-field .signal-label small {
  display: none;
}

.neuro-signal-field .signal-value {
  right: 0;
  bottom: 0;
}

.neuro-signal-field .signal-value strong {
  color: rgba(247, 245, 239, 0.66);
  font-size: 10px;
}

.neuro-signal-field .signal-value small {
  display: none;
}

.neuro-signal-field .signal-row canvas {
  display: none;
  opacity: 0;
  mix-blend-mode: screen;
}

@media (max-width: 1080px) {
  body.is-lab .fusion-frame .spatial-stage {
    left: 18%;
    top: 36%;
    width: 58vw;
    height: 38vh;
  }

  body.is-lab .fusion-brain {
    left: 66%;
    top: 8%;
    width: 29vw;
    height: 25vh;
  }

  .neuro-signal-field {
    left: 42%;
    top: 8%;
    width: 34vw;
    height: 25vh;
  }
}

@media (max-width: 620px) {
  body.is-lab .fusion-frame {
    background-position: 42% center;
  }

  body.is-lab .fusion-frame .spatial-stage {
    left: 8%;
    top: 45%;
    width: 70vw;
    height: 30vh;
  }

  body.is-lab .fusion-brain {
    left: 44%;
    top: 10%;
    width: 56vw;
    height: 28vh;
  }

  .neuro-signal-field {
    left: 6%;
    top: 10%;
    width: 42vw;
    height: 36vh;
  }

  .neuro-signal-field .signal-atlas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Approved-city v13: keep only the approved city plate plus the brain in the blue box. */
body.is-lab .fusion-frame {
  background: url("./assets/mindspace-city-procession-approved-annotated.png") center / cover no-repeat #020303;
}

body.is-lab .fusion-frame::before,
body.is-lab .fusion-frame::after,
body.is-lab #linkCanvas,
body.is-lab .fusion-depth,
body.is-lab .fusion-scene,
body.is-lab .neuro-signal-field {
  display: none;
}

body.is-lab .fusion-brain {
  display: block;
  left: 73.8%;
  top: 4.2%;
  z-index: 4;
  width: 20.6vw;
  max-width: 420px;
  height: 28.4vh;
  max-height: 360px;
  opacity: 0.82;
  mix-blend-mode: normal;
  pointer-events: none;
}

body.is-lab .fusion-brain::before,
body.is-lab .fusion-brain-label,
body.is-lab #eegCanvas,
body.is-lab .fusion-brain .brain-stage::after {
  display: none;
}

body.is-lab .fusion-brain .brain-stage {
  inset: 0;
  overflow: hidden;
  mask-image: radial-gradient(ellipse at 50% 46%, black 0 56%, rgba(0, 0, 0, 0.74) 67%, transparent 86%);
}

body.is-lab .fusion-brain .brain-stage img {
  width: 112%;
  height: 112%;
  object-fit: contain;
  object-position: center;
  transform: translate(-6%, -2%);
  opacity: 0.78;
  filter:
    contrast(1.05)
    brightness(0.72)
    saturate(0.7)
    drop-shadow(0 0 16px rgba(112, 216, 230, 0.1));
}

@media (max-width: 1080px) {
  body.is-lab .fusion-brain {
    left: 67%;
    top: 5%;
    width: 29vw;
    height: 26vh;
  }
}

@media (max-width: 620px) {
  body.is-lab .fusion-frame {
    background-position: center;
  }

  body.is-lab .fusion-brain {
    left: 55%;
    top: 5%;
    width: 40vw;
    height: 24vh;
  }
}
