.atelier-hero.has-room-viewer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #19231e;
  cursor: grab;
  touch-action: pan-y;
}

.atelier-hero.has-room-viewer.is-dragging {
  cursor: grabbing;
}

.atelier-hero.has-room-viewer > .room-scene {
  position: absolute;
  z-index: -2;
  inset: 0;
  max-width: none;
  overflow: hidden;
}

.room-scene img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  object-fit: fill;
  transform: translate3d(calc(-50% + var(--room-x, 0px)), -50%, 0) scale(var(--room-scale, 1.08));
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
}

.atelier-hero.has-room-viewer::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #19231ee8 0%, #19231e9d 49%, #19231e1a 100%);
  pointer-events: none;
  content: "";
}

.atelier-hero.has-room-viewer > .room-copy {
  position: relative;
  z-index: 1;
  max-width: 275px;
  pointer-events: none;
}

.room-controls {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 13px;
  display: flex;
  max-width: none;
  gap: 5px;
  padding: 4px;
  border: 1px solid #ead09a70;
  border-radius: 5px;
  background: #182018d9;
  box-shadow: 0 8px 24px #00000038;
}

.room-controls button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #f2dbad35;
  border-radius: 3px;
  background: #f2dfbd12;
  color: #f5e8cf;
  font: 700 15px/1 "DM Sans", sans-serif;
  cursor: pointer;
  transition: background-color 160ms ease-out, transform 140ms ease-out;
}

.room-controls button:active {
  transform: scale(.97);
}

.room-controls button:focus-visible,
.atelier-hero.has-room-viewer:focus-visible {
  outline: 3px solid #f0d39a;
  outline-offset: 3px;
}

.room-hint {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 12px;
  max-width: none;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #ead09a45;
  border-radius: 3px;
  background: #172017d6;
  color: #f0e4cf;
  font: 600 8px/1.4 "DM Sans", sans-serif;
  letter-spacing: .35px;
  pointer-events: none;
}

.room-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .room-controls button:hover {
    background: #f2dfbd28;
  }
}

@media (pointer: coarse) {
  .room-controls button {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .room-controls {
    top: 10px;
    right: 10px;
  }

  .room-hint {
    right: 10px;
    bottom: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-scene img,
  .room-controls button {
    transition: none;
  }
}
