/* The preview follows the configuration fields, then yields to the reports. */
.wheel-workbench .assembly-preview {
  --stage-height: min(53svh, 520px);
  position: sticky;
  align-self: start;
  top: calc(var(--site-header-offset, 0px) + 12px);
  margin: 0;
  box-shadow: 0 6px 26px #2532260f;
}
.wheel-workbench model-viewer {
  height: var(--stage-height);
  touch-action: pan-y;
  --poster-color: transparent;
  --progress-bar-height: 0;
}
.preview-feedback {
  position: absolute;
  inset: 0 0 auto;
  height: var(--stage-height);
  display: grid;
  align-items: end;
  justify-items: center;
  background: radial-gradient(ellipse at 36% 21%, #fffcf6, #e9e6df 60%, #dedad3);
  touch-action: pan-y;
}
.preview-feedback img {
  position: absolute;
  inset: 7% 4% 15%;
  width: 92%;
  height: 78%;
  object-fit: contain;
}
.preview-feedback > div {
  position: relative;
  width: max-content;
  max-width: 92%;
  margin: 0 0 10px;
  padding: 6px 12px;
  display: grid;
  justify-items: center;
  gap: 5px;
  border: 1px solid #d7dace;
  border-radius: 9px;
  background: #fafaf7f5;
  color: #344438;
  font-size: .8rem;
}
.preview-feedback progress {width: 100%; height: 4px; accent-color: #526e53}
.preview-feedback button {
  font: inherit; cursor: pointer; border: 0; border-radius: 6px;
  background: #354a38; color: white; padding: 8px 16px;
}
.preview-pending .view-tools, .preview-pending #telemetry {visibility: hidden}
.assembly-preview .view-tools {max-width: 48%}
.assembly-preview .view-tools [data-view=reset] {overflow-wrap: anywhere}
.assembly-preview #telemetry {max-width: 50%}
@media (min-width: 701px) {
  .wheel-workbench .config-grid {grid-column: 2; grid-row: 1}
   .tool-page > .preview-reports {
    margin-top: clamp(24px, 3vw, 48px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .preview-reports .config-summary {grid-column: 1 / -1}
}
@media (max-width: 700px) {
  .wheel-workbench .assembly-preview {
    --stage-height: clamp(108px, 29svh, 265px);
    top: var(--site-header-offset, 0px);
    margin-bottom: 14px;
    z-index: 4;
  }
  .assembly-preview #telemetry {font-size: .68rem; top: 6px; left: 6px}
  .assembly-preview .view-tools {top: 6px; right: 6px}
  .wheel-workbench #thermal-label {padding: 5px 10px}
  .wheel-workbench figcaption {padding: 4px 8px}
  .wheel-workbench .config-grid :is(button, select, input) {
    scroll-margin-top: calc(var(--site-header-offset, 0px) + clamp(108px, 29svh, 265px) + 85px);
  }
}
#thermal-curve {
  position:absolute; left:10px; bottom:calc(100% - var(--stage-height) + 8px);
  width:clamp(130px,25%,215px); padding:6px 9px; pointer-events:none;
  background:#fafaf6ef; border:1px solid #d7dfd1; border-radius:9px; color:#344438;
}
#thermal-curve strong {font-size:.73rem}
#thermal-curve[hidden] {display:none}
