* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #9f9;
  font-family: "Courier New", monospace;
  overflow: hidden;
  overscroll-behavior: none;
}

.wrap {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  gap: 8px;
}

/* The canvas fills the space left over and keeps its shape inside that box. */
#game {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  touch-action: none;
}

button {
  font: inherit;
  font-weight: bold;
  color: #9f9;
  background: #111;
  border: 2px solid #3a3;
  border-radius: 8px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  background: #3a3;
  color: #000;
}

button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.bar {
  display: flex;
  gap: 8px;
}

.bar button {
  padding: 6px 12px;
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
