:root {
  color-scheme: light;
  background: #fff;
  color: #111;
  font-family: Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
.model-viewer {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
}

.model-viewer {
  position: relative;
  min-width: 320px;
  min-height: 480px;
}

.model-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: grab;
  touch-action: none;
}

.model-viewer canvas:active {
  cursor: grabbing;
}

.model-viewer__status {
  position: absolute;
  z-index: 1;
  margin: 0;
  color: rgb(0 0 0 / 48%);
  font-size: 11px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.model-viewer__status {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.model-viewer[data-state="ready"] .model-viewer__status {
  display: none;
}

.effect-control {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  width: min(320px, calc(100vw - 40px));
  padding: 13px 14px 14px;
  border: 1px solid rgb(0 0 0 / 12%);
  border-radius: 8px;
  background: rgb(255 255 255 / 84%);
  box-shadow: 0 8px 30px rgb(0 0 0 / 6%);
  backdrop-filter: blur(12px);
}

.effect-control__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: #171717;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.effect-control output {
  min-width: 48px;
  color: rgb(0 0 0 / 58%);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.effect-control__parameter + .effect-control__parameter {
  margin-top: 12px;
}

.effect-control input[type="range"] {
  display: block;
  width: 100%;
  margin: 0;
  accent-color: #171717;
  cursor: pointer;
}

.effect-control input[type="range"]:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 4px;
}

.effect-control__palette {
  min-width: 0;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

.effect-control__palette legend {
  margin-bottom: 8px;
  padding: 0;
  color: rgb(0 0 0 / 58%);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.effect-control__swatches {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.effect-control input[type="color"] {
  width: 100%;
  height: 26px;
  padding: 2px;
  border: 1px solid rgb(0 0 0 / 16%);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.effect-control input[type="color"]:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .effect-control {
    bottom: 16px;
    left: 16px;
    width: calc(100vw - 32px);
  }
}
