:root {
  color-scheme: dark;
  background: #182033;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, #233251 0%, #141827 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

#game {
  width: min(100vw - 32px, calc((100vh - 32px) * 16 / 9));
  height: auto;
  max-height: calc(100vh - 32px);
  aspect-ratio: 16 / 9;
  display: block;
  border: 3px solid #0e1422;
  border-radius: 8px;
  background: #8fd8ff;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  image-rendering: auto;
  touch-action: manipulation;
}

@media (max-width: 640px) {
  .shell {
    padding: 8px;
  }

  #game {
    width: min(100vw - 16px, calc((100vh - 16px) * 16 / 9));
    max-height: calc(100vh - 16px);
    border-width: 2px;
  }
}
