/* ==========================================================================
   OSMO ACTION 4 — STRUCTURE LAB
   Procedural Three.js teardown / interface system
   ========================================================================== */

:root {
  --bg: #050808;
  --bg-deep: #020404;
  --panel: rgba(8, 13, 14, 0.82);
  --panel-solid: #080d0e;
  --panel-lift: rgba(14, 22, 22, 0.9);
  --line: rgba(142, 194, 184, 0.13);
  --line-soft: rgba(142, 194, 184, 0.075);
  --line-strong: rgba(110, 247, 215, 0.36);
  --text: #e8f1ed;
  --text-soft: #b3c2bd;
  --muted: #7b8d88;
  --dim: #4b5b57;
  --accent: #66f6d3;
  --accent-rgb: 102, 246, 211;
  --accent-soft: rgba(102, 246, 211, 0.12);
  --orange: #ff8a50;
  --orange-rgb: 255, 138, 80;
  --danger: #ff5d62;
  --sans: "Bahnschrift", "DIN Alternate", "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-h: 70px;
  --dock-h: 88px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  color: inherit;
  font: inherit;
  border: 0;
  background: none;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  color: #02110d;
  background: var(--accent);
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(102, 246, 211, 0.22);
  border-radius: 4px;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-rows: var(--topbar-h) minmax(0, 1fr) var(--dock-h);
  width: 100%;
  height: 100dvh;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 69% 40%, rgba(19, 68, 60, 0.16), transparent 42%),
    radial-gradient(circle at 16% 84%, rgba(255, 122, 56, 0.035), transparent 34%),
    linear-gradient(145deg, #070b0c 0%, #040707 46%, #050909 100%);
}

.app-shell::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(128, 201, 187, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 201, 187, 0.035) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 15%, transparent 76%);
}

.page-glow {
  position: absolute;
  z-index: 0;
  width: 52vw;
  height: 52vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.12;
}

.page-glow--a {
  top: -30vw;
  right: 4vw;
  background: #1ad9b6;
}

.page-glow--b {
  bottom: -38vw;
  left: -10vw;
  background: #d46b35;
  opacity: 0.055;
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.13;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
  mix-blend-mode: multiply;
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(6, 10, 11, 0.94), rgba(6, 10, 11, 0.48));
  backdrop-filter: blur(18px);
}

.topbar::after {
  position: absolute;
  bottom: -1px;
  left: 24px;
  width: 76px;
  height: 1px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.7);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 34px;
  overflow: hidden;
}

.brand-mark__text {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.8px;
  color: #f6fffc;
}

.brand-mark__beam {
  position: absolute;
  top: 50%;
  left: 6px;
  width: 36px;
  height: 3px;
  background: var(--bg);
  transform: rotate(-17deg);
  opacity: 0.8;
}

.brand-rule {
  width: 1px;
  height: 26px;
  margin: 0 16px 0 10px;
  background: var(--line);
}

.brand-product {
  min-width: 0;
}

.brand-product__name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.brand-product__name b {
  color: var(--accent);
  font-weight: 700;
}

.brand-product__sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.7px;
  white-space: nowrap;
}

.brand-product__sub span {
  margin: 0 4px;
  color: var(--dim);
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1.5px;
}

.live-pip {
  position: relative;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
}

.live-pip::after {
  position: absolute;
  inset: -3px;
  content: "";
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 50%;
  animation: pipPulse 2.4s ease-out infinite;
}

.topbar-slash {
  color: var(--dim);
}

.topbar-code {
  color: var(--text-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.render-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.render-status__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.render-status b {
  color: var(--text-soft);
  font-weight: 500;
}

.render-status__unit {
  color: var(--dim);
}

.guide-button {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text-soft);
  font-size: 10px;
  letter-spacing: 0.7px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}

.guide-button:hover {
  color: var(--accent);
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.05);
}

.guide-button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.guide-button kbd {
  display: grid;
  width: 16px;
  height: 16px;
  margin-left: 3px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

/* ==========================================================================
   WORKSPACE & PANELS
   ========================================================================== */

.workspace {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr) 336px;
  gap: 14px;
  min-height: 0;
  padding: 0 20px 14px;
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    linear-gradient(150deg, rgba(17, 27, 27, 0.5), transparent 38%),
    linear-gradient(180deg, rgba(8, 13, 14, 0.9), rgba(5, 9, 10, 0.88));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(206, 255, 244, 0.025);
  backdrop-filter: blur(16px);
  animation: panelEnter 0.9s var(--ease) both;
}

