* {
  user-select: none;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#M {
  position: absolute;
  background: #000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

#M {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;

  width: 100vw;
  height: 66.66vw;
  background: #000;
}

@media (min-aspect-ratio: 3/2) {
  #M {
    width: 150vh;
    height: 100vh;
  }
}

#HUD {
  visibility: hidden;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 10px;
}

#T,
#L {
  font-family: monospace;
  padding: 15px;
  line-height: 70px;
  font-size: 60px;
  text-shadow: 1px 1px 3px #000;
}

#L {
  float: right;
  color: #afc;
  transition: opacity 1.2s linear;
  opacity: 0;
}

#L.a {
  opacity: 1;
}

#T {
  float: left;
  border-radius: 10px;
  width: 70px;
  text-align: center;
  transition: color 150ms linear, background-color 300ms linear;
  background: rgba(20, 0, 40, 0.3);
  border: 1px solid rgba(20, 0, 40, 0.3);
}

#T.x {
  background: red;
}

#c {
  padding: 0;
  display: block;
  visibility: hidden;
}

pre {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  color: #8fa;
  position: absolute;
  white-space: pre-wrap;
  font-size: 19px;
  padding: 1em;
}

#B {
  display: inline-block;
  background: #8fa;
  animation: B 1s linear infinite;
}

@keyframes B {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  51% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

#end {
  display: none;
}

.won #end {
  display: block;
}

.won #hud {
  display: none;
}

#intro {
  overflow: hidden;
  max-height: 0px;
  transition: max-height 1.2s linear;
}

#intro.a {
  max-height: 100%;
}

.started #intro {
  display: none;
}

.started #c,
.started #HUD {
  visibility: visible;
}

small {
  font-family: monospace;
  font-size: 13px;
  position: absolute;
  right: 0;
  bottom: 15px;
  color: #040;
}

.started small {
  display: none;
}

button{font:inherit;color:#bfffd8;background:#132d24;border:1px solid #578b6a;border-radius:6px;padding:10px 15px;cursor:pointer;touch-action:none}button:active{background:#395b46}#controls{display:none;position:fixed;bottom:12px;left:50%;transform:translateX(-50%);gap:6px;z-index:5;font:16px monospace}.started #controls{display:flex}#status{position:fixed;top:12px;left:14px;color:#bfffd8;font:14px monospace;pointer-events:none}#intro{box-sizing:border-box;overflow:auto;font-size:clamp(12px,2vw,19px)}#T,#L{font-size:30px;padding:7px;line-height:40px}#HUD{bottom:64px}#T{width:52px}@media(max-width:600px){#controls{width:96%;justify-content:center}button{padding:10px 8px}#L{font-size:20px}}
