	@keyframes spin {
		from { 
			transform: rotate(0deg);
		}
		to { 
			transform: rotate(360deg);
		}
	}
	*, *:before, *:after {
		font-size: 12px;
		font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
		margin: 0;
		padding: 0;
		outline: none;
		box-sizing: border-box;
		user-select: none;
	}
	html, body {
		height: 100vh;
		min-height: 100vh;
	}
	body {
		padding: 10px;
		display: flex;
	}
	body.dragover section {
		background: #ddd;
	}
	aside {
		width: 280px;
		border: 3px solid #000;
		border-right: 0;
		flex: 0 0 280px;
		flex-direction: column;
		display: flex;
		overflow: hidden;
	}
	aside:has(+ section:empty) {
		display: none;
	}
	aside > fieldset:disabled .methods li button,
	aside > fieldset:disabled .method-selector select,
	aside > fieldset:disabled input,
	aside > fieldset:disabled label {
		cursor : default;
	}
	fieldset {
		border: 0;
	}
	section {
		position: relative;
		border: 3px solid #000;
		flex: 1 0 auto;
		transition: background 0.15s;
	}
	section:empty {
		align-items: center;
		justify-content: center;
		display: flex;
	}
	section:empty:before {
		content: 'drop image';
	}
	section:has(img.loading):before {
		content: attr(data-progress) ' %';
		position: absolute;
		top: 10px;
		right: 34px;
		z-index: 2;
	}
	section:has(img.loading):after {
		content: '';
		width: 14px;
		height: 14px;
		position: absolute;
		top: 10px;
		right: 10px;
		z-index: 2;
		border-top: 1px solid #ccc;
		border-right: 1px solid #ccc;
		border-bottom: 1px solid #ccc;
		border-left: 1px solid #000;
		border-radius: 50%;
		transform-origin: 7px 7px;
		animation: spin 300ms linear infinite;
		display: block;	
	}
	section img {
		width: 100%;
		height: 100%;
		padding: 20px;
		background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
		background-size: 16px 16px;
		background-position: 0 0, 0 8px, 8px -8px, -8px 0;
		object-fit: contain;
		transition: opacity 0.15s, filter 0.15s;
	}
	label {
		display: block;
	}
	label:not(:has(+ .range)) {
		margin-bottom: 6px;
	}
	input:not([type="checkbox"]), select {
		width: 100%;
		height: 28px;
		margin-bottom: 18px;
	}
	input:not([type="range"]):not([type="checkbox"]):not([type="color"]) {
		padding: 4px 8px;
		border: 1px solid #000;
	}
	input:last-child,
	select:last-child {
		margin-bottom: 0;
	}
	input[type="number"]::-webkit-inner-spin-button {
		display: none;
	}
	input[type="color"] {
		background: none;
		border: 1px solid #000;
		appearance: none;
	}
	input[type="color"]::-webkit-color-swatch-wrapper {
		padding: 0;
	}
	input[type="color"]::-webkit-color-swatch {
		border: 0;
	}
	input[type="checkbox"] {
		display: none;
	}
	input[type="checkbox"] + label {
		line-height: 0;
		width: 50px;
		height: 28px;
		margin-bottom: 15px;
		padding: 2px;
		border: 1px solid #000;
		display: inline-block;
		cursor: pointer;
	}
	input[type="checkbox"] + label:before {
		content: '';
		width: 21px;
		height: 22px;
		background: #ddd;
		transition-property: margin, background;
		transition-duration: 0.15s;
		display: block;
	}
	input[type="checkbox"]:checked + label:before {
		margin-left: 23px;
		background: #000;
	}
	input[type="file"] {
		display: none;
	}
	input[type="file"] + label {
		width: 100%;
		min-height: 28px;
		margin-bottom: 18px;
		padding-top: 6px;
		padding-left: 12px;
		position: relative;
		border: 1px solid #000;
		cursor: pointer;
	}
	input[type="file"] + label img {
		background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
		background-size: 16px 16px;
		background-position: 0 0, 0 8px, 8px -8px, -8px 0;
		display: none;
	}
	input[type="file"] + label:before {
		content: 'Select file';
	}
	input[type="file"]:valid + label:before,
	input[type="file"][value] + label:before {
		content: '';
	}
	input[type="file"]:valid + label,
	input[type="file"][value] + label {
		padding: 2px;
	}
	input[type="file"]:valid + label img,
	input[type="file"][value] + label img {
		width: 100%;
		display: block;
	}
	input[type="file"] + label[data-progress]:before {
		content: attr(data-progress) ' %';
		position: absolute;
		top: -21px;
		right: 24px;
		z-index: 2;
	}
	input[type="file"] + label[data-progress]:after {
		content: '';
		width: 14px;
		height: 14px;
		position: absolute;
		top: -21px;
		right: 0;
		z-index: 2;
		border-top: 1px solid #ccc;
		border-right: 1px solid #ccc;
		border-bottom: 1px solid #ccc;
		border-left: 1px solid #000;
		border-radius: 50%;
		transform-origin: 7px 7px;
		animation: spin 300ms linear infinite;
		display: block;	
	}
	select {
		text-transform: capitalize;
		padding: 0 8px;
		border: 1px solid #000;
	}
	select:disabled,
	select:disabled option {
		color: #000;
		opacity: 1;
	}
	select::-webkit-scrollbar {
	    width: 6px;
	}
	select::-webkit-scrollbar-corner {
	    background: transparent;
	}
	select::-webkit-scrollbar-thumb {
	    border-radius: 0;
	    background-color: #000;
	}
	select::-webkit-scrollbar-track {
	    background: transparent;
	}
	.color {
		position: relative;
		display: flex;
	}
	.color:has(input[type="checkbox"]:checked) input[type="color"] {
		pointer-events: none;
	}
	.color:has(input[type="checkbox"]:checked):before {
		content: '';
		width: 171px;
		height: 26px;
		position: absolute;
		top: 1px;
		left: 1px;
		z-index: 1;
		background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
		background-size: 16px 16px;
		background-position: 0 0, 0 8px, 8px -8px, -8px 0;
		background-color: #fff;
		display: block;
	}
	.color input[type="color"] {
		flex: 0 0 173px;
		margin-right: 10px;
	}
	.color input[type="checkbox"] + label {
		width: 74px;
		position: relative;
	}
	.color input[type="checkbox"] + label:after {
		content: 'transparent';
		position: absolute;
		top: -13px;
		left: 0;
		z-index: 1;
	}
	.color input[type="checkbox"]:checked + label:before {
		margin-left: 47px;
	}
	.range {
		margin-bottom: 10px;
		display: flex;
	}
	.range input {
		margin-bottom: 0;
	}
	.range[data-length="2"] output {
		flex: 1 0 20px;
	}
	.range[data-length="3"] output {
		flex: 1 0 25px;
	}
	.range output {
		text-align: right;
		margin-left: 0;
		padding-top: 7px;
		display: inline-block;
	}
	.method-selector {
		position: relative;
		z-index: 1;
		border-bottom: 3px solid #000;
		background: #ddd;
		flex: 0 0 41px;
	}
	.method-selector:after,
	.method-selector:before {
		content: '';
		position: absolute;
		background: #000;
		display: block;
	}
	.method-selector:before {
		width: 17px;
		height: 1px;
		top: 20px;
		right: 10px;
		z-index: 1;	
	}
	.method-selector:after {
		width: 1px;
		height: 17px;
		top: 12px;
		right: 18px;
		z-index: 1;	
	}
	.method-selector select {
		width: 100%;
		height: 41px;
		padding: 0 10px;
		position: relative;
		z-index: 3;
		border: 0;
		background: transparent;
		appearance: none;
		cursor: pointer;
	}
	.methods {
		height: calc(100vh - 70px);
		list-style-type: none;
		flex: 1 0 auto;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	.methods::-webkit-scrollbar {
	    width: 6px;
	}
	.methods::-webkit-scrollbar-corner {
	    background: transparent;
	}
	.methods::-webkit-scrollbar-thumb {
	    border-radius: 0;
	    background-color: #000;
	}
	.methods::-webkit-scrollbar-track {
	    background: transparent;
	}
	.methods li {
		min-height: 41px;
		position: relative;
		border-bottom: 3px solid #000;
		overflow: hidden;
	}
	.methods li:before {
		content: attr(data-name);
		height: 41px;
		padding: 14px 10px 0 10px;
		display: block;
		cursor: pointer;
	}
	body:not(.sorting) fieldset:not(:disabled) .methods li:hover .remove,
	body:not(.sorting) fieldset:not(:disabled) .methods li:has(fieldset:not(:disabled)) .remove {
		right: 10px;
	}
	.methods li .remove {
		width: 17px;
		height: 17px;
		border: 0;
		background: none;
		position: absolute;
		top: 12px;
		right: -50px;
		z-index: 2;
		overflow: hidden;
		cursor: pointer;
		transition: right 0.15s;
	}
	.methods li .remove:after,
	.methods li .remove:before {
		content: '';
		position: absolute;
		z-index: 1;
		background: #000;
		display: block;
		transform: rotate(45deg);
	}
	.methods li .remove:before {
		width: 21px;
		height: 1px;
		top: 8px;
		right: -2px;	
	}
	.methods li .remove:after {
		width: 1px;
		height: 21px;
		top: -2px;
		right: 8px;
	}
	.methods li .sort {
		width: 100%;
		height: 41px;
		border: 0;
		background: none;
		position: absolute;
		top: 0;
		right: 0;
		left: 0;
		z-index: 1;
		user-select: none;
		cursor: pointer;
	}
	.methods li fieldset {
		max-height: 500px;
		padding: 0 10px 12px 10px;
		border: 0;
		overflow: hidden;
		transition-property: max-height, padding;
		transition-duration: 0.15s;
	}
	.methods li fieldset:not(.upload):disabled {
		max-height: 0;
		padding-bottom: 0;
	}
	.methods li fieldset:before {
		content: '';
		height: 13px;
		position: relative;
		top: 1px;
		border-top: 1px solid #000;
		display: block;
	}
	.methods li label {
		text-transform: capitalize;
	}