*, *:before, *:after {
  box-sizing: border-box;
}

body {
  text-align: center;
  padding: 16px;
  font-family: sans-serif;
}

canvas {
  border: 1px solid rgba(0, 0, 0, 0.4);
  cursor: crosshair;
}

.ctrls {
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  margin-bottom: 8px;
  display: inline-grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 16px;
}

.ctrl {
  display: inline-block;
  max-width: 300px;
  text-align: left;
}

.ctrl label {
  display: block;
  padding: 0 0 2px;
  font-size: 0.6em;
  color: rgba(0, 0, 0, 0.7);
}

.ctrl label.label {
  font-size: inherit;
}

.button {
  background: #55bf40;
  color: black;
  font: inherit;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}
.button_grey {
  background: #cccccc;
}
.button_upload {
  position: relative;
  margin-bottom: 4px;
  width: 100%;
}
.button_upload input {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
  padding: 0;
}
.button_upload svg {
  margin-left: 0.6em;
  width: 16px;
  height: 16px;
}

input,
select {
  width: 100%;
  font: inherit;
  padding: 4px;
}

input[type=color] {
  padding: 0;
  border: 2px solid white;
  border-radius: 99px;
  width: 32px;
  height: 32px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
input[type=color]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type=color]::-webkit-color-swatch {
  border: none;
  border-radius: 99px;
}

input[type=radio] {
  display: inline-block;
  width: 12px;
  height: 12px;
}

.swatch {
  border: 0;
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-right: 4px;
  border-radius: 99px;
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}