/* Text-first presets; existing genuine renders are a secondary reference. */
.builder-workspace-v4[data-builder-shell] .builder-viewer-panel {
  container: builder-viewer / inline-size;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-panel > summary {
  display: flex;
}
.builder-workspace-v4[data-builder-shell] .builder-viewer-settings input[type="range"] {
  min-width: 0;
  max-width: 100%;
  margin-inline: 0;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-panel .builder-lighting-presets {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.builder-workspace-v4[data-builder-shell] .builder-viewer-settings .builder-lighting-tile {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  min-width: 0;
  padding: 7px 9px 7px 7px;
  text-align: left;
  border-radius: 9px;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-tile:hover {
  border-color: #a5b3da;
  background: #fafbff;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-tile:has(input:checked) {
  border-color: #5367ff;
  background: #f1f3ff;
  box-shadow: 0 0 0 1px #5367ff;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-tile:has(input:focus-visible) {
  outline: 2px solid #5367ff;
  outline-offset: 3px;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-tile .builder-lighting-swatch {
  width: 48px;
  height: 42px;
  aspect-ratio: auto;
  border-radius: 6px;
  box-shadow: none;
  outline: none;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-swatch > img {
  object-fit: contain;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-copy strong {
  color: #243047;
  font-size: 12px;
  font-weight: 650;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-copy small {
  margin: 0;
  color: #5f6d84;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-tile .builder-lighting-choice-marker {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #b6c0d0;
  border-radius: 50%;
  color: transparent;
  background: #fff;
  font-size: 10px;
  line-height: 1;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-tile input:checked ~ .builder-lighting-choice-marker {
  border-color: #5367ff;
  color: #fff;
  background: #5367ff;
}
.builder-workspace-v4[data-builder-shell] .builder-viewer-settings .builder-lighting-original {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 0;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-original > input {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin: 0;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-original > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.3;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-original small {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  color: #5f6d84;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-environments > summary > span {
  margin-left: 5px;
  font-size: 10px;
  color: #6b7790;
}
.builder-workspace-v4[data-builder-shell] .builder-lighting-adjustment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 650;
}
@container builder-viewer (max-width: 320px) {
  .builder-workspace-v4[data-builder-shell] .builder-viewer-model-card {
    grid-template-columns: 52px minmax(0, 1fr) 30px;
  }
  .builder-workspace-v4[data-builder-shell] .builder-viewer-model-thumb {
    grid-column: 1;
    grid-row: 1;
    width: 52px;
  }
  .builder-workspace-v4[data-builder-shell] .builder-viewer-model-summary {
    grid-column: 2 / -1;
    grid-row: 1;
  }
  .builder-workspace-v4[data-builder-shell] .builder-viewer-model-summary strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .builder-workspace-v4[data-builder-shell] .builder-viewer-model-card .builder-model-source {
    grid-column: 1 / 3;
    grid-row: 2;
    min-width: 0;
  }
  .builder-workspace-v4[data-builder-shell] .builder-viewer-model-card .builder-model-source-trigger {
    width: 100%;
  }
  .builder-workspace-v4[data-builder-shell] .builder-viewer-model-download {
    grid-column: 3;
    grid-row: 2;
  }
  .builder-workspace-v4[data-builder-shell] .builder-viewer-model-card:not(:has(.builder-viewer-model-download)) .builder-model-source {
    grid-column: 1 / -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .builder-workspace-v4[data-builder-shell] .builder-lighting-tile { transition: none; }
}
