body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
  font-family: monospace;
  background-color: #1c1c1c;
  color: #f1ecf5;
  line-height: 1.6;
}

a {
  color: #f1ecf5;
}

h1 {
  margin-top: 2em;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 2em;
  margin-bottom: 2em;
}

.main-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 500px;
  width: 50%;
  margin: 2em 0;
  text-align: left;
}

main > div {
  display: block !important;
  max-width: 90vw !important;
  max-height: 75vh !important;
  aspect-ratio: 3 / 4 !important;
  width: auto !important;
  height: auto !important;
}

main > div > svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.sketch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2em;
  row-gap: 0.5em;
  width: 100%;
  max-width: 500px;
  margin: 2em 0;
  justify-items: center;
}

iframe {
  aspect-ratio: 9 / 16 !important;
  border: none;
}

canvas,
iframe {
  display: block;
  max-width: 90vw;
  max-height: 75vh;
  width: auto !important;
  height: auto !important;
}

nav {
  margin-top: 2em;
  width: 95%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.center {
  display: grid;
  grid-template-columns: minmax(50px, 1fr) auto minmax(50px, 1fr);
  align-items: center;
  gap: 1em;
  width: 100%;
  text-align: center;
  min-width: 24em;
}

.prev {
  justify-self: start;
}

.next {
  justify-self: end;
}

.prompt {
  font-style: italic;
  max-width: 40%;
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.8em;
  }

  .main-container {
    width: 90%;
  }

  .sketch-grid {
    column-gap: 1em;
    row-gap: 0.75em;
  }

  nav {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 1.5em;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
  }

  nav > a {
    justify-self: start;
  }

  .center {
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    min-width: auto;
  }

  .prompt {
    max-width: none;
    width: 90%;
  }
}
