:root {
  color-scheme: dark;
  --gold: #d9b96e;
  --deep: #020509;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--deep);
}

body {
  display: grid;
  place-items: center;
  font-family: Georgia, "Times New Roman", serif;
}

#stage {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  overflow: hidden;
  border: 1px solid #725e37;
  background: #03070c;
  box-shadow: inset 0 0 0 1px #0d1720, 0 24px 90px #000e;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: default;
}

#utilities {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  gap: 7px;
  opacity: 0.22;
  transition: opacity 160ms ease;
}

#utilities:hover,
#utilities:focus-within {
  opacity: 1;
}

#utilities button {
  display: grid;
  width: 34px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 1px solid #8e7645;
  border-radius: 2px;
  color: #dbc487;
  background: #050a10d9;
  font: 700 15px/1 Georgia, serif;
  cursor: pointer;
}

#utilities button:hover,
#utilities button:focus-visible {
  color: #fff3c2;
  border-color: #d9b96e;
  outline: 1px solid #d9b96e;
  outline-offset: 2px;
}

@media (max-width: 760px), (max-height: 560px) {
  #stage {
    border: 0;
  }

  #utilities {
    top: 6px;
    right: 6px;
  }

  #utilities button {
    width: 29px;
    height: 27px;
    font-size: 13px;
  }
}
