#xrControllerGuide {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(460px, 54vw);
  display: none;
  z-index: 40;
  pointer-events: auto;
  filter: drop-shadow(0 14px 28px rgba(25, 31, 40, .22));
}

#xrControllerGuide.is-visible {
  display: block;
  animation: xr-guide-in .24s ease-out both;
}

#xrControllerGuide canvas {
  display: block;
  width: 100%;
  height: auto;
}

.xr-guide-close,
#xrControllerGuideToggle {
  border: 0;
  color: #6b7684;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 22px rgba(25, 31, 40, .16);
  font-family: inherit;
  cursor: pointer;
}

.xr-guide-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 28px;
}

#xrControllerGuideToggle {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  display: none;
  place-items: center;
  z-index: 41;
  border-radius: 8px;
}

#xrControllerGuideToggle.is-visible {
  display: grid;
}

#xrControllerGuideToggle img {
  width: 22px;
  height: 22px;
  opacity: .76;
}

@keyframes xr-guide-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  #xrControllerGuide { width: min(430px, 92vw); }
}

@media (prefers-reduced-motion: reduce) {
  #xrControllerGuide.is-visible { animation: none; }
}
