.structure-control input[type="range"] {
  grid-column: 2 / 4;
}

.scan-stage {
  cursor: grab;
}

.scan-stage.dragging {
  cursor: grabbing;
}

.scan-stage img {
  transform-origin: center;
  user-select: none;
}

.viewer-controls {
  overflow-y: auto;
}

.viewer-3d > .viewer-controls,
.viewer-3d > .model-stage {
  min-height: 0;
}

.viewer-controls h3 {
  margin: 4px 0 0;
}

.viewer-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.viewer-preset-panel {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.viewer-preset-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.viewer-preset-button {
  padding: 8px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.viewer-preset-button:hover,
.viewer-preset-button.active {
  border-color: var(--accent);
  background: #eeeaff;
  color: var(--accent);
}

.viewer-preset-actions {
  display: grid;
  gap: 7px;
}

.viewer-preset-actions .button,
.viewer-controls > .button {
  width: 100%;
}

.structure-control.construction {
  background: #fff8e8;
  margin: 0 -8px;
  padding: 9px 8px;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .viewer-3d > .viewer-controls {
    display: flex;
    max-height: 38vh;
    overflow-y: auto;
  }
}
.viewer-legend{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.viewer-legend span{display:flex;align-items:center;gap:8px;font-size:13px}
.viewer-legend i{display:inline-block;width:12px;height:12px;border-radius:50%}
.viewer-legend small{color:var(--muted);line-height:1.35}
