/* Sticky note container in grid */
.grid-stack-item-content.grid-sticky {
  background: transparent !important;
  box-shadow: none !important;
  border: 0;
  position: relative;
  overflow: visible; /* allow editor & popovers to escape */
}

/* Center both layers */
.grid-sticky .grid-sticky-bg,
.grid-sticky .grid-sticky-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 1/1;
  box-sizing: border-box;
  font-family: "anthem";
}

/* Background sticker image */
.grid-sticky .grid-sticky-bg {
  height: 86%;
  background: center/contain no-repeat;
  pointer-events: none;
}

/* Text layer */
.grid-sticky .grid-sticky-text {
  width: var(--sticky-inner-size);
  height: var(--sticky-inner-size);
  padding: var(--sticky-inner-pad);
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
font-size: 1.5rem;
  overflow: hidden;              /* 👈 clips only the text */
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.4;
  background: transparent;
  box-shadow: none;
}

/* Summernote editor container (holds toolbar & popovers) */
.grid-sticky .note-editor {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;

font-size: 2rem;
  width: var(--sticky-inner-size) !important;
  height: var(--sticky-inner-size) !important;
  padding: var(--sticky-inner-pad) !important;
  box-sizing: border-box !important;
font-family: "inherit";
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;

  overflow: visible !important;   /* let toolbars/popover escape */
  pointer-events: auto;
  z-index: 20;
}

/* Actual editable text box inside the note */
.grid-sticky .note-editable {
  width: 100%;
  height: 100%;
font-family: "inherit";
  overflow: hidden !important;    /* 👈 keeps editing text inside */
  text-align: center;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* kill paragraph gaps */
.grid-sticky .note-editable p {
  margin: 0 !important;
}