.panel::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(rgba(var(--accent-rgb), 0.1) 0.5px, transparent 0.5px);
  background-size: 7px 7px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.4), transparent 75%);
}

.info-panel {
  animation-delay: 0.11s;
}

.parts-panel {
  animation-delay: 0.05s;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-corner {
  position: absolute;
  z-index: 4;
  width: 9px;
  height: 9px;
  pointer-events: none;
}

.panel-corner--tl {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  opacity: 0.7;
}

.panel-corner--tr {
  top: -1px;
  right: -1px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  opacity: 0.7;
}

.panel-corner--bl {
  bottom: -1px;
  left: -1px;
  border-bottom: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  opacity: 0.7;
}

.panel-corner--br {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  opacity: 0.7;
}

.panel-head {
  flex: 0 0 auto;
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head--info {
  padding-bottom: 12px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

.kicker__index {
  color: var(--accent);
  opacity: 0.75;
}

.kicker__line {
  flex: 1;
  height: 1px;
  margin-left: 2px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.panel-title {
  margin: 0;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 1px;
}

.panel-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.5px;
}

.panel-subtitle b {
  color: var(--accent);
  font-weight: 500;
}

.mode-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 23px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 1px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.9px;
  white-space: nowrap;
}

.mode-pill i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.6);
}

.mode-pill.is-part {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.05);
}

.panel-close {
  display: none;
  width: 30px;
  height: 30px;
  margin: -4px -4px 0 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  cursor: pointer;
}

.panel-close svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

/* Filters ------------------------------------------------------------------ */

.filter-row {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.filter-chip {
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 1px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: color 0.22s, border-color 0.22s, background 0.22s;
}

.filter-chip:hover {
  color: var(--text-soft);
}

.filter-chip.is-active {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.07);
}

/* Component list ----------------------------------------------------------- */

.parts-list {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 7px 9px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.part-item {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 41px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s, color 0.25s;
}

.part-item + .part-item {
  margin-top: 1px;
}

.part-item::before {
  position: absolute;
  top: 50%;
  left: -1px;
  width: 1px;
  height: 0;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
  transform: translateY(-50%);
  transition: height 0.32s var(--ease);
}

.part-item:hover {
  color: var(--text);
  border-color: var(--line-soft);
  background: rgba(137, 197, 185, 0.045);
}

.part-item.is-hover {
  border-color: rgba(var(--accent-rgb), 0.15);
  background: rgba(var(--accent-rgb), 0.035);
}

.part-item.is-active {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.22);
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.11), rgba(var(--accent-rgb), 0.018) 72%, transparent);
}

.part-item.is-active::before {
  height: 68%;
}

.part-item.is-hidden {
  display: none;
}

.part-item__idx {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.4px;
  transition: color 0.25s;
}

.part-item.is-active .part-item__idx {
  color: var(--accent);
}

.part-item__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.part-item__name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.part-item__en {
  overflow: hidden;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7.5px;
  line-height: 1.2;
  letter-spacing: 0.7px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s;
}

.part-item.is-active .part-item__en {
  color: rgba(var(--accent-rgb), 0.63);
}

.part-item__status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8px;
  height: 8px;
}

.part-item__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
  transition: background 0.25s, box-shadow 0.25s;
}

.part-item.is-hover .part-item__dot,
.part-item.is-active .part-item__dot {
  background: var(--accent);
  box-shadow: 0 0 7px rgba(var(--accent-rgb), 0.9);
}

.part-item.is-out .part-item__dot {
  background: var(--orange);
  box-shadow: 0 0 7px rgba(var(--orange-rgb), 0.8);
}

/* Panel foot --------------------------------------------------------------- */

.panel-foot {
  flex: 0 0 auto;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--line-soft);
  background: rgba(4, 8, 9, 0.38);
}

.assembly-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.7px;
}

.assembly-readout__label {
  color: var(--dim);
}

.assembly-readout__state {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-soft);
}

.assembly-readout__state i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.8);
}

.assembly-readout__state.is-split {
  color: var(--orange);
}

.assembly-readout__state.is-split i {
  background: var(--orange);
  box-shadow: 0 0 6px rgba(var(--orange-rgb), 0.8);
}

.assembly-bar {
  height: 1px;
  margin: 10px 0 9px;
  overflow: hidden;
  background: var(--line-soft);
}

.assembly-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb), 0.2));
  box-shadow: 0 0 9px rgba(var(--accent-rgb), 0.5);
  transition: width 0.6s var(--ease);
}

.panel-foot-meta {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.6px;
}

