html, body {
  margin: 0;
  padding: 0;
  justify-content: center; /* Horizontal center */
  align-items: center;     /* Vertical center */
  width: 100vw;
  height: 100vh;
  background: #000;
  color: #fff;
  overflow: hidden;
}

#teletext {
  width: fit-content;

  margin-left: auto;
  margin-right: auto;

  padding-top: 2vh;
}

pre {
  margin: 0;

  white-space: pre;
  line-height: 1em;

  font-size: clamp(16px, 2.6vh, 28px);

  font-family: "TeletextStd", monospace;

  overflow: visible;
}
pre {
  margin: 0;
  white-space: pre;
  line-height: 1em;
  font-size: clamp(16px, 2.6vh, 28px);
  font-family: "TeletextStd", monospace;
}

/* Auto font selection */
@media (min-width: 1600px) {
  pre { font-family: "TeletextWide", monospace; }
}

@media (max-width: 1100px) {
  pre { font-family: "TeletextCondensed", monospace; }
}

/* Teletext colours */
.red { color: #f00; }
.green { color: #0f0; }
.yellow { color: #ff0; }
.blue { color: #00f; }
.cyan { color: #0ff; }
.magenta { color: #f0f; }
.white { color: #fff; }

/* Background banners */
.tt-bg-red { background: #f00; color: #fff; }
.tt-bg-blue { background: #00f; color: #fff; }
.tt-bg-yellow { background: #ff0; color: #000; }

/* Mosaic blocks */
.mosaic { letter-spacing: 0; }
.m-red { color: #f00; }
.m-white { color: #fff; }
.m-cyan { color: #0ff; }

/* =========================================
   TELEtext Double Height
   ========================================= */

.tt-double {
  display: inline-block;

  transform: scaleY(2);
  transform-origin: top left;

  line-height: 1em;

  margin-bottom: 1em;
}

/* Optional: double width */
.tt-double-width {
  display: inline-block;

  transform: scale(2, 2);
  transform-origin: top left;

  line-height: 1em;

  margin-bottom: 1em;
}

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

@keyframes blink {
  50% { opacity: 0; }
}
/* =========================================
   Hidden mobile keypad input
   ========================================= */

#pageInput {

  position: absolute;

  opacity: 0;

  width: 1px;
  height: 1px;

  border: none;

  pointer-events: none;
}