.shade-finder,
.shade-finder *,
.shade-finder *::before,
.shade-finder *::after {
	box-sizing: border-box;
}

.shade-finder {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 16px;
	font-family: inherit;
	text-align: center;
}

.shade-finder__instructions {
	margin-bottom: 16px;
	font-size: 15px;
	line-height: 1.5;
}

.shade-finder__upload-btn {
	display: inline-block;
	padding: 12px 28px;
	background: #7a4a2b;
	color: #fff;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	transition: background 0.2s ease;
}

.shade-finder__upload-btn:hover {
	background: #5f3a20;
}

.shade-finder__canvas-wrap {
	position: relative;
	display: inline-block;
	max-width: 100%;
}

.shade-finder__canvas-wrap canvas {
	display: block;
	max-width: 100%;
	border-radius: 8px;
	cursor: crosshair;
	touch-action: manipulation;
}

.shade-finder__result-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	align-items: flex-start;
	justify-content: center;
	text-align: left;
}

.shade-finder__photo-wrap {
	flex: 1 1 260px;
	min-width: 0;
	max-width: 320px;
}

.shade-finder__photo {
	max-width: 100%;
	max-height: 420px;
	width: auto;
	height: auto;
	border-radius: 8px;
	display: block;
	margin: 0 auto;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.shade-finder__results {
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: flex-start;
	margin: 16px 0;
	flex: 1 1 280px;
	min-width: 220px;
	max-width: 400px;
}

.shade-finder__sampled {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: #666;
}

.shade-finder__shade-row {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #f8f5f2;
	border-radius: 8px;
	padding: 12px 18px;
	width: 100%;
	max-width: 360px;
	box-sizing: border-box;
	text-align: left;
}

.shade-finder__shade-row--empty {
	background: transparent;
	border: 1px dashed #ddd;
}

.shade-finder__shade-row--empty .shade-finder__swatch {
	background: transparent !important;
	border-style: dashed;
}

.shade-finder__shade-row--empty .shade-finder__shade-name {
	font-size: 14px;
	font-weight: 400;
	font-style: italic;
	color: #999;
}

.shade-finder__swatch {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 2px solid rgba(0, 0, 0, 0.08);
}

.shade-finder__shade-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #999;
}

.shade-finder__shade-name {
	font-size: 17px;
	font-weight: 700;
	color: #2a2a2a;
}

.shade-finder__actions {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-top: 8px;
}

.shade-finder__link-btn {
	background: none;
	border: none;
	color: #7a4a2b;
	text-decoration: underline;
	cursor: pointer;
	font-size: 14px;
	padding: 4px;
}

.shade-finder__error {
	color: #b3261e;
	font-size: 14px;
	margin-top: 12px;
}

.shade-finder__disclaimer {
	font-size: 12px;
	color: #999;
	margin-top: 20px;
	line-height: 1.5;
}

.shade-finder__analyzing {
	margin-top: 14px;
	font-size: 14px;
	color: #7a4a2b;
	font-weight: 600;
}

.shade-finder__analyzing::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	border: 2px solid #e0d5cb;
	border-top-color: #7a4a2b;
	border-radius: 50%;
	vertical-align: middle;
	animation: shade-finder-spin 0.8s linear infinite;
}

@keyframes shade-finder-spin {
	to { transform: rotate(360deg); }
}

.shade-finder__reasoning,
.shade-finder__lighting-note {
	font-size: 13px;
	color: #666;
	max-width: 360px;
	line-height: 1.5;
	margin: 0;
}

.shade-finder__lighting-note {
	color: #a06a2c;
}