.panel-foot--info {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.8px;
}

.panel-foot-code {
  color: var(--accent);
  opacity: 0.6;
}

/* ==========================================================================
   VIEWPORT
   ========================================================================== */

.viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    radial-gradient(ellipse at 53% 43%, rgba(26, 88, 77, 0.23), transparent 50%),
    radial-gradient(ellipse at 48% 68%, rgba(18, 35, 33, 0.6), transparent 63%),
    linear-gradient(180deg, #060b0c 0%, #040707 100%);
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, 0.46),
    0 24px 60px rgba(0, 0, 0, 0.2);
  animation: viewportEnter 1.1s 0.02s var(--ease) both;
}

.viewport::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(185, 255, 239, 0.02);
}

#scene-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  cursor: grab;
}

#scene-canvas.is-dragging {
  cursor: grabbing;
}

#scene-canvas.is-over-part {
  cursor: pointer;
}

.viewport-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 6, 7, 0.42) 0%, transparent 18%, transparent 76%, rgba(3, 6, 7, 0.58) 100%),
    radial-gradient(ellipse at center, transparent 42%, rgba(2, 5, 5, 0.48) 100%);
}

.viewport-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.36;
  background-image:
    linear-gradient(90deg, transparent 49.92%, rgba(var(--accent-rgb), 0.06) 50%, transparent 50.08%),
    linear-gradient(transparent 49.92%, rgba(var(--accent-rgb), 0.06) 50%, transparent 50.08%);
  mask-image: radial-gradient(ellipse at center, transparent 28%, #000 82%);
}

.viewport-meta {
  position: absolute;
  top: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(157, 183, 176, 0.5);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 1.1px;
  pointer-events: none;
}

.viewport-meta--tl {
  left: 21px;
}

.viewport-meta--tr {
  right: 21px;
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.6);
}

.meta-sep {
  width: 12px;
  height: 1px;
  background: var(--line);
}

.hud-corner {
  position: absolute;
  z-index: 5;
  width: 17px;
  height: 17px;
  pointer-events: none;
  opacity: 0.5;
}

.hud-corner--tl {
  top: 12px;
  left: 12px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.hud-corner--tr {
  top: 12px;
  right: 12px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
}

.hud-corner--bl {
  bottom: 12px;
  left: 12px;
  border-bottom: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.hud-corner--br {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

/* Scene caption ------------------------------------------------------------ */

.scene-caption {
  position: absolute;
  bottom: 20px;
  left: 23px;
  z-index: 5;
  pointer-events: none;
}

.scene-caption__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 1.1px;
}

.scene-caption__eyebrow i {
  width: 14px;
  height: 1px;
  background: var(--line-strong);
}

.scene-caption__title {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.scene-caption__title em {
  margin-left: 6px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.9px;
}

.scene-caption__meta {
  margin-top: 6px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.8px;
}

.scene-caption__meta span {
  margin: 0 3px;
  color: rgba(var(--accent-rgb), 0.4);
}

/* View widget -------------------------------------------------------------- */

.view-widget {
  position: absolute;
  right: 23px;
  bottom: 20px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.view-widget__orb {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.view-widget__orb::before {
  position: absolute;
  inset: 8px;
  content: "";
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 50%;
}

.view-widget__orb::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  content: "";
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 7px rgba(var(--accent-rgb), 0.7);
}

.axis {
  position: absolute;
  font-family: var(--mono);
  font-size: 6px;
  line-height: 1;
}

.axis--x {
  top: 19px;
  right: 4px;
  color: var(--accent);
}

.axis--y {
  top: 4px;
  left: 19px;
  color: var(--orange);
}

.axis--z {
  bottom: 5px;
  left: 9px;
  color: #7da6ff;
}

.axis-line {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 1px;
  opacity: 0.55;
  transform-origin: left center;
}

.axis-line--x {
  width: 14px;
  background: var(--accent);
  transform: rotate(0deg);
}

.axis-line--y {
  width: 14px;
  background: var(--orange);
  transform: rotate(-90deg);
}

.axis-line--z {
  width: 13px;
  background: #7da6ff;
  transform: rotate(132deg);
}

.view-widget__label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 1px;
}

/* Interact note ------------------------------------------------------------- */

.interact-note {
  position: absolute;
  bottom: 21px;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px 7px 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 2px;
  color: var(--text-soft);
  font-size: 9px;
  letter-spacing: 0.5px;
  background: rgba(5, 11, 11, 0.55);
  backdrop-filter: blur(8px);
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.5s, transform 0.5s var(--ease);
}

.interact-note__ring {
  position: relative;
  display: grid;
  width: 12px;
  height: 12px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 50%;
}

.interact-note__ring::after {
  position: absolute;
  inset: -4px;
  content: "";
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 50%;
  animation: notePulse 2.4s ease-out infinite;
}

.interact-note__ring i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.8);
}

.interact-note__en {
  padding-left: 2px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.7px;
}

.interact-note.is-hidden {
  opacity: 0;
  transform: translate(-50%, 8px);
}

/* 3D annotation labels ------------------------------------------------------ */

.label-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
}

