@font-face {
  font-family: "kongtext";
  src: url(font.ttf);
}

body, html {
  padding: 0;
  margin: 0;
  font-family: kongtext, monospace;
  background: #1c170b;
  color: #d5cea3;
}

main {
  display: grid;
  grid-template-columns: max-content 1fr;
  padding: 1ch;
  gap: 1ch;
}

main > div {
  display: grid;
  grid-auto-rows: 1fr max-content max-content;
  gap: 1ch;
}

main > div > div {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  user-select: none;
  gap: 1ch;
}

textarea {
  resize: none;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: scroll;
  overflow-y: scroll;
  tab-size: 4ch;
}

textarea, button, select {
  font-family: kongtext, monospace;
  border: 3px solid #d5cea3;
  outline: none;
  font-size: 1rem;
  background: #3c2a21;
  color: #d5cea3;
  padding: 0.5ch;
}

button {
  cursor: pointer;
}

button:disabled {
  pointer-events: none;
  opacity: 0.5;
}

h1 {
  font-size: 1.25rem;
  padding: 0.5ch 0;
  margin: 0;
}

p {
  filter: brightness(90%);
  font-size: 0.9rem;
  padding: 1ch 0;
  margin: 0;
}

canvas {
  border: 3px solid #d5cea3;
  image-rendering: pixelated;
}

::selection {
  background-color: #d5cea3;
  color: #000;
}

#_colors, #_sounds {
  display: grid;
  width: 50%;
  max-height: 100px;
  overflow-y: scroll;
  list-style: none;
  margin: 1ch 0;
  padding: 0;
}

#_colors {
  grid-template-columns: repeat(6, 1fr);
}

#_sounds {
  grid-template-columns: repeat(3, 1fr);
}

#_colors li, #_sounds li {
  padding: 4px;
  margin-bottom: 4px;
  margin-right: 4px;
}

#_sounds li {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: 3ch 1fr;
  gap: 1ch;
  background-color: #3c2a21;
}

#_sounds li span:nth-child(1) {
  background-color: #000;
}

#_colors li span {
  display: inline-block;
  background: #1c1c1c;
  width: 3ch;
}

#_mem {
  margin: 0;
  padding: 0;
  max-height: 170px;
  overflow-y: scroll;
  list-style: none;
}

#_mem:empty {
  height: 0;
}

#_mem li {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 0;
  margin: 0;
}

#_mem li span {
  background-color: #222;
  padding-left: 1ch;
}

#_mem li span:nth-child(2n) {
  background-color: #3c2a21;
}

#_mem li.active span { background-color: #333 }
#_mem li.active span:nth-child(2n) {
  background-color: #3c3c3c;
}

#_mem li span:nth-child(1) { color: #666 }
#_mem li span:nth-child(4) { color: #ad6 }
#_mem li span:nth-child(2),
#_mem li span:nth-child(3) {
  color: #6aa;
}

a {
  color: #f0997d;
  text-decoration-thickness: 3px;
}

a:hover {
  color: #ffc3a1;
}
