.editor-sticker-layer {
  position: absolute;
  inset: 0;
  z-index: 24;
  overflow: hidden;
  pointer-events: none;
}

.editor-sticker-item {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform-origin: center center;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

body[data-view="editor"] .editor-sticker-item {
  pointer-events: auto;
  cursor: grab;
}

body[data-view="editor"] .editor-sticker-item:active {
  cursor: grabbing;
}

.editor-sticker-item.is-selected::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1.5px solid #b45f3e;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.8);
  pointer-events: none;
}

.editor-sticker-image,
.editor-sticker-text {
  display: block;
  min-width: 0;
}

.editor-sticker-image {
  width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.editor-sticker-item--text,
.editor-sticker-text {
  width: max-content;
  max-width: none;
}

.editor-sticker-text {
  box-sizing: border-box;
  min-width: 1ch;
  min-height: 1em;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  pointer-events: none;
}

.editor-sticker-handle {
  position: absolute;
  z-index: 2;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b45f3e;
  box-shadow: 0 2px 7px rgba(35,25,18,.3);
  pointer-events: auto;
}

.editor-sticker-handle--rotate {
  left: 50%;
  top: -30px;
  transform: translateX(-50%);
  cursor: grab;
}

.editor-sticker-handle--rotate::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  width: 1px;
  height: 17px;
  background: #b45f3e;
}

.editor-sticker-handle--scale {
  right: -10px;
  bottom: -10px;
  cursor: nwse-resize;
}

body.is-exporting .editor-sticker-item.is-selected::after,
body.is-export-preview .editor-sticker-item.is-selected::after,
body.editor-export-renderer .editor-sticker-item.is-selected::after,
body.is-exporting .editor-sticker-handle,
body.is-export-preview .editor-sticker-handle,
body.editor-export-renderer .editor-sticker-handle {
  display: none !important;
}

.editor-sticker-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
  width: 100%;
  margin-top: .75rem;
}

.editor-sticker-library > .editor-empty-state {
  grid-column: 1 / -1;
}

.editor-sticker-asset {
  position: relative;
  display: grid;
  gap: .3rem;
  width: 100%;
  min-width: 0;
  padding: .3rem;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid var(--editor-rule-soft);
  border-radius: .65rem;
  background: rgba(255,255,255,.7);
}

.editor-sticker-asset__preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: .45rem;
  background: rgba(76,58,42,.06);
}

.editor-sticker-asset__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.editor-sticker-asset__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .2rem;
  min-width: 0;
}

.editor-sticker-asset__actions button {
  min-width: 0;
  padding: .28rem .15rem;
  overflow: hidden;
  font-size: .68rem;
  line-height: 1.1;
  text-overflow: clip;
  white-space: nowrap;
}

.editor-sticker-editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.editor-sticker-format-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.editor-sticker-format-row label {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--editor-ink-soft);
  font-size: .82rem;
}

@media (max-width: 1180px) {
  .editor-sticker-library {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Page sticker list alignment */
#pageStickerList .editor-region-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-items: stretch;
  gap: 0.12rem;
  width: 100%;
  min-width: 0;
  padding: 0.5rem 0.58rem 0.5rem 1.15rem;
  overflow: hidden;
  text-align: left;
}

#pageStickerList .editor-region-item::before {
  left: 0.45rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 0.18rem;
  height: auto;
  transform: none;
}

#pageStickerList .editor-region-item.is-active::before {
  transform: none;
}

#pageStickerList .editor-region-item__title,
#pageStickerList .editor-region-item__meta {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#pageStickerList .editor-region-item__title {
  line-height: 1.25;
}

#pageStickerList .editor-region-item__meta {
  line-height: 1.35;
}