.label-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.label-lines line {
  transition: opacity 0.25s;
}

.part-label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: flex-start;
  width: 176px;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  transition: opacity 0.28s ease;
}

.part-label.is-visible {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.part-label:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.part-label__pin {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 12px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: rgba(4, 10, 10, 0.9);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
}

.part-label__pin::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  content: "";
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.part-label__card {
  position: relative;
  min-width: 0;
  margin-left: 8px;
  padding: 6px 8px 7px;
  border-left: 1px solid rgba(var(--accent-rgb), 0.5);
  background: linear-gradient(90deg, rgba(5, 13, 12, 0.83), rgba(5, 13, 12, 0.3));
  backdrop-filter: blur(6px);
}

.part-label__card::before {
  position: absolute;
  top: 0;
  left: -1px;
  width: 1px;
  height: 6px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.7);
}

.part-label__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(var(--accent-rgb), 0.72);
  font-family: var(--mono);
  font-size: 6px;
  line-height: 1;
  letter-spacing: 0.8px;
}

.part-label__meta i {
  width: 8px;
  height: 1px;
  background: rgba(var(--accent-rgb), 0.35);
}

.part-label__name {
  display: block;
  margin-top: 4px;
  color: #e5f5ef;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.part-label__en {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(156, 183, 176, 0.54);
  font-family: var(--mono);
  font-size: 6.5px;
  line-height: 1;
  letter-spacing: 0.65px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hover tooltip ------------------------------------------------------------- */

.hover-label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 2px;
  white-space: nowrap;
  background: rgba(4, 10, 10, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translate(14px, 14px);
  transition: opacity 0.16s;
}

.hover-label.is-visible {
  opacity: 1;
}

.hover-label__index {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 7px;
}

.hover-label__name {
  font-size: 10px;
  font-weight: 500;
}

.hover-label__en {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.7px;
}

/* Loader -------------------------------------------------------------------- */

.viewport-loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background:
    radial-gradient(ellipse at center, rgba(12, 28, 25, 0.92), rgba(4, 8, 8, 0.99) 66%);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.viewport-loader.is-done {
  visibility: hidden;
  opacity: 0;
}

.loader-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 4px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 50%;
}

.loader-mark::before,
.loader-mark::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(var(--accent-rgb), 0.11);
  border-radius: 50%;
}

.loader-mark::before {
  inset: -8px;
}

.loader-mark::after {
  inset: 8px;
}

.loader-mark b {
  position: relative;
  z-index: 2;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -1px;
}

.loader-mark span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
  animation: loaderOrbit 2.4s linear infinite;
}

.loader-mark span:nth-child(1) {
  animation-delay: 0s;
}

.loader-mark span:nth-child(2) {
  animation-delay: -0.8s;
  opacity: 0.55;
}

.loader-mark span:nth-child(3) {
  animation-delay: -1.6s;
  opacity: 0.3;
}

.loader-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.loader-copy strong {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
}

.loader-copy span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 1.4px;
}

.loader-track {
  width: 160px;
  height: 1px;
  overflow: hidden;
  background: rgba(var(--accent-rgb), 0.12);
}

.loader-track i {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
  animation: loaderTrack 1.7s var(--ease) infinite;
}

.loader-step {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 1px;
}

.error-state {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  text-align: center;
  background: rgba(5, 9, 9, 0.94);
}

.error-state strong {
  color: var(--orange);
  font-size: 16px;
}

.error-state p {
  max-width: 360px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

/* Mobile controls ----------------------------------------------------------- */

.mobile-tools {
  position: absolute;
  top: 15px;
  right: 16px;
  z-index: 15;
  display: none;
  gap: 6px;
}

.mobile-tool {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text-soft);
  background: rgba(5, 12, 12, 0.72);
  font-size: 9px;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.mobile-tool.is-active {
  color: var(--accent);
  border-color: var(--line-strong);
}

.mobile-tool svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

/* ==========================================================================
   INFO PANEL / OVERVIEW
   ========================================================================== */

.info-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.overview {
  padding: 19px 19px 24px;
}

.overview-hero {
  position: relative;
  padding-bottom: 15px;
}

.overview-hero__copy {
  position: relative;
  z-index: 2;
}

.micro-label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 1.15px;
}

