:root {
  color-scheme: dark;
  font-family: serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: #000;
  color: #fff;
  overflow: hidden;
}

.back {
  background: #000;
  color: #fff;
  left: max(0.75rem, env(safe-area-inset-left));
  padding: 0.4rem 0.55rem;
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  z-index: 10;
}

.back:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.game-shell {
  width: min(1024px, 100vw);
}

#status {
  color: #888;
  font-size: 0.9rem;
  left: 50%;
  margin: 0;
  position: fixed;
  top: calc(50% + min(32vw, 320px) + 0.75rem);
  transform: translateX(-50%);
  white-space: nowrap;
}

#status:empty {
  display: none;
}

#screen {
  aspect-ratio: 8 / 5;
  background: #000;
  cursor: none;
  display: block;
  height: auto;
  image-rendering: pixelated;
  overflow: hidden;
  width: 100%;
}

#screen:focus-visible {
  outline: 1px solid #555;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .back {
    font-size: 0.9rem;
  }
}
