:root {
  color-scheme: light;
  --ink: #252334;
  --paper: #fff8ed;
}

* {
  box-sizing: border-box;
}

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

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f5dfc1;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.shell {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  padding: 8px;
  display: grid;
  place-items: center;
}

canvas {
  display: block;
  width: min(100%, calc((100vh - 16px) * 4 / 3), 960px);
  width: min(100%, calc((100svh - 16px) * 4 / 3), 960px);
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(76, 48, 25, 0.22);
  background: var(--paper);
  touch-action: none;
}

@media (max-width: 700px), (orientation: portrait) {
  .shell {
    padding: 6px;
  }

  canvas {
    width: min(100%, calc((100svh - 12px) * 43 / 76), 430px);
    max-height: calc(100svh - 12px);
    aspect-ratio: 43 / 76;
    border-radius: 10px;
    box-shadow: 0 16px 50px rgba(76, 48, 25, 0.2);
  }
}
