* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #13131b;
}
body {
  display: grid;
  place-items: center;
  font-family: system-ui, sans-serif;
}
main {
  width: 100%;
  display: grid;
  place-items: center;
}
canvas {
  display: block;
  width: min(100vw, 177.7778vh);
  height: auto;
  max-height: 100vh;
  aspect-ratio: 16/9;
  touch-action: none;
}
nav {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid #ffffff2a;
  border-radius: 50px;
  background: #141522b3;
  backdrop-filter: blur(18px);
  opacity: 0.25;
  transition: opacity 0.2s;
}
nav:hover,
nav:focus-within,
body.controls nav {
  opacity: 1;
}
button,
nav a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #f8efdc;
  font-size: 23px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
button:hover,
a:hover,
button[aria-pressed="true"] {
  background: #ffffff25;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #e3b553;
  outline-offset: 2px;
}
output {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #fff;
  background: #15151bcb;
  border-radius: 20px;
  padding: 8px 15px;
  pointer-events: none;
}
output:empty {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  nav {
    opacity: 1;
  }
}
@media (max-width: 700px) {
  nav {
    opacity: 0.8;
    bottom: 20px;
  }
}
