.rounded-image-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.rounded-image-preview {
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background-color: #fff;
  background-image: linear-gradient(45deg, #edf0f6 25%, transparent 25%),
    linear-gradient(-45deg, #edf0f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf0f6 75%),
    linear-gradient(-45deg, transparent 75%, #edf0f6 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.rounded-image-preview canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 620px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(35, 39, 86, .12);
}

.rounded-image-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rounded-image-number-row {
  display: flex;
  align-items: end;
  gap: 8px;
}

.rounded-image-number-row .field {
  flex: 1;
}

.rounded-image-number-row > span {
  padding-bottom: 10px;
  color: var(--muted);
}

.rounded-image-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rounded-image-presets button {
  min-width: 48px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--card);
  cursor: pointer;
}

.rounded-image-presets button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.rounded-image-presets button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.rounded-image-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.rounded-image-result {
  min-height: 52px;
}

@media (max-width: 820px) {
  .rounded-image-workspace {
    grid-template-columns: 1fr;
  }

  .rounded-image-preview {
    min-height: 260px;
  }
}
