@font-face {
  font-family: "Manrope";
  src: url("../../../open-runtime/3ae11c49db0455a3cc33e37d380f20fdb8c7f8b41dc07625c177e3d87a9d6ae6/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --abyss: #041219;
  --petrol: #0a2a33;
  --mist: #cfe3e8;
  --mist-dim: rgba(207, 227, 232, 0.62);
  --hairline: rgba(151, 196, 208, 0.22);
  --amber: #e8a34b;
  --lume: #9fe8cf;
  --serif: "Palatino Linotype", Palatino, Georgia, "Noto Serif SC", "Noto Serif CJK SC", serif;
  --sans: "Manrope", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--abyss);
  color: var(--mist);
  font-family: var(--sans);
  font-weight: 300;
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}
#stage canvas { display: block; width: 100%; height: 100%; }

/* ---------- 深度刻度仪：左侧纵向仪器边栏（文字一律水平） ---------- */
.depth-rail {
  position: fixed;
  left: 34px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.depth-rail__label {
  font-size: 10px;
  letter-spacing: 0.42em;
  color: var(--mist-dim);
}
.depth-rail__track {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding-left: 6px;
  border-left: 1px solid var(--hairline);
}
.depth-rail__row { display: flex; align-items: center; gap: 7px; }
.depth-rail .tick {
  width: 16px;
  height: 1px;
  background: var(--hairline);
  animation: tickPulse 5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.7s);
}
.depth-rail .tick--amber {
  width: 26px;
  background: var(--amber);
  box-shadow: 0 0 6px rgba(232, 163, 75, 0.5);
}
.depth-rail__row .v {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(151, 196, 208, 0.55);
  line-height: 1;
}
.depth-rail__row .amber { color: var(--amber); }
@keyframes tickPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* ---------- 品牌 ---------- */
.brand {
  position: fixed;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  pointer-events: none;
}
.brand__eyebrow {
  font-size: 11px;
  letter-spacing: 0.42em;
  color: rgba(151, 196, 208, 0.55);
  margin-bottom: 14px;
}
.brand__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 56px);
  letter-spacing: 0.14em;
  color: var(--mist);
  line-height: 1;
  text-indent: 0.14em;
}
.brand__tagline {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--mist-dim);
}

/* ---------- 部件图例 ---------- */
.legend {
  position: fixed;
  right: 38px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 218px;
  pointer-events: none;
}
.legend__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--mist-dim);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 12px;
}
.legend__list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.legend__item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--mist-dim);
  transition: color 0.5s ease;
}
.legend__item .idx {
  font-family: var(--serif);
  font-size: 11px;
  color: rgba(151, 196, 208, 0.45);
  min-width: 26px;
}
.legend__item.active { color: var(--mist); }
.legend__item.active .idx { color: var(--amber); }
.legend__hint {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.7;
  color: rgba(151, 196, 208, 0.45);
}

/* ---------- 控制台 ---------- */
.console {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
}
.console__status {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--mist-dim);
  margin-bottom: 14px;
  white-space: nowrap;
}
.console__buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--mist-dim);
  background: rgba(10, 42, 51, 0.35);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.btn:hover, .btn:focus-visible {
  color: var(--mist);
  border-color: rgba(232, 163, 75, 0.55);
  outline: none;
}
.btn--lang { padding: 8px 14px; font-size: 11px; }
.btn--lang[aria-current="true"] {
  color: var(--amber);
  border-color: rgba(232, 163, 75, 0.55);
}
.btn--primary[aria-pressed="true"] {
  color: var(--amber);
  border-color: rgba(232, 163, 75, 0.7);
  background: rgba(232, 163, 75, 0.08);
}
.btn-sep {
  width: 1px;
  height: 20px;
  background: var(--hairline);
  margin: 0 4px;
}
.console__hint {
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(151, 196, 208, 0.4);
}

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
  /* 深度尺在窄屏收起，把画面让给产品 */
  .depth-rail { display: none; }
  .brand { top: 20px; }
  .brand__eyebrow { font-size: 9px; letter-spacing: 0.3em; }
  .brand__title { font-size: 30px; }
  .brand__tagline { font-size: 11px; }
  /* 装配态：图例收起（不再压在表带下半段上）；
     展开态：另排在标题下方独立分区，与模型分带互不遮挡 */
  .legend { display: none; }
  body.mode-exploded .legend {
    display: block;
    left: 16px;
    right: 16px;
    top: 128px;
    bottom: auto;
    transform: none;
    width: auto;
  }
  body.mode-exploded .legend__title { display: none; }
  body.mode-exploded .legend__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 12px;
  }
  body.mode-exploded .legend__item { font-size: 10px; gap: 6px; }
  body.mode-exploded .legend__item .idx { min-width: 20px; font-size: 10px; }
  body.mode-exploded .legend__item small { font-size: 9px; }
  .legend__hint { display: none; }
  .console { bottom: 18px; width: 100%; }
  .console__status { font-size: 10px; margin-bottom: 10px; }
  .btn { padding: 8px 13px; font-size: 11px; letter-spacing: 0.1em; }
  .console__hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .depth-rail .tick { animation: none; opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01s !important; }
}
