.grid-container {
	display: grid;
	width: 100%;
	height: 100%;
	padding: 20px;
	position: relative;
	box-sizing: border-box;
	grid-auto-flow: dense;
}
.grid-container {
	overflow-y: auto;
	> *,
	> astro-slot > * {
		align-self: start;
		grid-column-end: span var(--span, 1);
	}
}

.editMode .grid-item {
	transition:
		box-shadow 0.3s,
		width 0.18s,
		height 0.18s;
}
.editMode .grid-item::after {
	content: "元素：" attr(data-id) "\A" attr(data-width) " x " attr(data-height);
	position: absolute;
	bottom: 5px;
	right: 5px;
	color: rgba(0, 0, 0, 0.6);
	white-space: pre-wrap;
	text-align: end;
	font-size: 10px;
}
/* 中心参考线 */
.editMode::before,
.editMode::after {
	content: "";
	width: 100%;
	height: 1px;
	position: absolute;
	top: calc(50% - 0.5px);
	background: rgba(0, 0, 0, 0.1);
	z-index: 0;
}
.editMode::after {
	width: 1px;
	height: 100%;
	top: 0;
	left: calc(50% - 0.5px);
}

.editMode .resize-handle {
	display: block;
}

.grid-item {
	position: absolute;
	background: #dddddd;
	z-index: 1;
	overflow: hidden;
}

.grid-item:hover {
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.grid-item.dragging {
	opacity: 0.7;
	z-index: 1000;
	/* box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); */
}

.grid-item.resizing {
	z-index: 999;
	/* box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); */
}

/* 调整大小的柄（右下角） */
.resize-handle {
	display: none;
	position: absolute;
	width: 16px;
	height: 16px;
	bottom: 0;
	right: 0;
	z-index: 2;
	cursor: se-resize;
}
