body {
  font-family: sans-serif;
}

button,
input[type="file"] {
  cursor: pointer;
  border: 1px solid #ccc;
  background: #eee;
}
button.selected,
input[type="file"].selected {
  background: #666;
  border-color: #000;
  color: #fff;
  font-weight: bold;
}
input[type="number"] {
  width: 4em;
}

div.draw-control:not(.selected),
div.upload-control:not(.selected) {
  display: none !important;
}

div.upload-mode-threshold:not(.selected),
div.upload-mode-dither:not(.selected) {
  display: none !important;
}

#draw-input {
  display: flex;
  flex-direction: column;
  height: 600px;
  width: 600px;
}
#draw-input .row {
  display: flex;
  flex: 1 1 auto;
}
#draw-input .row .pixel {
  border: 0.5px solid #fff;
  border-bottom-color: #39c;
  background: #ddd;
  cursor: pointer;
  flex: 1 1 auto;
}
#draw-input .row .pixel:nth-child(8n) {
  border-right-color: #39c;
  border-right-width: 1px;
}
#draw-input .row .pixel.one {
  background: #800000; 
}

#upload-preview {
  border: 1px solid #ccc;
}

#preview-unit {
  margin-top: 1em;
}
#preview-printer {
  margin: 1em 0 0.5em;
}
#preview-page {
  border-bottom: 1px dotted #555;
  border-top: 1px dotted #555;
  box-shadow: 0 1px 5px #555;
  box-sizing: border-box;
  width: 340px;
  padding: 20px 10px 30px;
}

#code-output-area {
  margin: 1em 0;
}
#code-output-area p {
  margin: 1em 0 0.5em;
}
#image-output,
#draw-output,
#image-fn-output {
  border: 1px solid #ccc;
  background: #eee;
  height: 24em;
  width: 90%;
  white-space: pre;
}
#draw-output {
  height: 5em;
}
#image-fn-output {
  height: 16em;
}
