html, body {
  margin: 0;
  height: 100%;
  background: #d3dbc0;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background: #d3dbc0 url(background.webp) center / cover no-repeat;
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* saved artworks: transparent hit areas over the miniatures the canvas draws */
.shelf {
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mini {
  flex: none;
  width: 104px;
  height: 104px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
}

.controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 40px));
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 1.5px solid #fff;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-family: 'Inter Display', 'Inter', system-ui, sans-serif;
  font-variation-settings: 'opsz' 32;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover { background: rgba(255, 255, 255, .18); }
.btn:active { background: rgba(255, 255, 255, .3); }
.btn:focus-visible, .mini:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.track {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 32px;
}

.ticks {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.ticks span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
}

.range::-webkit-slider-runnable-track { height: 1.5px; background: rgba(255, 255, 255, .85); border-radius: 1px; }
.range::-moz-range-track { height: 1.5px; background: rgba(255, 255, 255, .85); border-radius: 1px; }

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -6.25px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(30, 38, 34, .45);
}

.range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(30, 38, 34, .45);
}

.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 1px 5px rgba(30, 38, 34, .45), 0 0 0 2px #3f4a41; }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 1px 5px rgba(30, 38, 34, .45), 0 0 0 2px #3f4a41; }

@media (max-width: 520px) {
  .controls { gap: 10px; bottom: 22px; }
  .btn { padding: 0 12px; }
}
