.pg-canvas-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  background: #111518;
  color-scheme: dark;
  container-type: inline-size;
}
.pg-canvas-stage > canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  touch-action: none;
  outline-offset: -3px;
}
.pg-canvas-stage > canvas:focus-visible { outline: 2px solid #b9d8ed; }
.pg-canvas-stage .pg-select-frame {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border: 1px solid #d7ebff;
  box-shadow: 0 0 0 1px #284768b0;
}
.pg-select-frame[hidden] { display:none; }
.pg-select-handle {
  position: absolute;
  width: 22px;
  height: 22px;
  margin: -11px;
  background: none;
  border: 0;
  color: #f1f7ff;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
}
.pg-select-handle::after {
  content: "";
  display: block;
  margin: auto;
  width: 7px;
  height: 7px;
  border-radius: 1.5px;
  background: currentColor;
  box-shadow: 0 0 0 1px #355576;
}
.pg-select-handle:hover::after, .pg-select-handle:focus-visible::after { box-shadow: 0 0 0 2px #86b9f2; }
.pg-select-handle[data-dir*=n] { top:0; }
.pg-select-handle[data-dir*=s] { top:100%; }
.pg-select-handle[data-dir*=w] { left:0; }
.pg-select-handle[data-dir*=e] { left:100%; }
.pg-select-handle[data-dir=nw], .pg-select-handle[data-dir=se] { cursor:nwse-resize; }
.pg-select-handle[data-dir=ne], .pg-select-handle[data-dir=sw] { cursor:nesw-resize; }
.pg-canvas-stage[data-dragging] > canvas { cursor:grabbing; touch-action:none; }
