.human-3d-lab-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-color: rgba(196, 154, 74, 0.34);
  background:
    radial-gradient(circle at 85% 30%, rgba(196, 154, 74, 0.12), transparent 38%),
    rgba(12, 16, 13, 0.72);
}

.human-3d-lab-entry h3,
.human-3d-lab-entry p {
  margin: 0;
}

.human-3d-lab-entry p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.human-3d-lab-open {
  flex: 0 0 auto;
  border-color: rgba(196, 154, 74, 0.72);
  color: var(--arena-bronze-bright);
}

.human-3d-lab-dialog {
  width: min(1180px, calc(100vw - 48px));
  max-width: none;
  height: min(780px, calc(100vh - 48px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(196, 154, 74, 0.5);
  border-radius: 16px;
  background: #090c0a;
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.82);
}

.human-3d-lab-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
}

.human-3d-lab-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.human-3d-lab-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(196, 154, 74, 0.22);
  background: linear-gradient(100deg, rgba(36, 44, 34, 0.94), rgba(12, 15, 12, 0.96));
}

.human-3d-lab-header h2,
.human-3d-lab-header p {
  margin: 0;
}

.human-3d-lab-header h2 {
  margin-top: 3px;
  font-size: 24px;
}

.human-3d-lab-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.human-3d-lab-close {
  min-width: 82px;
}

.human-3d-lab-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  min-height: 0;
}

.human-3d-viewport-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(47, 79, 60, 0.46), transparent 34%),
    radial-gradient(circle at 50% 62%, rgba(196, 154, 74, 0.11), transparent 42%),
    linear-gradient(180deg, #111915, #080b09 74%);
}

.human-3d-viewport {
  position: absolute;
  inset: 0;
  touch-action: none;
}

.human-3d-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.human-3d-viewport canvas:active {
  cursor: grabbing;
}

.human-3d-loading,
.human-3d-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.human-3d-loading {
  color: var(--arena-bronze-bright);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.human-3d-fallback[hidden],
.human-3d-loading[hidden] {
  display: none;
}

.human-3d-fallback img {
  width: min(320px, 70%);
  max-height: 480px;
  margin: 0 auto 8px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.7));
}

.human-3d-fallback span {
  color: var(--muted);
  font-size: 12px;
}

.human-3d-performance {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px;
  border: 1px solid rgba(196, 154, 74, 0.22);
  border-radius: 8px;
  background: rgba(5, 8, 6, 0.76);
  color: var(--muted);
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.human-3d-performance span:first-child {
  color: #80dba4;
  font-weight: 900;
}

.human-3d-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  border-left: 1px solid rgba(196, 154, 74, 0.22);
  background: rgba(17, 21, 17, 0.98);
}

.human-3d-fact {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.human-3d-fact span,
.human-3d-control-group > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.human-3d-fact strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
}

.human-3d-control-group {
  display: grid;
  gap: 7px;
  margin-top: 4px;
}

.human-3d-control-group button {
  width: 100%;
  min-height: 38px;
  text-align: left;
}

.human-3d-control-group button.is-active {
  border-color: rgba(196, 154, 74, 0.78);
  color: var(--arena-bronze-bright);
  box-shadow: inset 3px 0 0 rgba(196, 154, 74, 0.8);
}

.human-3d-note {
  margin-top: auto;
  padding: 10px;
  border-left: 2px solid rgba(196, 154, 74, 0.6);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .human-3d-lab-entry {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .human-3d-lab-dialog::backdrop {
    backdrop-filter: none;
  }
}
