/* layout.css */
#game-shell {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  container-type: size;
  container-name: game-shell;
  background-color: #000;
}

.scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  /* Classes added by JS will handle transitions */
}

.scene.active {
  opacity: 1;
  pointer-events: auto;
}

.scene-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-background);
}

.scene-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Base class for elements that can be moved/resized */
.layout-editable {
  position: absolute;
  z-index: var(--z-scene-content);
  transform-origin: center center;
}

.layout-editable img.editable-asset-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* default */
  object-position: center;
  pointer-events: none;
}

#persistent-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let clicks pass through */
  z-index: var(--z-persistent-ui);
}

#persistent-ui > * {
  pointer-events: auto; /* Re-enable for children */
}
