html, body {
  width: 100vw;
  height:  90vh;
  margin: 0;
  padding: 0;
}
.ed {
  display: grid;
  grid-gap: 1em;
  grid-template-columns: repeat(2, 1fr);
  height: 100%;
  box-sizing: border-box;
  padding: 1em;
}
.ed form {
  display: flex;
  flex-direction: column;
}
.ed form select,
.ed form input,
.ed textarea,
.ed button {
  border-radius: 4pt;
  font-family: monospace;
  background-color: #112;
  color: #eee;
  outline: none;
  padding: 4pt;
  line-height; 1.8em;
}
.ed .controls {
  display: grid;
  grid-template-columns: 1fr 3em 1fr 3em;
}
.ed .controls input,
.ed .controls select {
  border-radius: 4pt 0 0 4pt;
  border-width: 0;
  outline: none;
  background-color: #112d;
}
.ed .controls button {
  border-radius: 0 4pt 4pt 0;
  border-width: 0;
  outline: none;
}
.ed .controls button:first-of-type {
  margin: 0 2pt 0 0;
}
.ed textarea {
  height: 100%;
  width 100%;
  box-sizing: border-box;
  margin: 1pt 0;
}
.ed textarea[disabled] {
  opacity: 0.9;
  background-color: #114;
}
img#out{
  margin: 1em auto;
  max-width: 60vw;
  max-height: 100vh;
}
.ed div:nth-child(2) {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#keep, #ro {
  text-align: right;
}
#keep {
  display: block;
}
#ro { display: none; }
body.readonly #keep,
body.readonly .controls { display: none; }
body.readonly #ro { display: block; }
