.trellis2-generator {
  max-width: 52rem;
  padding: 1.25rem;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  background: #fff;
  color: #1e1e1e;
}
.trellis2-form { display: grid; gap: 1rem; }
.trellis2-form label:not(.trellis2-checkbox), .trellis2-model-upload label { display: grid; gap: .4rem; font-weight: 600; }
.trellis2-form select, .trellis2-form input[type=number] { max-width: 12rem; }
.trellis2-model-upload { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #dcdcde; }
.trellis2-model-upload input { max-width: 100%; }
.trellis2-model-upload p { margin: .4rem 0 0; color: #50575e; font-size: .85rem; }
.trellis2-form button, .trellis2-download {
  display: inline-block;
  width: fit-content;
  padding: .65rem 1rem;
  border: 0;
  border-radius: 4px;
  background: #2271b1;
  color: #fff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.trellis2-form button:disabled { opacity: .6; cursor: wait; }
.trellis2-viewer-shell { position: relative; margin-bottom: 1rem; background: #f6f7f7; }
.trellis2-result model-viewer {
  display: block;
  position: relative;
  width: 100%;
  height: 32rem;
  touch-action: none;
}
.trellis2-gesture-hint {
  position: absolute;
  z-index: 2;
  top: .5rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: .3rem .6rem;
  border-radius: 4px;
  background: rgba(255,255,255,.85);
  font-size: .8rem;
  white-space: nowrap;
  pointer-events: none;
}
.trellis2-viewer-controls {
  position: absolute;
  z-index: 3;
  bottom: .75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  width: max-content;
  max-width: calc(100% - 1rem);
  padding: .45rem;
  border-radius: 6px;
  background: rgba(30,30,30,.82);
}
.trellis2-viewer-controls button {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: .45rem .6rem;
  border: 1px solid #fff;
  border-radius: 4px;
  background: #fff;
  color: #1e1e1e;
  font: 600 .8rem/1 sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.trellis2-viewer-controls button:hover,
.trellis2-viewer-controls button:focus-visible { background: #dfeaff; outline: 2px solid #72aee6; }
.trellis2-viewer-shell:fullscreen model-viewer { height: 100vh; margin: 0; }
@media (max-width: 600px) {
  .trellis2-result model-viewer { height: 24rem; }
  .trellis2-viewer-controls { gap: .3rem; }
  .trellis2-viewer-controls button { min-width: 2.25rem; min-height: 2.25rem; padding: .4rem .5rem; }
}
