/**
 * Node Explorer — Space Station hierarchy · Three.js r170
 */

.doc-gltf-ne {
  --ne-cyan: #3db8c4;
  --ne-violet: #9a7ec8;
  --ne-amber: #c4a04a;
  --ne-border: rgba(255, 255, 255, 0.08);
  --ne-surface: rgba(255, 255, 255, 0.025);
  --ne-glow: rgba(61, 184, 196, 0.45);

  margin: 1rem 0 1.25rem;
  padding: 0.95rem 0.95rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--ne-border);
  background: linear-gradient(165deg, #080b12 0%, #0a1018 48%, #0c0e16 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.doc-gltf-ne__hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--ne-border);
}

.doc-gltf-ne__tag {
  display: inline-flex;
  padding: 0.16rem 0.48rem;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ne-cyan);
  background: rgba(61, 184, 196, 0.1);
  border: 1px solid rgba(61, 184, 196, 0.28);
}

.doc-gltf-ne__hint {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(160, 172, 190, 0.82);
}

.doc-gltf-ne__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 0.88fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

.doc-gltf-ne__col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 10px;
  border: 1px solid var(--ne-border);
  background: var(--ne-surface);
  overflow: hidden;
}

.doc-gltf-ne__col-title {
  margin: 0;
  padding: 0.52rem 0.62rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(160, 172, 190, 0.85);
  border-bottom: 1px solid var(--ne-border);
  background: rgba(0, 0, 0, 0.22);
}

.doc-gltf-ne__tree-body,
.doc-gltf-ne__panel-body {
  flex: 1;
  padding: 0.65rem 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 280px;
}

.doc-gltf-ne__tree {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
}

.doc-gltf-ne__tree-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.38rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: left;
  font: inherit;
  color: rgba(180, 195, 220, 0.88);
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.doc-gltf-ne__tree-btn:hover {
  background: rgba(61, 184, 196, 0.08);
  border-color: rgba(61, 184, 196, 0.2);
}

.doc-gltf-ne__tree-btn.is-selected {
  color: #e8f8fc;
  background: rgba(61, 184, 196, 0.14);
  border-color: rgba(61, 184, 196, 0.45);
  box-shadow: 0 0 0 1px rgba(61, 184, 196, 0.12), 0 0 18px rgba(61, 184, 196, 0.12);
}

.doc-gltf-ne__tree-btn.is-ancestor {
  color: rgba(200, 220, 240, 0.95);
  background: rgba(154, 126, 200, 0.1);
  border-color: rgba(154, 126, 200, 0.28);
}

.doc-gltf-ne__tree-btn.is-dimmed {
  opacity: 0.42;
}

.doc-gltf-ne__tree-btn--child {
  padding-left: 1.35rem;
}

.doc-gltf-ne__tree-glyph {
  flex-shrink: 0;
  width: 0.85rem;
  color: rgba(154, 126, 200, 0.75);
  user-select: none;
}

.doc-gltf-ne__tree-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-gltf-ne__tree-index {
  flex-shrink: 0;
  font-size: 0.62rem;
  color: rgba(130, 150, 180, 0.65);
}

.doc-gltf-ne__fields {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.doc-gltf-ne__field-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
  padding: 0.32rem 0.4rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
}

.doc-gltf-ne__field-k {
  color: rgba(154, 126, 200, 0.88);
  letter-spacing: 0.03em;
}

.doc-gltf-ne__field-v {
  color: rgba(195, 232, 141, 0.92);
  word-break: break-word;
}

.doc-gltf-ne__chain {
  margin: 0.15rem 0 0;
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
  border: 1px dashed rgba(61, 184, 196, 0.22);
  background: rgba(61, 184, 196, 0.04);
}

.doc-gltf-ne__chain-title {
  margin: 0 0 0.4rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(160, 172, 190, 0.75);
}

.doc-gltf-ne__chain-steps {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
}

.doc-gltf-ne__chain-step {
  color: rgba(180, 195, 220, 0.88);
}

.doc-gltf-ne__chain-step.is-current {
  color: var(--ne-cyan);
  font-weight: 600;
}

.doc-gltf-ne__chain-arrow {
  color: rgba(130, 150, 180, 0.55);
  line-height: 1;
  padding-left: 0.35rem;
}

.doc-gltf-ne__explainer {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.52;
  color: rgba(160, 172, 190, 0.88);
}

.doc-gltf-ne__scene-wrap {
  position: relative;
  flex: 1;
  min-height: 280px;
  background: radial-gradient(ellipse at 50% 35%, rgba(61, 184, 196, 0.06), transparent 62%),
    rgba(0, 0, 0, 0.35);
}

.doc-gltf-ne__mount {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.doc-gltf-ne__scene-hud {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  max-width: calc(100% - 1.1rem);
  padding: 0.28rem 0.45rem;
  border-radius: 5px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  color: rgba(195, 232, 141, 0.88);
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.doc-gltf-ne__scene-engage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  background: rgba(6, 10, 18, 0.55);
  backdrop-filter: blur(2px);
  z-index: 2;
}

.doc-gltf-ne:not(.is-touch-gated) .doc-gltf-ne__scene-engage,
.doc-gltf-ne.is-orbit-engaged .doc-gltf-ne__scene-engage {
  display: none;
}

.doc-gltf-ne__engage-btn {
  margin: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(61, 184, 196, 0.35);
  font-size: 0.78rem;
  font-weight: 600;
  color: #e8f8fc;
  background: rgba(61, 184, 196, 0.12);
  cursor: pointer;
}

.doc-gltf-ne__engage-note {
  margin: 0;
  max-width: 14rem;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(160, 172, 190, 0.78);
}

.doc-gltf-ne__engage-exit {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 3;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.65rem;
  color: rgba(200, 210, 230, 0.9);
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.doc-gltf-ne__caption {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(160, 172, 190, 0.88);
}

@media (max-width: 960px) {
  .doc-gltf-ne__grid {
    grid-template-columns: 1fr;
  }

  .doc-gltf-ne__tree-body,
  .doc-gltf-ne__panel-body {
    min-height: 0;
  }

  .doc-gltf-ne__scene-wrap {
    min-height: 240px;
  }
}
