.canvas-scroll {
  display: grid;
  justify-content: center;
  min-height: calc(100vh - 168px);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--nimo-line);
  border-radius: 22px;
  background: #f5f1ed;
}

.resume-canvas {
  position: relative;
  width: 816px;
  height: 1056px;
  overflow: hidden;
  background: white;
  color: #171321;
  box-shadow: 0 24px 70px rgba(23, 19, 33, 0.18);
  transform-origin: top center;
}

.canvas-element {
  position: absolute;
  min-width: 24px;
  min-height: 16px;
  outline: 1px solid transparent;
  white-space: pre-wrap;
  overflow: hidden;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.canvas-element.text {
  padding: 2px;
  cursor: text;
}

.canvas-text-content {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  white-space: pre-wrap;
}

.canvas-text-content[contenteditable="false"] {
  user-select: none;
}

.canvas-element.rect {
  cursor: move;
}

.canvas-element.line {
  min-height: 0;
  background: transparent;
  cursor: move;
}

.canvas-element.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.canvas-element.is-selected {
  outline: 2px solid var(--nimo-orange);
  box-shadow: 0 0 0 5px rgba(255, 122, 26, 0.12);
}

.resize-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--nimo-orange);
  box-shadow: 0 4px 10px rgba(23, 19, 33, 0.2);
  cursor: nwse-resize;
}

.move-handle {
  position: absolute;
  left: -9px;
  top: -9px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--nimo-purple);
  box-shadow: 0 4px 10px rgba(23, 19, 33, 0.2);
  cursor: move;
}

.canvas-element.is-editing {
  outline: 2px solid var(--nimo-purple);
}

.canvas-hint {
  margin: 10px 0 0;
  color: var(--nimo-muted);
  font-size: 0.92rem;
  text-align: center;
}

@media (max-width: 980px) {
  .canvas-scroll {
    justify-content: start;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0;
  }

  html,
  body {
    width: 816px;
    height: 1056px;
    margin: 0;
    overflow: hidden;
    background: white;
  }

  .site-header,
  .tool-strip,
  .side-dock,
  .toast,
  .canvas-hint,
  .move-handle,
  .resize-handle {
    display: none !important;
  }

  .editor-shell,
  .canvas-workspace,
  .canvas-scroll {
    display: block;
    width: 816px;
    height: 1056px;
    min-height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: white;
    overflow: hidden;
  }

  .resume-canvas {
    width: 816px !important;
    height: 1056px !important;
    box-shadow: none;
    transform: none !important;
  }

  .canvas-element.is-selected,
  .canvas-element.is-editing {
    outline: none !important;
    box-shadow: none !important;
  }

  .canvas-element {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .canvas-element.line {
    min-height: 0 !important;
    background: transparent !important;
  }
}
