* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #000;
}

body {
  color: #c0c0c0;
  font-family: "Perfect DOS VGA 437", "IBM VGA 8x16", Consolas, "Lucida Console", "Courier New", monospace;
  font-size: 18px;
  line-height: 1.3;
  cursor: text;
}

#screen {
  min-height: 100vh;
  min-height: 100dvh;
  /* Half a window of space below the last line, so scrolling to the bottom
     always leaves the command line at or above the middle of the window. */
  padding: 12px 14px 50vh;
  padding-bottom: 50dvh;
}

a {
  color: inherit;
}

.line {
  min-height: 1.3em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ascii {
  white-space: pre;
  overflow-x: auto;
  line-height: 1.1;
}

canvas,
.generated {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.4em 0;
}

canvas {
  image-rendering: pixelated;
}

#prompt-line {
  position: relative;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The real input is invisible; the typed text is mirrored into #typed. */
#cmd {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  opacity: 0;
  font-size: 16px;
}

.cursor {
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 19.5px; /* 15px + 30% */
  }
}
