/*
 * Styles the 2.5D isometric 2x2 studio grid, clouds, tile images, and scrim filters.
 * Owns studio grid and room appearance; does not style Overview hotspot pins.
 */
.studio-viewport {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
  pointer-events: none;
}

.studio-clouds {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.cloud {
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.45));
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.05);
  animation: drift-cloud 18s ease-in-out infinite alternate;
}

.cloud-1 { width: 170px; height: 56px; top: 16%; left: 16%; }
.cloud-2 { width: 120px; height: 42px; top: 24%; right: 18%; animation-delay: -6s; }
.cloud-3 { width: 140px; height: 48px; bottom: 26%; left: 10%; animation-delay: -11s; }

@keyframes drift-cloud {
  from { transform: translate3d(-16px, 0, 0); }
  to { transform: translate3d(20px, -10px, 0); }
}

.studio-world {
  position: relative;
  width: min(740px, 86vw);
  height: min(410px, 50vh);
  will-change: transform;
  pointer-events: auto;
}

.studio-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 18px;
  padding: 20px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.56);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 35px 80px rgba(17, 24, 39, 0.14),
    0 12px 0 rgba(255, 255, 255, 0.72),
    inset 0 2px 0 rgba(255, 255, 255, 0.9);
  transform: perspective(1400px) rotateX(14deg) rotateZ(-3deg);
}

.studio-room {
  position: relative;
  border-radius: 20px;
  padding: 16px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 10px 0 rgba(17, 24, 39, 0.08),
    0 16px 26px rgba(17, 24, 39, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, opacity 0.35s ease, box-shadow 0.25s ease;
}

.room-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: transform 0.4s ease;
  z-index: 0;
}

.room-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.room-content {
  position: relative;
  pointer-events: none;
  z-index: 2;
}

.studio-room:hover {
  box-shadow:
    0 16px 0 rgba(17, 24, 39, 0.12),
    0 24px 36px rgba(17, 24, 39, 0.14);
}

.studio-room:hover .room-bg-img {
  transform: scale(1.04);
}

.studio-room.is-dimmed {
  opacity: 0.48;
}

.studio-room.is-active {
  border-color: #111827;
  box-shadow:
    0 14px 0 rgba(17, 24, 39, 0.16),
    0 24px 40px rgba(17, 24, 39, 0.18);
}

.studio-room.is-active .room-scrim {
  background: rgba(0, 0, 0, 0.15);
}

.room-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.room-label {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.96rem;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  padding: 3px 9px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
}

.room-badge {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(17, 24, 39, 0.78);
  padding: 2px 7px;
  border-radius: 6px;
}
