.layout-editor {
  position: absolute;
  z-index: 17001;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  border: 1px solid #c2ab8b;
  border-radius: 9px;
  background: #fffcf6;
  color: #494138;
  cursor: default;
  box-shadow: 0 3px 14px #51412b24;
}
.layout-editor-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.layout-editor-actions button {
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
}
.layout-editor-actions button[aria-pressed="true"] { background: #765432; color: #fffaf0; }
#layout-done { border: 1px solid #c2ab8b; }
.layout-editor p { margin: 5px 2px 0; font-size: 11px; }
#layout-save-status { color: #8b381b; }
.layout-guides { position: absolute; inset: 0; z-index: 17000; pointer-events: none; }
.layout-gap-handle {
  position: absolute;
  display: grid;
  place-items: center;
  width: 19px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 1px solid #765432;
  border-radius: 5px;
  background: #fff8e8;
  color: #664423;
  font: bold 13px system-ui;
  cursor: ew-resize;
  pointer-events: auto;
}
.layout-order-marker {
  position: absolute;
  display: block;
  transform: translateX(-50%);
  border: 2px dashed #975213;
  border-radius: 7px;
  background: #edb46133;
}
.layout-snap-guide {
  position: absolute;
  inset-block: 0;
  border-left: 2px dashed #975213;
  transform: translateX(-50%);
}
#connections .family-connection .layout-child-link-handle {
  stroke: transparent;
  stroke-width: 14px;
}
.layout-editing[data-layout-tool="move"] #connections .layout-child-link-handle {
  pointer-events: stroke;
  cursor: ew-resize;
}
.layout-editing[data-layout-tool="move"] :is(.person-card, .room-cuboid),
.layout-editing[data-layout-tool="order"] :is(.person-card, .room-cuboid) { cursor: grab; }
.layout-dragging, .layout-dragging :is(.person-card, .room-cuboid) { cursor: grabbing !important; }
.layout-dragging[data-layout-tool="gap"] { cursor: ew-resize !important; }
