@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

html, body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* min-height, not height: content taller than the viewport scrolls instead of being clipped by flex centring */
    flex-direction: column;
    font-family: 'Source Sans 3', Arial, sans-serif;
  }

  canvas {
    display: block;
    /* p5 writes inline width/height styles on the element, so !important is
       required. height: auto keeps the aspect ratio while max-width downscales. */
    max-width: 100% !important;
    height: auto !important;
  }
  
  #buttons {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 600px;
    margin-top: 10px;
  }
  
  button {
    flex-grow: 1;
    margin: 0 5px;
    padding: 10px;
    font-size: 16px;
    background-color: #f2c419;
    color: #34302a;
    border: 2px solid #a87f10;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  button:hover {
    background-color: #d9a414;
  }

  button:active {
    background-color: #a87f10;
  }
  
  @media (max-width: 600px) {
    button {
      font-size: 14px;
      padding: 8px;
    }
  }