*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 100%;
  font-weight: normal;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
}

.controller {
  display: flex;
  align-items: center;
  gap: .75rem;
  position: fixed;
  z-index: 999;
  bottom: 1.5rem;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  width: auto;
  padding: .75rem;
  background-color: white;
  border: 1px solid gainsboro;
  border-radius: .5rem;
  box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .125);
}

.input {
  display: block;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
  cursor: pointer;
}

.input[type="color"] {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: .25rem;
}

.input[type="color"]::-webkit-color-swatch-wrapper {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: .25rem;
}

.input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  outline: 0;
  cursor: pointer;
}

.input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background-color: gainsboro;
  border-radius: 0;
  outline: 0;
}

.input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 1.25rem;
  width: 1.25rem;
  margin-top: calc((1px - 1.25rem) / 2);
  background-color: white;
  border: 1px solid gainsboro;
  border-radius: 50%;
  outline: 0;
  box-shadow: none;
}

.input[type="range"]::-moz-range-track {
  height: 1px;
  background-color: gainsboro;
  border-radius: 0;
  outline: 0;
}

.input[type="range"]::-moz-range-thumb {
  height: 1.25rem;
  width: 1.25rem;
  background-color: white;
  border: 1px solid gainsboro;
  border-radius: 50%;
  outline: 0;
  box-shadow: none;
}

.button {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: .125rem .75rem;
  font: inherit;
  font-size: .875rem;
  white-space: nowrap;
  color: inherit;
  background-color: rgba(0, 0, 0, .075);
  border: 0;
  border-radius: .25rem;
  outline: 0;
  cursor: pointer;
}

.button:hover {
  background-color: rgba(0, 0, 0, .1);
}

.gallery {
  display: none;
  position: absolute;
  z-index: 999;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  background-color: white;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery img {
  display: block;
  position: sticky;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}