/* One live room, behind the document. Foreground controls own all hit targets. */
body {
  isolation: isolate;
}
.room-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  background: #e94f24;
}
.room-background *,
.room-background::before,
.room-background::after {
  pointer-events: none !important;
}
.room-stage,
#room-canvas,
.room-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.room-stage {
  overflow: hidden;
}
.room-poster {
  display: block;
  object-fit: cover;
  object-position: 70% 42%;
}
#room-canvas {
  display: block;
  max-width: none;
  opacity: 0;
  transition: opacity 300ms ease;
}
.room-stage[data-state="ready"] #room-canvas {
  opacity: 1;
}
/* Fine stationary print dots echo the reference without obscuring the face. */
.room-background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: radial-gradient(#2c2317 0.45px, transparent 0.7px);
  background-size: 4px 4px;
  opacity: 0.12;
  mix-blend-mode: multiply;
}
.room-shade {
  display: none;
}
.site-header,
#main-content,
.site-footer {
  position: relative;
  z-index: 1;
}
/* This invisible measured screen is Tinker's destination, not another canvas. */
#avatar-stage {
  position: fixed;
  left: 64vw;
  top: 29vh;
  width: 22vw;
  height: 21vh;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  background: transparent;
}
.room-toolbar {
  position: fixed;
  left: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
}
#room-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #292b21;
  border-radius: 2px;
  background: #f0e8cf;
  color: #191e17;
  font-size: 13px;
  line-height: 1.2;
  box-shadow: 3px 3px 0 rgb(25 30 23 / 18%);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
#room-pause::before {
  content: "";
  width: 8px;
  height: 11px;
  border-inline: 2px solid currentColor;
}
#room-pause[aria-pressed="true"]::before {
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-left: 8px solid currentColor;
  transform: translateX(2px);
}
#room-pause:is(:hover, :focus-visible) {
  background: #191e17;
  color: #f0e8cf;
}
@media (max-width: 760px) {
  .room-poster {
    object-position: 55% 43%;
    /* Keep the loading/fallback image below the name as well. */
    clip-path: inset(var(--room-name-clearance, 230px) 0 0);
  }
  .room-toolbar {
    left: auto;
    right: 18px;
    top: 20px;
    bottom: auto;
  }
  #room-pause {
    width: 44px;
    height: 44px;
    padding: 12px;
    font-size: 0;
    gap: 0;
  }
  .site-header .brand {
    width: calc(100% - 56px);
    margin-right: 56px;
  }
  .site-footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 350px) {
  .room-toolbar {
    right: 14px;
    top: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #room-canvas {
    transition: none;
  }
}
