*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  width:100%;
  min-width:0;
  background:#070716;
  color:#fff;
  font-family:"Courier New",monospace;
  overflow-x:hidden;
}
body{padding:0}
main{
  display:block;
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
}
.shell{
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  padding:10px;
  background:#11113b;
  border:5px solid #7070d0;
  box-shadow:none;
  overflow:hidden;
}
header,footer{
  width:100%;
  max-width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
header{
  color:#f5e85d;
  font-size:20px;
  margin-bottom:8px;
}
header div{display:flex;gap:7px;flex-wrap:wrap}
button{
  font:700 12px "Courier New",monospace;
  background:#34349a;
  color:#fff;
  border:2px solid #8585ff;
  padding:7px 9px;
  cursor:pointer;
}
canvas{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  aspect-ratio:8 / 5;
  background:#121247;
  border:3px solid #040419;
  image-rendering:pixelated;
  touch-action:none;
}
footer{
  font-size:12px;
  color:#bcbcff;
  padding-top:8px;
  overflow:hidden;
}
.touch{
  display:none;
  width:100%;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  margin-top:8px;
}
.touch button{min-width:0;min-height:48px;padding:5px}
.touch button:last-child{background:#8d2870}

@media(max-width:760px),(pointer:coarse){
  .shell{border-width:3px;padding:6px}
  header{font-size:16px}
  .touch{display:grid}
  footer{display:none}
}
