* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
html,
body {
	height: 100%;
}
body {
	background: #0c0b09;
	scrollbar-color: #7a6840 #0f0d0b;
	scrollbar-width: thin;
}
#app {
	display: flex;
	flex-direction: column;
	height: 100vh;
	min-height: 520px;
	background: #0c0b09;
	color: #b8b0a0;
	font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 20px;
	height: 56px;
	background: #090908;
	border-bottom: 1px solid #1e1c18;
	flex-shrink: 0;
}
.logo {
	display: block;
	height: 28px;
	width: auto;
	max-width: 148px;
	object-fit: contain;
	flex-shrink: 0;
}
.title {
	font-size: 15px;
	letter-spacing: 0.14em;
	color: #c8bea8;
	font-weight: 400;
}
#presetLabel {
	margin-left: auto;
	font-size: 11px;
	color: #3a3830;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.body {
	display: flex;
	flex: 1;
	overflow: hidden;
	min-height: 0;
}

aside {
	width: 200px;
	background: #0a0908;
	border-right: 1px solid #1a1916;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	overflow: hidden;
}
.aside-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-bottom: 1px solid #1a1916;
}
.atab {
	padding: 9px 4px;
	font-size: 11px;
	letter-spacing: 0.14em;
	color: #3a3830;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	font-family: inherit;
	text-transform: uppercase;
	transition: all 0.15s;
}
.atab.active {
	color: #a09070;
	border-bottom-color: #7a6840;
}
.aside-panel {
	flex: 1;
	overflow-y: auto;
	padding: 12px 10px;
}
.aside-panel.hidden {
	display: none;
}

.pgroup {
	margin-bottom: 4px;
}
.pgroup-label {
	font-size: 9px;
	letter-spacing: 0.18em;
	color: #2e2c28;
	text-transform: uppercase;
	padding: 10px 6px 5px;
	display: block;
}
.preset-btn {
	display: flex;
	align-items: center;
	width: 100%;
	text-align: left;
	padding: 8px 8px;
	background: transparent;
	border: none;
	color: #4a4840;
	font-size: 11px;
	letter-spacing: 0.06em;
	cursor: pointer;
	text-transform: uppercase;
	font-family: inherit;
	transition: all 0.12s;
	border-radius: 2px;
	gap: 6px;
}
.preset-btn:hover {
	color: #908070;
	background: #141210;
}
.preset-btn.active {
	color: #c8a860;
	background: #161410;
}
.preset-dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
	opacity: 0.6;
}

.param-section {
	font-size: 9px;
	letter-spacing: 0.18em;
	color: #3a2e18;
	text-transform: uppercase;
	padding: 14px 0 6px;
	border-bottom: 1px solid #1a1814;
	margin-bottom: 8px;
}
.param-section:first-child {
	padding-top: 4px;
}
.slider-row {
	margin-bottom: 8px;
}
.slider-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}
.slider-lbl {
	font-size: 11px;
	letter-spacing: 0.06em;
	color: #6a6050;
	text-transform: uppercase;
}
.slider-val {
	font-size: 11px;
	color: #4a4030;
	min-width: 40px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}
input[type="range"] {
	width: 100%;
	cursor: pointer;
	height: 2px;
	-webkit-appearance: none;
	appearance: none;
	background: linear-gradient(to right, #5a4a28, #2a2420);
	border-radius: 1px;
	outline: none;
}
input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #8a7040;
	cursor: pointer;
	border: none;
}
input[type="range"]::-moz-range-thumb {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #8a7040;
	cursor: pointer;
	border: none;
}

