html,
body.playroom {
  height: 100%;
  overflow: hidden;
}

body.playroom {
  background: #0e0b09;
}

#playroom {
  display: block;
  width: 100%;
  height: 100dvh;
  touch-action: none;
}

.playroom-title {
  position: fixed;
  left: 20px;
  top: 16px;
  margin: 0;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 520;
  font-size: clamp(32px, 3.4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--fg) 72%, transparent);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
}

.playroom-title.on {
  opacity: 1;
}

.playroom-menu {
  position: fixed;
  right: 22px;
  top: 20px;
  z-index: 2;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  text-align: right;
  opacity: 0;
  pointer-events: none;
}

.playroom-menu.on {
  opacity: 1;
  pointer-events: auto;
}

.playroom-menu-label {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: color-mix(in srgb, var(--accent) 70%, transparent);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.playroom-menu a {
  display: block;
  padding: 3px 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: color-mix(in srgb, var(--fg) 62%, transparent);
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.playroom-menu a:hover,
.playroom-menu a:focus-visible {
  background: none;
  border: 0;
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.playroom-pose {
  position: fixed;
  left: 20px;
  bottom: 16px;
  z-index: 2;
}

body.playroom:not(.is-ready) .playroom-pose {
  visibility: hidden;
}

.playroom-pose .chrome-action[hidden] {
  display: none;
}

#load-error {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 56px;
  z-index: 3;
  max-width: 36rem;
  margin: 0;
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 13px;
}

.playroom-noscript {
  position: fixed;
  left: 20px;
  top: 64px;
  z-index: 3;
  max-width: 28rem;
  color: var(--muted);
}

body.playroom:not(.is-ready) .playroom-title,
body.playroom:not(.is-ready) .playroom-menu {
  transition: none;
}

body.playroom.is-ready .playroom-title,
body.playroom.is-ready .playroom-menu {
  transition: opacity 280ms ease;
}

@media (prefers-reduced-motion: reduce) {
  body.playroom.is-ready .playroom-title,
  body.playroom.is-ready .playroom-menu {
    transition: none;
  }
}

@media (max-width: 600px) {
  .playroom-menu {
    top: 60px;
    right: 16px;
  }
}