.overview-hero h2 {
  margin: 9px 0 12px;
  font-size: 37px;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -1.4px;
}

.overview-hero h2 b {
  color: var(--accent);
  font-weight: 300;
}

.overview-hero p {
  max-width: 248px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.25px;
}

.overview-watermark {
  position: absolute;
  top: -17px;
  right: -5px;
  z-index: 1;
  color: transparent;
  font-family: var(--sans);
  font-size: 158px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -16px;
  pointer-events: none;
  -webkit-text-stroke: 1px rgba(var(--accent-rgb), 0.08);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 92%);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.hero-stat {
  padding: 12px 0 11px;
}

.hero-stat + .hero-stat {
  padding-left: 12px;
  border-left: 1px solid var(--line-soft);
}

.hero-stat strong {
  display: block;
  color: var(--text);
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.4px;
}

.hero-stat strong span {
  margin-left: 1px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0;
}

.hero-stat em {
  display: block;
  margin-top: 6px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.8px;
}

.section-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 19px 0 4px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 1px;
}

.section-rule i {
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.section-rule b {
  color: var(--accent);
  font-weight: 400;
  opacity: 0.55;
}

.overview-specs {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
}

.overview-specs > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  border-bottom: 1px solid var(--line-soft);
}

.overview-specs dt {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.overview-specs dd {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.2px;
  text-align: right;
  white-space: nowrap;
}

.overview-cta {
  margin-top: 19px;
}

.primary-action {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 2px;
  color: #dffcf4;
  text-align: left;
  background:
    linear-gradient(100deg, rgba(var(--accent-rgb), 0.13), rgba(var(--accent-rgb), 0.025) 64%, transparent);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.primary-action:hover {
  border-color: rgba(var(--accent-rgb), 0.62);
  background:
    linear-gradient(100deg, rgba(var(--accent-rgb), 0.21), rgba(var(--accent-rgb), 0.05) 64%, transparent);
  transform: translateY(-1px);
}

.primary-action__icon {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  margin-right: 10px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.08);
}

.primary-action__icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.25;
}

.primary-action > span:nth-child(2) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
}

.primary-action b {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.6px;
}

.primary-action em {
  color: rgba(var(--accent-rgb), 0.54);
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.8px;
}

.primary-action__arrow {
  width: 15px;
  height: 15px;
  margin-left: 4px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.1;
  opacity: 0.55;
  transition: transform 0.25s;
}

.primary-action:hover .primary-action__arrow {
  transform: translateX(2px);
}

.overview-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.25px;
}

.overview-note i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

/* ==========================================================================
   PART DETAIL
   ========================================================================== */

.part-detail {
  padding: 18px 19px 24px;
  animation: detailIn 0.42s var(--ease) both;
}

.detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-back {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: color 0.22s;
}

.detail-back:hover {
  color: var(--accent);
}

.detail-back svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.detail-sequence {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.8px;
}

.detail-sequence b {
  color: var(--accent);
  font-weight: 400;
}

.detail-hero {
  position: relative;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.detail-category {
  color: rgba(var(--accent-rgb), 0.7);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 1px;
}

.detail-cn {
  margin: 8px 0 3px;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.7px;
}

.detail-en {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 1.2px;
}

.detail-desc {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
  letter-spacing: 0.25px;
}

.detail-visual {
  position: relative;
  height: 59px;
  margin: 17px 0 4px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.04), transparent 40%),
    rgba(5, 10, 10, 0.34);
}

.detail-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.6;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.08) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: linear-gradient(90deg, #000, transparent 90%);
}

.detail-visual__cross {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 50%;
  transform: translateY(-50%);
}

.detail-visual__cross::before,
.detail-visual__cross::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: rgba(var(--accent-rgb), 0.35);
  transform: translate(-50%, -50%);
}

.detail-visual__cross::before {
  width: 43px;
  height: 1px;
}

.detail-visual__cross::after {
  width: 1px;
  height: 43px;
}

.detail-visual__code {
  position: absolute;
  bottom: 9px;
  left: 11px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.8px;
}

.detail-visual__mass {
  position: absolute;
  top: 10px;
  left: 11px;
  color: rgba(var(--accent-rgb), 0.7);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.8px;
}

.detail-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 19px 0 5px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 1px;
}

