.edit-preview-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--radius-md);
  overflow: visible;
  background: var(--ink-50);
  line-height: 0;
}
.edit-preview-wrap canvas#previewCanvas { display: block; max-width: 100%; height: auto; border-radius: var(--radius-md); }

#addTextBtn.is-active { background: var(--brand-50); border-color: var(--brand-500); color: var(--brand-700); }

.edit-annot {
  position: absolute;
  min-width: 24px;
}
.annot-toolbar {
  position: absolute;
  top: -32px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  padding: 3px 5px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  z-index: 3;
}
.annot-grip { cursor: move; font-size: 13px; color: var(--ink-400); padding: 0 3px; touch-action: none; }
.annot-size { width: 44px; padding: 2px 4px; font-size: 11px; border: 1px solid var(--ink-200); border-radius: 4px; }
.annot-color { width: 22px; height: 22px; padding: 0; border: 1px solid var(--ink-200); border-radius: 4px; background: none; cursor: pointer; }
.annot-del {
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--ink-200); background: white;
  color: var(--ink-500); font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.annot-del:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }

.annot-text {
  min-width: 30px;
  min-height: 1.2em;
  outline: none;
  white-space: pre;
  cursor: text;
  padding: 2px 4px;
  border: 1px dashed var(--brand-300);
  background: rgba(255, 255, 255, 0.55);
  line-height: 1.15;
}
.annot-text:focus { border-color: var(--brand-500); background: rgba(255, 255, 255, 0.85); }
