/* Scoped to Vehicle Gallery. Preserve the existing LCH sand/dark palette. */
#lch-build-viewer {
  --viewer-bg: #101010;
  --viewer-text: #f5f1e9;
  --viewer-muted: #c6c1b8;
  --viewer-accent: #cbb89a;
  --viewer-gap: 1rem;
  box-sizing: border-box;
  width: min(920px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: var(--viewer-gap);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #514838;
  border-radius: 8px;
  background: var(--viewer-bg);
  color: var(--viewer-text);
  font-family: inherit;
}
#lch-build-viewer:not([open]) { display: none; }
#lch-build-viewer::backdrop { background: rgb(0 0 0 / 88%); }
#lch-build-viewer [hidden] { display: none !important; }
#lch-build-viewer .lch-build-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
#lch-build-viewer button {
  min-height: 44px;
  padding: .5rem .75rem;
  border: 1px solid #514838;
  border-radius: 4px;
  background: #211e19;
  color: var(--viewer-accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
#lch-build-viewer button:hover { background: #383026; }
#lch-build-viewer :focus-visible { outline: 2px solid var(--viewer-accent); outline-offset: 3px; }
#lch-build-stage { position: relative; margin: .75rem auto; text-align: center; min-height: 120px; }
#lch-build-viewer .lch-build-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--viewer-accent);
  color: var(--viewer-bg);
  padding: .75rem 1.25rem;
}
#lch-build-stage img, #lch-build-stage video {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 245px);
  min-height: 120px;
  object-fit: contain;
  margin: auto;
  background: #080808;
}
#lch-build-stage iframe {
  display: block;
  width: min(100%, 540px);
  height: min(680px, calc(100dvh - 255px));
  min-height: 280px;
  border: 0;
  background: #fff;
  margin: auto;
}
#lch-build-caption, #lch-build-status {
  margin: .5rem 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#lch-build-status { color: var(--viewer-muted); }
#lch-build-count { color: var(--viewer-muted); font-size: 14px; }
#lch-build-original { display: block; text-align: center; color: var(--viewer-muted); font-size: 12px; margin-top: .75rem; }
@media (max-width: 480px) {
  #lch-build-viewer { --viewer-gap: .75rem; }
  #lch-build-viewer button { padding-inline: .5rem; font-size: 12px; }
}
