#canvas-wrapper {
      flex: 1;
      position: relative;
      overflow: auto;
      padding: 20px;
      background: var(--bg);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
    }

    #canvas {
      background: white;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
      transition: all 0.3s ease;
      width: 100%;
      max-width: 1440px;
      min-height: 80vh;
      transform-origin: top center;
    }


    .canvas-block {
        width: 100%;
    }

    .canvas-block:has(.header) + .canvas-block:has(.header) {
      display: none;
    }

    #dropzone {
      min-height: 80vh;
      padding: 60px 0;
      border: 2px dashed var(--border);
      border-radius: var(--radius);
      transition: all 0.3s;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      background: linear-gradient(135deg, rgba(91,33,182,0.02), transparent);
    }

    #dropzone.drag-over {
      border-color: var(--primary);
      background: rgba(91,33,182,0.05);
    }

    .drag-hint {
      font-size: 1.5rem;
      color: var(--text-muted);
      opacity: 0;
      transition: opacity 0.4s;
      pointer-events: none;
      animation: pulse 2s infinite;
    }

    #dropzone.drag-over .drag-hint {
      opacity: 1;
    }

    @keyframes pulse {
      0%, 100% { opacity: 0.6; }
      50% { opacity: 1; }
    }

    .initial-placeholder h2 {
      font-size: 2.5rem;
      margin-bottom: 20px;
      color: var(--text);
    }

    .initial-placeholder p {
      font-size: 1.2rem;
      margin-bottom: 40px;
      color: var(--text-muted);
      max-width: 600px;
    }

    .add-section-inline {
      padding: 16px 40px;
      background: var(--primary);
      color: white;
      border: none;
      border-radius: 12px;
      font-size: 1.2rem;
      cursor: pointer;
      transition: var(--transition);
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 10px;
      box-shadow: 0 4px 12px rgba(91,33,182,0.2);
    }

    .add-section-inline:hover {
      background: var(--primary-dark);
      transform: translateY(-4px);
      box-shadow: 0 12px 30px rgba(91,33,182,0.3);
    }

    .canvas-controls {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 10px 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      box-shadow: var(--shadow);
      z-index: 50;
      border-radius: 16px;
      margin-bottom: 12px;
    }

    .zoom-value {
      min-width: 60px;
      text-align: center;
      font-weight: 600;
      color: var(--text-secondary);
    }

    .resolution-indicator {
      background: var(--surface-hover);
      padding: 8px 14px;
      border-radius: var(--radius);
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    .grid-overlay {
      position: absolute;
      inset: 0;
      background-image: 
        linear-gradient(to right, var(--border) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border) 1px, transparent 1px);
      background-size: 40px 40px;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.3s;
    }

    .grid-overlay.active { opacity: 0.15; }

    .show-borders .section-block,
    .show-borders .block-item {
      border: 1px dashed #9ca3af !important;
      box-sizing: border-box;
    }

    .read-only #dropzone {
      pointer-events: none;
      opacity: 0.75;
    }

    .section-block {
      margin: 40px 0;
      padding: 60px;
      background: rgba(91,33,182,0.05);
      border-radius: 16px;
      min-height: 300px;
      text-align: center;
      color: var(--text-muted);
      border: 1px dashed var(--border);
      transition: var(--transition);
      font-size: 1.3rem;
    }

    .section-block:hover {
      border-color: var(--primary);
      background: rgba(91,33,182,0.08);
    }

[data-scope="header"].canvas-block:not(:first-child) {
    display: none;
}


.block-label {
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  opacity: 0.9;
  transition: all 0.25s ease;
  pointer-events: none; /* do not steal clicks from block */
}


/* Block label text */
.label-text {
  pointer-events: none;
}


/* Delete button */
.delete-block-btn {
  z-index: 2000;
  pointer-events: auto; /* only the button is clickable */
  background: #ff3366;
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px rgba(255,51,102,0.5);
}

.delete-block-btn:hover {
  background: #ff1a52;
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(255,51,102,0.7);
}

.delete-block-btn:active {
  transform: scale(0.92);
}

/* Trash icon */
.delete-block-btn i {
  font-size: 1.1rem;
}



/* Slightly larger delete on small screens */
@media (max-width: 768px) {
  .delete-block-btn {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }
}


[data-scope="header"].canvas-block:not(:first-child) {
  display: none;
}

