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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b0e14;
  color: #e6e6e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#scene {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: grab;
}

#scene:active {
  cursor: grabbing;
}

#hud {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 280px;
  z-index: 10;
  pointer-events: auto;
}

#sidebar-default.hidden,
#sidebar-detail.hidden {
  display: none;
}

#hud h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

#hud .subtitle {
  font-size: 13px;
  opacity: 0.6;
  margin-top: 4px;
}

#legend {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  opacity: 0.85;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar-detail h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

#info-count {
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 10px;
}

#info-desc {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
  margin-bottom: 14px;
}

#info-breadcrumb {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 6px;
}

#info-components {
  list-style: none;
  font-size: 13px;
  line-height: 1.5;
}

#info-components li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 4px;
}

#info-components li.clickable {
  cursor: pointer;
}

#info-components li.clickable:hover {
  background: rgba(255, 255, 255, 0.06);
}

#info-components li.clickable::after {
  content: "›";
  margin-left: auto;
  opacity: 0.4;
  font-size: 14px;
}

.comp-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

#back-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e6e6e6;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 14px;
}

#back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 600px) {
  #hud {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 50vh;
    overflow-y: auto;
  }
  #hud h1 { font-size: 18px; }
  #hud .subtitle { font-size: 11px; }
  .legend-item { font-size: 11px; }
}
