:root {
  color-scheme: light;
  background: #faf9f6;
  color: #111;
}

body {
  margin: 0;
  touch-action: pan-y pinch-zoom;
}

main {
  display: grid;
  place-items: center;
  min-height: 100svh;
  height: 100dvh;
}

#cube {
  display: block;
  width: 38vmin;
  height: 38vmin;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transform: scale(var(--scroll-scale, 1));
}

#cube:active {
  cursor: grabbing;
}

#cube:focus-visible {
  outline: 1px solid #777268;
  outline-offset: 18px;
  border-radius: 4px;
}

.visual {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.visual svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#hint {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 0;
  width: 100%;
  margin: 0;
  color: #777268;
  font:
    12px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  text-align: center;
  pointer-events: none;
  transition: opacity 240ms ease;
}

#hint.hidden {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  #hint {
    transition: none;
  }
}
