.remove-workspace {
  min-height: 400px;
}

.remove-workspace .tool-workspace__preview,
.remove-workspace .tool-workspace__upload {
  min-height: 400px;
}

.remove-workspace__preview {
  min-width: 0;
  background: var(--surface-card);
}

.remove-workspace.is-loaded .tool-workspace__preview,
.remove-workspace.is-loaded .tool-workspace__upload,
.remove-workspace.is-loaded .remove-app,
.remove-workspace.is-loaded .remove-processing,
.remove-workspace.is-loaded .remove-control-panel {
  min-height: 520px;
}

.remove-compare {
  --comparison-aspect-ratio: 4 / 3;
}

.remove-compare__media img,
.remove-compare__media canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.remove-workspace[data-state="demo"] .remove-compare__media img {
  object-fit: cover;
}

.remove-compare__media--after {
  background:
    conic-gradient(transparent 0 25%, rgb(127 127 127 / 12%) 0 50%, transparent 0 75%, rgb(127 127 127 / 12%) 0) 0 / 20px 20px,
    var(--surface-card);
}

.remove-compare.is-processing .vectorizer-compare__layer--after {
  opacity: 1;
}

.remove-preview-state {
  max-width: 240px;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: var(--surface-card);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-5);
  text-align: center;
}

.remove-compare.is-error .remove-preview-state {
  color: #b42318;
  background: #fff1f1;
}

:root[data-theme="dark"] .remove-compare.is-error .remove-preview-state {
  color: #ffb4b4;
  background: #3c1513;
}

.remove-workspace__controls {
  background: var(--surface-card);
}

:root[data-theme="dark"] .remove-workspace__controls {
  background: var(--surface-card);
}

.remove-app,
.remove-app .drop {
  min-height: 396px;
}

.remove-app .drop .big {
  width: 100px;
  height: 100px;
  border: 0;
  background: transparent;
}

.remove-app .drop .big img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.8;
}

.remove-app .drop p {
  max-width: 320px;
}

.remove-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  color: var(--text-secondary);
  text-align: center;
}

.remove-processing[hidden],
.remove-control-panel[hidden],
.remove-app .drop[hidden] {
  display: none !important;
}

.remove-processing strong,
.remove-processing span {
  max-width: 320px;
}

.remove-processing__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-default);
  border-top-color: var(--brand-pixpix-primary);
  border-radius: var(--radius-full);
  animation: remove-spin 0.8s linear infinite;
}

@keyframes remove-spin {
  to { transform: rotate(1turn); }
}

.remove-processing__progress {
  width: min(280px, 100%);
  height: 7px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--component-translucent-subtle);
}

.remove-processing__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-pixpix-primary), var(--brand-default-primary));
  transition: width 180ms ease;
}

.remove-control-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xl);
}

.remove-control-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.remove-control-panel__head h3,
.remove-control-panel__head p {
  margin: 0;
}

.remove-control-panel__head h3 {
  color: var(--text-primary);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-8);
}

.remove-control-panel__head p {
  margin-top: var(--space-3xs);
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-5);
}

.remove-replace-button,
.remove-control-actions .btn,
.remove-item__save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: var(--font-weight-medium);
}

.remove-replace-button {
  min-height: 36px;
  flex: 0 0 auto;
  padding-inline: var(--space-md);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  background: var(--surface-card);
  font-size: var(--font-size-xs);
}

.remove-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}

.remove-summary > div {
  display: flex;
  min-width: 0;
  min-height: 70px;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  background: var(--surface-muted);
}

.remove-summary span,
.remove-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-summary span {
  color: var(--text-tertiary);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-4);
}

.remove-summary strong {
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-5);
}

.remove-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.remove-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-sm);
}

.remove-field > label {
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-5);
}

.remove-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2xs);
}

.remove-segment--background {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.remove-segment button {
  min-height: 40px;
  padding-inline: var(--space-sm);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--surface-card);
  font-size: var(--font-size-xs);
}

.remove-segment button:hover,
.remove-segment button.on {
  color: var(--brand-default-on-primary);
  border-color: var(--brand-default-primary);
  background: var(--brand-default-primary);
}

.remove-color-row[hidden] {
  display: none !important;
}

.remove-color-row input {
  min-height: 40px;
  padding-inline: var(--space-md);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  background: var(--surface-card);
  font-size: var(--font-size-sm);
}