.detail-section-head i {
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.detail-section-head b {
  color: var(--accent);
  font-weight: 400;
  opacity: 0.5;
}

.detail-specs {
  margin: 0;
}

.detail-specs > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.detail-specs dt {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.detail-specs dd {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.15px;
  text-align: right;
}

.detail-material {
  margin-top: 15px;
  padding: 11px 12px;
  border-left: 1px solid rgba(var(--orange-rgb), 0.4);
  background: linear-gradient(90deg, rgba(var(--orange-rgb), 0.055), transparent);
}

.detail-material span {
  display: block;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.8px;
}

.detail-material strong {
  display: block;
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.3px;
}

.detail-actions {
  display: flex;
  gap: 7px;
  margin-top: 16px;
}

.detail-action {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 33px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: color 0.22s, border-color 0.22s, background 0.22s;
}

.detail-action:hover {
  color: var(--accent);
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.04);
}

.detail-action svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}

.detail-action--accent {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.24);
  background: rgba(var(--accent-rgb), 0.06);
}

.detail-note {
  display: flex;
  gap: 7px;
  margin-top: 13px;
  color: var(--dim);
  font-size: 8px;
  line-height: 1.6;
}

.detail-note i {
  flex: 0 0 auto;
  width: 3px;
  height: 3px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

/* ==========================================================================
   DOCK
   ========================================================================== */

.dock {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 24px;
}

.dock::before {
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

.dock-guide {
  display: flex;
  justify-content: flex-start;
}

.interaction-legend {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mouse-glyph {
  position: relative;
  display: block;
  width: 18px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mouse-glyph::after {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 1px;
  height: 5px;
  content: "";
  background: var(--accent);
  opacity: 0.7;
  transform: translateX(-50%);
}

.mouse-glyph i {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 7px;
  height: 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 4px;
  transform: translateX(-50%);
}

.interaction-legend b {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.4px;
}

.interaction-legend span:not(.mouse-glyph) {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.45px;
}

.dock-controls {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(7, 12, 13, 0.7);
  box-shadow: inset 0 1px 0 rgba(217, 255, 245, 0.025), 0 12px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.dock-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 112px;
  height: 48px;
  padding: 0 12px;
  border-radius: 2px;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color 0.24s, background 0.24s;
}

.dock-button:hover {
  color: var(--text);
  background: rgba(153, 199, 190, 0.045);
}

.dock-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  transition: color 0.24s, transform 0.4s var(--ease);
}

.dock-button:hover svg {
  color: var(--accent);
}

.dock-button span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dock-button b {
  color: inherit;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.dock-button em {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0.7px;
  white-space: nowrap;
}

.dock-button.is-active {
  color: #041410;
  background: linear-gradient(135deg, var(--accent), #35c9aa);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.15);
}

.dock-button.is-active svg {
  color: #041410;
}

.dock-button.is-active em {
  color: rgba(2, 20, 15, 0.6);
}

.dock-button.is-active:hover {
  background: linear-gradient(135deg, #83ffe1, #45dabb);
}

.dock-button[data-action="autorotate"].is-active svg {
  animation: orbitSpin 5s linear infinite;
}

.dock-button--icon {
  min-width: 102px;
}

.dock-divider {
  width: 1px;
  margin: 6px 2px;
  background: var(--line-soft);
}

.dock-tech {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.7px;
}

.dock-tech__label {
  color: var(--dim);
}

.dock-tech__value {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(var(--accent-rgb), 0.65);
}

.dock-tech__value i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.7);
}

/* ==========================================================================
   GUIDE MODAL
   ========================================================================== */

.guide-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
}

.guide-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 4, 0.78);
  backdrop-filter: blur(12px);
}

.guide-card {
  position: relative;
  width: min(760px, 94vw);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 3px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(var(--accent-rgb), 0.08), transparent 42%),
    linear-gradient(160deg, #0b1212, #060b0c 62%);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(220, 255, 247, 0.04);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.42s var(--ease);
}

.guide-modal.is-open .guide-card {
  transform: none;
}

.guide-card::before {
  position: absolute;
  top: -1px;
  left: 24px;
  width: 74px;
  height: 1px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.7);
}

.guide-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.guide-card__head h2 {
  margin: 12px 0 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 1px;
}

.guide-close {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.22s, border-color 0.22s;
}

.guide-close:hover {
  color: var(--accent);
  border-color: var(--line-strong);
}

.guide-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 22px;
  border: 1px solid var(--line-soft);
  background: var(--line-soft);
}