.tone-pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin-bottom: 8px;
}
.tone-cell {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.tone-cell-label {
	font-size: 9px;
	letter-spacing: 0.14em;
	color: #4a4030;
	text-transform: uppercase;
}
.color-wrap {
	display: flex;
	align-items: center;
	gap: 5px;
}
.color-swatch {
	width: 20px;
	height: 20px;
	border: 1px solid #2a2820;
	cursor: pointer;
	flex-shrink: 0;
	position: relative;
	overflow: hidden;
}
.color-swatch input[type="color"] {
	position: absolute;
	inset: -4px;
	width: calc(100% + 8px);
	height: calc(100% + 8px);
	opacity: 0;
	cursor: pointer;
}
.color-hex {
	font-size: 11px;
	color: #4a4030;
	font-variant-numeric: tabular-nums;
}

.canvas-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
}
.toolbar {
	padding: 0 14px;
	height: 52px;
	display: flex;
	gap: 8px;
	align-items: center;
	background: #090908;
	border-bottom: 1px solid #1a1916;
	flex-shrink: 0;
}
.file-btn {
	padding: 7px 12px;
	background: #1a1710;
	border: 1px solid #2e2a1e;
	color: #a09060;
	font-size: 11px;
	letter-spacing: 0.12em;
	cursor: pointer;
	text-transform: uppercase;
	font-family: inherit;
	display: inline-block;
	transition: all 0.15s;
}
.file-btn:hover {
	background: #222018;
	border-color: #4a4030;
	color: #c8a860;
}
.tbtn {
	padding: 7px 10px;
	background: transparent;
	border: 1px solid #1e1c18;
	color: #4a4840;
	font-size: 11px;
	letter-spacing: 0.1em;
	cursor: pointer;
	text-transform: uppercase;
	font-family: inherit;
	transition: all 0.15s;
}
.tbtn:hover {
	color: #908070;
	border-color: #3a3830;
}
.tbtn.export {
	color: #8a7040;
	border-color: #2a2418;
}
.tbtn.export:hover {
	color: #c8a860;
	border-color: #5a4830;
}
.status {
	font-size: 10px;
	color: #3a3428;
	letter-spacing: 0.14em;
	animation: pulse 1.2s infinite;
	margin-left: 4px;
}
@keyframes pulse {
	0%,
	100% {
		opacity: 0.3;
	}
	50% {
		opacity: 0.9;
	}
}

#canvas-wrap {
	flex: 1;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #070706;
	position: relative;
	min-height: 0;
}
#displayCanvas {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: none;
}
#origDisplayCanvas {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: none;
	position: absolute;
}
.drop-zone {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.drop-inner {
	border: 1px solid #1a1816;
	width: min(320px, 80%);
	height: 200px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	cursor: pointer;
	transition: all 0.2s;
}
.drop-inner:hover,
.drop-inner.over {
	border-color: #3a3428;
	background: #0e0d0b;
}
.drop-icon {
	width: 32px;
	height: 32px;
	border: 1px solid #2a2820;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #2a2820;
	font-size: 14px;
}
.drop-text {
	font-size: 11px;
	letter-spacing: 0.12em;
	color: #2a2820;
	text-transform: uppercase;
	text-align: center;
	line-height: 1.8;
}

.bottom-bar {
	display: none;
	border-top: 1px solid #1a1916;
	background: #090908;
	flex-shrink: 0;
}
.bottom-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.btab {
	padding: 9px;
	font-size: 11px;
	letter-spacing: 0.12em;
	color: #3a3830;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	font-family: inherit;
	text-transform: uppercase;
}
.btab.active {
	color: #a09070;
	border-bottom-color: #7a6840;
}
.bottom-panel {
	overflow-y: auto;
	padding: 10px;
	max-height: 210px;
}
.bottom-panel.hidden {
	display: none;
}
.bpresets {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 2px;
}
.bsliders {
	columns: 2;
	column-gap: 12px;
}
.bsliders .slider-row {
	break-inside: avoid;
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
::-webkit-scrollbar-track {
	background: #0f0d0b;
}
::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, #8a7040, #5a4830);
	border: 1px solid #171410;
	border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(180deg, #a88a52, #6a5636);
}

@media (max-width: 660px) {
	aside {
		display: none;
	}
	.bottom-bar {
		display: block;
	}
	.title {
		font-size: 13px;
	}
	#presetLabel {
		font-size: 10px;
		max-width: 120px;
	}
}

@media (max-width: 380px) {
	.bsliders {
		columns: 1;
	}
}
