@keyframes wiggle {
  0% {
    transform: rotate(12deg);
  }
  80% {
    transform: rotate(12deg);
  }
  84% {
    transform: rotate(8deg);
  }
  88% {
    transform: rotate(16deg);
  }
  92% {
    transform: rotate(8deg);
  }
  96% {
    transform: rotate(16deg);
  }
  100% {
    transform: rotate(12deg);
  }
}

h1::after {
  content: 'BETA';
  font-size: small;
  background-color: #de461c;
  box-shadow: 0 1px 0 #a73819;
  color: #ffffff;
  text-shadow: 0 -1px 0 #a73819;
  padding: 2px 8px;
  border-radius: 32px;
  transform: rotate(12deg);
  position: absolute;
  margin-top: -8px;
  margin-left: -8px;
  animation: wiggle 5200ms infinite;
}

h3 {
  font-weight: 500;
}

section {
  text-align: center;
}

section#dropzone {
  max-width: 400px;
  margin: 32px auto;
  border: 4px dashed #312f2880;
  padding: 4px;
  border-radius: 16px;
  background-color: #0000001a;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  aspect-ratio: auto 200/120;
}
section#dropzone:hover {
  border: 4px dashed #312f28d0;
}

section#dropzone input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 0;
}
section#dropzone h3 {
  color: #312f2880;
  margin: 8px;
  text-wrap: balance;
}
section#dropzone:hover h3 {
  color: #312f28d0;
}
h3.error {
  color: #be2d08 !important;
}

canvas#card-view {
  background-color: #312f28;
  aspect-ratio: auto 200/120;
  width: 100%;
  image-rendering: pixelated;
  mix-blend-mode: hard-light;
  display: none;
}

section#dropzone.loaded {
  background-color: #00ff00;
  border: 8px solid #000000;
  padding: 0;
  border-radius: 8px;
}
section#dropzone.loaded h3 {
  display: none;
}
section#dropzone.loaded canvas#card-view {
  display: block;
}

section.instructions {
  margin-top: -24px;
  color: #a77f3b;
  font-size: small;
  font-style: italic;
  max-width: 500px;
  text-align: center;
}

section.config {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
  gap: 32px 64px;
}

input[type='text'],
select {
  appearance: none;
  background-color: #ffffff;
  color: #000000;
  font-size: 16px;
  box-sizing: border-box;
  height: 40px;
  padding: 4px 12px;
  border-radius: 32px;
  border: 4px solid #312f28;
}

input#title-in {
  width: 200px;
}

#color-wrap {
  border: 4px solid #00000080;
  background-color: #ffffff;
  color: #000000;
  display: inline-block;
  width: 32px;
  height: 32px;
  box-sizing: content-box;
  border-radius: 32px;
  cursor: pointer;
  transition: transform 80ms;
}

#color-wrap:hover {
  transform: scale(1.1);
  filter: brightness(1.1);
}

#color-wrap input {
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

input[type='checkbox'] {
  appearance: none;
  background-color: #000000;
  width: 64px;
  height: 40px;
  border-radius: 32px;
  vertical-align: middle;
  margin: 0 8px;
  position: relative;
  cursor: pointer;
  transition: background-color 80ms;
}
input[type='checkbox']::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  margin: 4px;
  border-radius: 32px;
  background-color: #ffffff;
  transition: left 80ms;
}

input[type='checkbox']:checked {
  background-color: #4ea867;
}
input[type='checkbox']:checked::before {
  left: 24px;
}

/* #autoplay-in ~ p {
  opacity: 0;
  transition: opacity 80ms;
}
#autoplay-in:checked ~ p {
  opacity: 1;
} */

/* input#autoplay-in {
  appearance: none;
  margin: 0 auto;
  background-color: #ffffff;
  border: 4px solid #000000;
  width: 32px;
  height: 32px;
  box-sizing: content-box;
  border-radius: 32px;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: transform 80ms;
}

input#autoplay-in:hover {
  transform: scale(1.1);
}

input#autoplay-in::before {
  content: '';
  width: 24px;
  height: 24px;
  border-radius: 32px;
  background-color: #312f28;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: transform 80ms;
}

input#autoplay-in:checked::before {
  transform: scale(1);
} */

select {
  text-align: center;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23312f28%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
  background-size: 16px;
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 32px;
  cursor: pointer;
}

table {
  font-size: 16px;
  text-align: right;
}

a#download-link,
a.clicky {
  border-radius: 32px;
  padding: 8px 24px;
  background-color: #312f28;
  color: #ffffffdd;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  border-bottom: 4px solid #000000;
}
a#download-link:hover,
a.clicky:hover {
  color: #ffffff;
}
a#download-link:active,
a.clicky:active {
  top: 3px;
  border-bottom: 1px solid #000000;
}
a#download-link.disabled,
a.clicky.disabled {
  color: #ffffff20 !important;
  pointer-events: none;
}

#download-link + p,
a.clicky + p {
  color: #9f824f;
  font-size: small;
  font-style: italic;
  margin-top: 16px;
}