.guide-step {
  position: relative;
  min-height: 172px;
  padding: 16px 14px;
  background: #080e0f;
}

.guide-step__num {
  position: absolute;
  top: 12px;
  right: 12px;
  color: rgba(var(--accent-rgb), 0.3);
  font-family: var(--mono);
  font-size: 7px;
}

.guide-step__icon {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.04);
}

.guide-step__icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.guide-step h3 {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.guide-step p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.shortcut-strip {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.5px;
}

.shortcut-strip > span {
  margin-right: auto;
  letter-spacing: 0.9px;
}

.shortcut-strip div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.shortcut-strip kbd {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 7px;
}

.shortcut-strip em {
  color: var(--muted);
  font-style: normal;
}

.guide-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid var(--line-soft);
}

.guide-card__foot > span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.8px;
}

.primary-action--compact {
  width: auto;
  min-width: 172px;
  min-height: 40px;
  padding: 6px 12px;
}

.primary-action--compact .primary-action__icon {
  display: none;
}

/* ==========================================================================
   TOAST
   ========================================================================== */

.toast {
  position: fixed;
  bottom: calc(var(--dock-h) + 18px);
  left: 50%;
  z-index: 80;
  padding: 8px 13px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 2px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.6px;
  white-space: nowrap;
  background: rgba(5, 12, 12, 0.9);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.28s, transform 0.28s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes pipPulse {
  0% {
    opacity: 0.7;
    transform: scale(0.7);
  }
  78%,
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes notePulse {
  0% {
    opacity: 0.8;
    transform: scale(0.7);
  }
  78%,
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes viewportEnter {
  from {
    opacity: 0;
    transform: scale(0.995);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes detailIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes loaderOrbit {
  from {
    transform: rotate(0deg) translateX(31px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(31px) rotate(-360deg);
  }
}

@keyframes loaderTrack {
  0% {
    transform: translateX(-110%);
  }
  60%,
  100% {
    transform: translateX(340%);
  }
}

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1380px) {
  .workspace {
    grid-template-columns: 258px minmax(0, 1fr) 310px;
    gap: 11px;
    padding-right: 15px;
    padding-left: 15px;
  }

  .topbar {
    padding-right: 18px;
    padding-left: 18px;
  }

  .dock {
    padding-right: 18px;
    padding-left: 18px;
  }

  .dock::before {
    right: 18px;
    left: 18px;
  }

  .dock-button {
    min-width: 101px;
    padding: 0 10px;
  }

  .topbar-center {
    display: none;
  }

  .overview-hero h2 {
    font-size: 34px;
  }
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 234px minmax(0, 1fr) 284px;
    gap: 9px;
    padding: 0 11px 10px;
  }

  .panel-head {
    padding: 17px 14px 12px;
  }

  .panel-title {
    font-size: 21px;
  }

  .filter-row {
    padding: 9px 14px;
  }

  .parts-list {
    padding: 6px;
  }

  .panel-foot {
    padding-right: 14px;
    padding-left: 14px;
  }

  .overview,
  .part-detail {
    padding-right: 15px;
    padding-left: 15px;
  }

  .overview-specs {
    grid-template-columns: 1fr;
  }

  .overview-specs > div:nth-last-child(1) {
    border-bottom: 0;
  }

  .overview-hero h2 {
    font-size: 31px;
  }

  .scene-caption__title {
    font-size: 15px;
  }

  .interact-note {
    display: none;
  }

  .dock-guide,
  .dock-tech {
    display: none;
  }

  .dock {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .dock-controls {
    justify-self: center;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-h: 62px;
    --dock-h: 78px;
  }

  body {
    overflow: hidden;
  }

  .workspace {
    display: block;
    padding: 0 8px 8px;
  }

  .viewport {
    width: 100%;
    height: 100%;
  }

  .panel {
    position: absolute;
    top: 8px;
    bottom: 8px;
    z-index: 40;
    width: min(84vw, 338px);
    visibility: hidden;
    opacity: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    transition: transform 0.38s var(--ease), opacity 0.3s, visibility 0.38s;
  }

  .parts-panel {
    left: 8px;
    transform: translateX(calc(-100% - 14px));
  }

  .info-panel {
    right: 8px;
    transform: translateX(calc(100% + 14px));
  }

  .panel.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .panel-close {
    display: grid;
  }

  .mobile-tools {
    display: flex;
  }

  .brand-rule {
    margin-right: 11px;
    margin-left: 5px;
  }

  .topbar {
    padding: 0 14px;
  }

  .dock {
    padding: 0 12px;
  }

  .dock::before {
    right: 12px;
    left: 12px;
  }

  .dock-controls {
    width: 100%;
    max-width: 520px;
  }

  .dock-button {
    min-width: 0;
    flex: 1;
    justify-content: center;
    padding: 0 7px;
  }

  .dock-button--icon {
    min-width: 0;
    flex: 0 0 57px;
  }

  .dock-button--icon span {
    display: none;
  }

  .scene-caption {
    bottom: 16px;
    left: 16px;
  }

  .scene-caption__title {
    font-size: 13px;
  }

  .scene-caption__title em {
    display: none;
  }

  .view-widget {
    right: 16px;
    bottom: 15px;
  }

  .viewport-meta {
    top: 54px;
    font-size: 6px;
  }

  .viewport-meta--tl {
    left: 16px;
  }

  .viewport-meta--tr {
    right: 16px;
  }

  .guide-card {
    width: min(600px, 94vw);
    padding: 20px;
  }

  .part-label {
    width: 158px;
  }

  .part-label__card {
    padding: 5px 7px 6px;
  }

  .part-label__name {
    font-size: 10px;
  }

  .part-label__en {
    font-size: 6px;
  }

  .guide-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guide-step {
    min-height: 150px;
  }
}

@media (max-width: 620px) {
  :root {
    --topbar-h: 58px;
    --dock-h: 72px;
  }

  .brand-mark {
    width: 44px;
  }

  .brand-mark__text {
    font-size: 21px;
  }

  .brand-mark__beam {
    width: 31px;
  }

  .brand-rule {
    height: 22px;
    margin-right: 9px;
  }

  .brand-product__name {
    font-size: 12px;
    letter-spacing: 1px;
  }

  .brand-product__sub {
    font-size: 6.5px;
    letter-spacing: 1.2px;
  }

  .render-status {
    display: none;
  }

  .guide-button {
    width: 31px;
    padding: 0;
    justify-content: center;
  }

  .guide-button span,
  .guide-button kbd {
    display: none;
  }

  .topbar-actions {
    gap: 7px;
  }

  .mobile-tools {
    top: 11px;
    right: 11px;
  }

  .viewport-meta--tl {
    display: none;
  }

  .viewport-meta--tr {
    top: 11px;
    left: 16px;
    right: auto;
  }

  .hud-corner--tl,
  .hud-corner--tr {
    display: none;
  }

  .scene-caption {
    bottom: 12px;
    left: 12px;
  }

  .scene-caption__eyebrow {
    font-size: 6px;
  }

  .scene-caption__title {
    margin-top: 5px;
    font-size: 12px;
  }

  .scene-caption__meta {
    display: none;
  }

  .view-widget {
    display: none;
  }

  .panel {
    width: calc(100vw - 16px);
  }

  .dock-controls {
    padding: 3px;
    gap: 1px;
  }

  .dock-button {
    height: 44px;
    gap: 5px;
  }

  .dock-button svg {
    width: 14px;
    height: 14px;
  }

  .dock-button b {
    font-size: 9px;
  }

  .dock-button em {
    display: none;
  }

  .dock-divider {
    display: none;
  }

  .dock-button--icon {
    flex-basis: 40px;
  }

  .guide-modal {
    padding: 10px;
  }

  .guide-card {
    max-height: calc(100dvh - 20px);
    padding: 17px 15px;
  }

  .guide-card__head h2 {
    font-size: 20px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    margin-top: 16px;
  }

  .guide-step {
    min-height: 0;
    padding: 13px;
  }

  .guide-step__icon {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
  }

  .shortcut-strip {
    flex-wrap: wrap;
    gap: 10px 15px;
  }

  .shortcut-strip > span {
    width: 100%;
  }

  .guide-card__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .guide-card__foot > span {
    text-align: center;
  }

  .primary-action--compact {
    width: 100%;
    justify-content: center;
  }
}

@media (max-height: 780px) and (min-width: 901px) {
  .panel-head {
    padding-top: 15px;
    padding-bottom: 11px;
  }

  .panel-title {
    font-size: 21px;
  }

  .filter-row {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .part-item {
    min-height: 40px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .panel-foot {
    padding-top: 9px;
    padding-bottom: 10px;
  }

  .overview-hero h2 {
    font-size: 31px;
  }

  .overview-hero p {
    line-height: 1.65;
  }

  .hero-stat {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .overview-specs > div {
    min-height: 31px;
  }

  .section-rule {
    margin-top: 14px;
  }

  .overview {
    padding-top: 14px;
  }
}

@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;
  }
}
