html {
  --c-input-bg: #fff;
  --c-bg: #f9f9f9;
  --c-bg-alt: #1a1a1a;
  --c-text: #212121;
  --c-cta: #1565c0;
  --c-metadata: #5f5f5f;
  --c-input-fg: #212121;
  --c-text-dark-bg: #999999;
  --c-input-border: #e0e0e0;
  --c-text-dark: #999999;
  --c-heading-article: #000;
  --c-heading-bg: #eeeeee;
  --c-code-bg: #f5f5f5;
  --c-code-fg: #000;
  --c-bg-cta: #fff;
}
@media (prefers-color-scheme: dark) {
  html {
    --c-code-bg: #2d2d2d;
    --c-code-fg: #ddd;
    --c-cta: #03a9f4;
    --c-bg: #262626;
    --c-bg-alt: #222;
    --c-bg-cta: #222;
    --c-text: #eee;
    --c-text-dark: #8b8b8b;
    --c-text-dark-bg: #dfdfdf;
    --c-input-bg: #3b3a3a;
    --c-input-fg: #fff;
    --c-heading-article: #fff;
    --c-heading-bg: #111;
    --c-input-border: #000;
  }
}

* {
  font-family: "ubuntu mono";
  box-sizing: border-box;
  font-size: 18px;
}

::-moz-color-swatch {
  border-color: transparent !important;
}

small {
  font-size: 90%;
}

p {
  line-height: 1.3;
}

[hidden] {
  display: none !important;
}

body {
  padding: 0;
  margin: 0;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  color: var(--c-text);
}

footer {
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--c-text-dark);
}

footer a {
  font-size: 0.8rem;
  color: var(--c-text-dark);
}

input {
  color: var(--c-input-fg);
  background: var(--c-input-bg);
}

input[type="color"]::-webkit-color-swatch {
  border-color: transparent;
}

output {
  flex-grow: 1;
  text-align: right;
  margin-left: 8px;
}

h1 {
  font-size: 26px;
}

img {
  /* transform-origin: 0 0; */
  margin: 0 auto;
  display: block;
  /* transform: scale(20); */
  width: 100px;
  height: 100px;
}

canvas {
  margin: 0 auto;
  display: block;
  width: 100px;
  height: 100px;
}

main {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

main > div {
  width: 100%;
  padding: 0;
  padding-top: 32px;
}

#result {
  width: 100%;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  padding-bottom: 0;
}

#result > div {
  margin-left: 16px;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

input,
img {
  border-radius: 2px;
}

input[type="text"],
input[type="number"] {
  border: 1px solid #ccc;
  flex: 1;
  padding: 8px;
}

input[type="range"] {
  flex: 1;
}

input + input[type="color"] {
  cursor: pointer;
  border: 1px solid #ccc;
  display: block;
  background: black;
  width: 24px;
  height: 24px;
  border-radius: 2px;
  position: absolute;
  right: 8px;
}

#result p {
  margin: 8px 0;
}

#input > div {
  position: relative;
  margin: 16px 0;
  display: flex;
  align-items: center;
}

#input label,
#input .label {
  cursor: pointer;
  min-width: 120px;
}

#input .list {
  flex-direction: column;
  align-items: flex-start;
}
#input .list label {
  margin: 8px 0;
}

#length {
  width: 200px;
  flex-grow: 0;
}

button {
  cursor: pointer;
  background: rgb(27, 149, 224);
  color: white;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 5px;
  margin: 24px auto 48px auto;
  display: block;
}

button:hover {
  background: rgb(24, 167, 255);
}
