.pe-canvas-grips {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.pe-canvas-grips .pe-grip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 44px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid white;
  border-radius: 6px;
  box-shadow: 0 2px 5px #102d212e;
  background: #214d36;
  color: white;
  font: 650 11px/1 'Instrument Sans', Arial, sans-serif;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.pe-canvas-grips .pe-canvas-section-grip { background: #466154; }
.pe-canvas-grips .pe-grip[hidden], .pe-preview .pe-canvas-grips, .pe-placing .pe-canvas-grips { display: none; }
.pe-canvas-grips .pe-grip:focus-visible, .pe-move-dialog :focus-visible { outline: 2px solid #0959aa; outline-offset: 2px; }
.pe-studio .pe-layer .pe-grip { flex: none; padding: 0; color: #315644; cursor: grab; }
.pe-add-grid button { touch-action: none; }
.pe-dragging .pe-canvas-grips .pe-grip { opacity: 0; pointer-events: none; }
.pe-dragging, .pe-dragging .pe-page [data-item], .pe-dragging .pe-grip { cursor: grabbing; }
.pe-studio:not(.pe-preview) .pe-page [data-item]:not([contenteditable]) {
  cursor:grab; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; touch-action:none;
}
.pe-studio .pe-page [data-item][contenteditable] {cursor:text;user-select:text;-webkit-user-select:text;touch-action:auto}
.pe-direct-dragging .pe-canvas-grips, .pe-direct-dragging .pe-free-controls {visibility:hidden;pointer-events:none}
.pe-direct-dragging, .pe-studio.pe-direct-dragging .pe-page [data-item] {cursor:grabbing}
.pe-direct-dragging .pe-page .pe-direct-source {opacity:.25}
.pe-direct-dragging .pe-page .pe-direct-target {outline:2px dashed #3868c8 !important;outline-offset:-2px}
.pe-direct-ghost {
  position:fixed; z-index:1000; margin:0; box-sizing:border-box; isolation:isolate;
  outline:2px solid #3868c8; box-shadow:0 6px 18px #1a2b4f35;
  pointer-events:none !important; user-select:none; -webkit-user-select:none; cursor:grabbing;
}
.pe-direct-ghost * {pointer-events:none !important}
.pe-drop-marker {
  position: fixed;
  z-index: 5;
  pointer-events: none;
  background: #16804e;
  border-radius: 4px;
  box-shadow: 0 0 0 1px white;
}
.pe-drop-marker::before {
  content: attr(data-caption);
  position: absolute;
  left: 0;
  bottom: calc(100% + 1px);
  padding: 3px 6px;
  border-radius: 4px;
  background: #175b3b;
  color: white;
  white-space: nowrap;
  font: 650 11px/1.3 'Instrument Sans', Arial, sans-serif;
}
.pe-marker-below::before { bottom: auto; top: 2px; }
.pe-drop-marker.pe-marker-placement {
  box-sizing:border-box;
  border:2px dashed #267350;
  background:rgb(55 137 89 / .12);
}
.pe-page .pk-site:has(> .pe-blank-stage) {
  display:flex;
  flex-direction:column;
  min-height:380px;
}
.pe-page .pe-blank-stage {flex:1;min-height:180px}
.pe-move-dialog {
  box-sizing: border-box;
  width: min(360px, calc(100vw - 28px));
  max-height: 90dvh;
  padding: 24px;
  border: 1px solid var(--pe-line);
  border-radius: 14px;
  background: white;
  color: var(--pe-ink);
  font: inherit;
}
.pe-move-dialog::backdrop { background: #16251f99; }
.pe-move-dialog h2 { margin: 0 0 16px; font-size: 22px; }
.pe-move-actions { display: flex; justify-content: end; gap: 8px; margin-top: 20px; }
.pe-move-actions button {
  padding: 8px 14px;
  border: 1px solid var(--pe-line);
  border-radius: 7px;
  background: white;
  color: var(--pe-ink);
  cursor: pointer;
  font: inherit;
}
.pe-move-actions button[type=submit] { background: var(--pe-accent); color: white; }
@media (pointer:coarse) {
  .pe-canvas-grips .pe-grip { min-height: 36px; }
  .pe-studio .pe-layer .pe-grip { height: 38px; width: 38px; }
}
