:root {
  color-scheme: dark;
  background: #0d1016;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 16px 56px;
}

#game {
  display: block;
  width: min(calc(100vw - 32px), calc((100vh - 112px) * 0.5625), 432px);
  width: min(calc(100vw - 32px), calc((100dvh - 112px) * 0.5625), 432px);
  height: auto;
  aspect-ratio: 288 / 512;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  cursor: pointer;
  background: #4ec0ca;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55), 0 0 0 3px #17191f;
}

#game:focus {
  outline: 2px solid #f7d51d;
  outline-offset: 4px;
}

#hint {
  margin: 0;
  color: #8f97a6;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  user-select: none;
}

@media (min-width: 641px) {
  #stage {
    padding: 16px;
  }

  #game {
    width: min(calc((100vh - 72px) * 0.5625), calc(100vw - 32px), 432px);
    width: min(calc((100dvh - 72px) * 0.5625), calc(100vw - 32px), 432px);
  }
}

@media (max-width: 640px) {
  #hint {
    display: none;
  }
}