.remove-queue {
  display: flex;
  max-height: 116px;
  flex-direction: column;
  gap: var(--space-2xs);
  overflow: auto;
}

.remove-item {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2xs);
  align-items: center;
  padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--border-default-muted);
  border-radius: var(--radius-xl);
  background: var(--surface-muted);
}

.remove-item.is-active {
  border-color: var(--border-default-accent);
  background: var(--feedback-info-surface-subtle);
}

.remove-item__select {
  display: grid;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--space-sm);
  align-items: center;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.remove-item img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.remove-item__copy {
  min-width: 0;
}

.remove-item__copy strong,
.remove-item__copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-item__copy strong {
  color: var(--text-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.remove-item__copy span {
  margin-top: 2px;
  color: var(--text-tertiary);
  font-size: 11px;
}

.remove-item__save {
  min-height: 30px;
  padding-inline: var(--space-sm);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  background: var(--surface-card);
  font-size: 11px;
}

.remove-privacy-note,
.remove-error-note {
  padding: var(--space-sm) var(--space-md);
  margin: 0;
  border-radius: var(--radius-2xl);
  color: var(--text-secondary);
  background: var(--feedback-info-surface-subtle);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-4);
}

.remove-error-note {
  color: #b42318;
  background: #fff1f1;
}

:root[data-theme="dark"] .remove-error-note {
  color: #ffb4b4;
  background: #3c1513;
}

.remove-control-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
  margin-top: auto;
}

.remove-control-actions .btn {
  min-height: 48px;
  padding-inline: var(--space-lg);
  border: 1px solid var(--brand-default-primary);
  color: var(--brand-default-on-primary);
  background: var(--brand-default-primary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-5);
}

.remove-control-actions .btn.sec {
  color: var(--text-primary);
  border-color: var(--border-default);
  background: var(--surface-card);
}

.remove-control-actions .btn:disabled,
.remove-item__save:disabled,
.remove-replace-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.remove-replace-button:focus-visible,
.remove-segment button:focus-visible,
.remove-color-row input:focus-visible,
.remove-item__select:focus-visible,
.remove-control-actions .btn:focus-visible,
.remove-item__save:focus-visible {
  outline: 3px solid var(--border-default-accent);
  outline-offset: 2px;
}

.tool-effect {
  background: var(--surface-container);
}

.tool-effect__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
}

.tool-effect-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-lg);
}

.tool-effect-card__media {
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: var(--radius-4xl);
}

.tool-effect-card__media .tool-media-asset {
  object-fit: cover;
}

.tool-effect-card__media--checker {
  background:
    conic-gradient(#f7f8fa 0 25%, #e7eaee 0 50%, #f7f8fa 0 75%, #e7eaee 0) 0 / 32px 32px;
}

:root[data-theme="dark"] .tool-effect-card__media--checker {
  background:
    conic-gradient(#222326 0 25%, #303237 0 50%, #222326 0 75%, #303237 0) 0 / 32px 32px;
}

.tool-effect-card__copy h3,
.tool-effect-card__copy p { margin: 0; }

.tool-effect-card__copy h3 {
  color: var(--text-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-7);
}

.tool-effect-card__copy p {
  margin-top: var(--space-2xs);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-5);
}

@media (max-width: 1023px) {
  .remove-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .remove-workspace.is-loaded .tool-workspace__preview {
    height: 360px;
    min-height: 360px;
  }

  .remove-workspace.is-loaded .tool-workspace__upload,
  .remove-workspace.is-loaded .remove-app,
  .remove-workspace.is-loaded .remove-processing,
  .remove-workspace.is-loaded .remove-control-panel {
    height: auto;
    min-height: 0;
  }

  .remove-control-panel { padding: var(--space-lg); }
  .remove-control-panel__head { flex-direction: column; }
  .remove-summary { grid-template-columns: 1fr 1fr; }
  .tool-effect__grid { grid-template-columns: 1fr; }
  .tool-effect-card__media { height: 240px; }
}

@media (max-width: 479px) {
  .remove-segment--background,
  .remove-summary,
  .remove-control-actions { grid-template-columns: 1fr; }
  .remove-control-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .remove-processing__spinner { animation-duration: 0.01ms; }
  .remove-processing__bar { transition: none; }
}
