.dynamic-element {
  box-sizing: border-box;
  user-select: none;
}

.element-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.element-content > * {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
}

/* Corner Handles */
.resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #007bff;
  border: 1px solid #fff;
  z-index: 10;
  touch-action: none;
}

/* .handle-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.handle-ne { top: -5px; right: -5px; cursor: nesw-resize; }
.handle-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.handle-se { bottom: -5px; right: -5px; cursor: nwse-resize; } */

/* Explicit containment */
.dynamic-element {
  position: absolute;
  box-sizing: border-box;
}

/* Children must adapt to parent container, not viewport */
.dynamic-element > .element-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
}