.unreal-seat-perspective {
  position: absolute;
  inset: 0;
  z-index: 39;
  overflow: hidden;
  touch-action: none;
  background: #080b0a;
  cursor: grab;
}

.unreal-seat-perspective[aria-hidden="true"] { display: none; }
.unreal-seat-perspective.is-dragging { cursor: grabbing; }

.unreal-seat-perspective__panorama,
.unreal-seat-perspective__three {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.unreal-seat-perspective__panorama { z-index: 0; }
.unreal-seat-perspective__three { z-index: 1; pointer-events: none; }

.unreal-seat-perspective__media {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.unreal-seat-perspective__return,
.unreal-seat-perspective__status {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.9);
  background: rgba(22,24,22,.56);
  box-shadow: 0 12px 34px rgba(0,0,0,.24);
  backdrop-filter: blur(22px) saturate(1.16);
  -webkit-backdrop-filter: blur(22px) saturate(1.16);
}

.unreal-seat-perspective__return {
  bottom: max(22px, env(safe-area-inset-bottom));
  left: max(18px, env(safe-area-inset-left));
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font: 500 13px/1 system-ui, sans-serif;
  cursor: pointer;
}

.unreal-seat-perspective__status {
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 9px 14px;
  border-radius: 999px;
  font: 450 12px/1 system-ui, sans-serif;
  letter-spacing: .01em;
  pointer-events: none;
}

.unreal-seat-perspective[data-world-ready="true"] .unreal-seat-perspective__status {
  opacity: 0;
  transition: opacity .35s ease;
}

/* The room's existing person card remains the one social surface in immersive
   view. Raise that portal above the renderer without duplicating its design. */
.room--first-person > .card { z-index: 44; }

@media (prefers-reduced-motion: reduce) {
  .unreal-seat-perspective__status { transition: none !important; }
}
.spatial-speaking-indicators {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.spatial-speaking-anchor {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}
.spatial-speaking-indicator {
  position: absolute;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
  width: 34px;
  height: 30px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  transform: translate(-50%, calc(-100% - 8px)) scale(var(--speaker-scale, 1));
  transform-origin: center bottom;
  color: #f8f7ef;
}
.spatial-speaking-indicator svg {
  filter: drop-shadow(0 1px 1px rgba(12, 25, 21, .9)) drop-shadow(0 0 1px rgba(12, 25, 21, .8));
}
.spatial-speaking-indicator .speech-bar {
  transform-box: fill-box;
  transform-origin: center;
}
.spatial-speaking-indicator .speech-bar--near { transform: scaleY(var(--speech-near, 1)); }
.spatial-speaking-indicator .speech-bar--far { transform: scaleY(var(--speech-far, 1)); }

.spatial-speaking-indicator svg { width: 24px; height: 24px; }
.spatial-speaking-indicator:disabled { cursor: default; pointer-events: none; }
.spatial-speaking-indicator:focus-visible { outline: 2px solid #f8f7ef; outline-offset: 3px; }
.spatial-speaking-indicator .speech-muted { display: none; }
.spatial-speaking-indicator.is-muted .speech-muted { display: block; }
.spatial-speaking-indicator.is-muted .speech-bar { display: none; }
@media (pointer: coarse) {
  .spatial-speaking-indicator::before { content: ''; position: absolute; min-width: calc(44px / var(--speaker-scale, 1)); min-height: calc(44px / var(--speaker-scale, 1)); left: 50%; top: 50%; transform: translate(-50%, -50%); }
}
/* The canonical Screen remains real DOM; this layer only gives it the same
   world transform as the active Three camera. Product chrome stays outside. */
.unreal-world-screen-projection {
  position: absolute;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
  transform-origin: 0 0;
}

.unreal-world-screen-surface {
  position: relative;
  overflow: visible;
  pointer-events: none;
  transform-style: preserve-3d;
  contain: layout style;
}

.unreal-world-screen-interaction {
  position: relative;
  overflow: visible;
  pointer-events: none;
  transform-style: preserve-3d;
  contain: layout style;
}

.unreal-world-screen-interaction-surface {
  position: absolute;
  z-index: 8;
  display: block;
  background: transparent;
  pointer-events: auto;
  touch-action: manipulation;
}

.unreal-world-screen-interaction-occlusion {
  position: absolute;
  z-index: 20;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.unreal-world-screen-interaction-occluders polygon {
  fill: transparent;
  pointer-events: all;
}

.unreal-world-screen-mask-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.unreal-world-screen-surface .immersive-screen-player,
.unreal-world-screen-surface .immersive-screen-resize-frame,
.unreal-world-screen-surface .immersive-screen-ambi {
  /* Perspective comes from the authored wall and active camera. The product's
     own transforms remain reserved for its gentle inspect/manipulation motion. */
  transform-origin: center;
}

/* World perspective must never reduce the canonical frame controls to a
   sub-pixel target. The presentation calculates these invisible dimensions
   in local CSS pixels so they resolve to stable screen-space targets. The
   visible walnut remains unchanged. */
.unreal-world-screen-surface .immersive-screen-resize-frame,
.unreal-world-screen-interaction .immersive-screen-resize-frame {
  --immersive-screen-grip: max(
    calc(0.82 * var(--immersive-screen-frame, 9px)),
    calc(
      var(--unreal-screen-edge-target-local, 15px)
      - var(--immersive-screen-frame, 9px)
    )
  );
}

.unreal-world-screen-surface .immersive-screen-resize-corner,
.unreal-world-screen-interaction .immersive-screen-resize-corner {
  width: min(
    42%,
    max(
      calc(3.4 * var(--immersive-screen-frame, 9px)),
      var(--unreal-screen-corner-target-local, 31px)
    )
  );
  height: min(
    42%,
    max(
      calc(3.4 * var(--immersive-screen-frame, 9px)),
      var(--unreal-screen-corner-target-local, 31px)
    )
  );
}

@media (prefers-reduced-motion: reduce) {
  .unreal-world-screen-surface .immersive-screen-player,
  .unreal-world-screen-surface .immersive-screen-resize-frame,
  .unreal-world-screen-surface .immersive-screen-ambi {
    transition-duration: 1ms !important;
  }
}
.unreal-seat-perspective.has-person-target:not(.is-dragging),
.unreal-still-overview--ready.has-person-target:not(.is-dragging) {
  cursor: default;
}

.unreal-still-overview--ready.is-dragging {
  cursor: default;
}
