/* Die-cut sticker preview. Sits on the shared sizer form. */
.xcs-stk-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.22fr) minmax(260px, 1fr);
	gap: 16px;
	align-items: start;
}
.xcs-stk-preview {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	min-width: 0;
}
.xcs-stk-stage {
	position: relative;
	min-height: 320px;
	border-radius: 16px;
	border: 1px solid var(--xcs-line);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.xcs-stk-stage.is-light { background: #f4f1ea; }
.xcs-stk-stage.is-dark { background: #1c1e24; }
.xcs-stk-stage canvas {
	width: 100%;
	height: auto;
	display: block;
}
/* Under the canvas, in normal flow. Theme button rules must not pull this onto the file chip. */
.xcs-stk-theme {
	position: static;
	align-self: flex-end;
	min-height: 44px;
	padding: 0 14px;
	border-radius: 999px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	background: #fff;
	color: #16181d;
}
body .xcs button.xcs-stk-theme,
body .xcs button.xcs-stk-theme:hover,
body .xcs button.xcs-stk-theme:focus,
body .xcs button.xcs-stk-theme:active {
	position: static !important;
	float: none !important;
	inset: auto !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	align-self: flex-end;
	width: auto !important;
	max-width: 100%;
	height: auto !important;
	min-height: 44px;
	margin: 0 !important;
	padding: 0 14px !important;
	border-radius: 999px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	background: #fff !important;
	color: #16181d !important;
	z-index: auto !important;
	transform: none !important;
	box-shadow: none;
}
.xcs-stk-preview.is-dark .xcs-stk-theme,
.xcs-stk-preview:has(.xcs-stk-stage.is-dark) .xcs-stk-theme,
body .xcs .xcs-stk-preview.is-dark button.xcs-stk-theme,
body .xcs .xcs-stk-preview.is-dark button.xcs-stk-theme:hover,
body .xcs .xcs-stk-preview.is-dark button.xcs-stk-theme:focus,
body .xcs .xcs-stk-preview.is-dark button.xcs-stk-theme:active,
body .xcs .xcs-stk-preview:has(.xcs-stk-stage.is-dark) button.xcs-stk-theme,
body .xcs .xcs-stk-preview:has(.xcs-stk-stage.is-dark) button.xcs-stk-theme:hover,
body .xcs .xcs-stk-preview:has(.xcs-stk-stage.is-dark) button.xcs-stk-theme:focus,
body .xcs .xcs-stk-preview:has(.xcs-stk-stage.is-dark) button.xcs-stk-theme:active {
	background: #1c1e24 !important;
	color: #f4f1ea !important;
	border-color: rgba(255, 255, 255, 0.16);
}
.xcs-stk-empty {
	position: absolute;
	inset: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--xcs-muted);
	pointer-events: none;
}
.xcs-stk-stage.has-art .xcs-stk-empty { display: none; }
.xcs-stk-file {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.xcs-stk-file input[type="file"] {
	min-height: 44px;
	width: 100%;
}
.xcs-stk-name { color: var(--xcs-muted); min-height: 1.2em; }
.xcs-stk-row { margin-top: 14px; }
.xcs-stk-row label { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.xcs-stk-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
}
.xcs-stk-toggle input {
	width: 44px;
	height: 24px;
	margin: 0;
	flex: 0 0 auto;
}
.xcs-stk-row input[type="range"] { width: 100%; min-height: 44px; }
.xcs-stk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.xcs-stk-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.xcs-stk-colors button {
	width: 44px;
	height: 44px;
	min-width: 44px;
	padding: 0;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--xcs-line);
}
.xcs-stk-colors button.is-on { box-shadow: 0 0 0 2px var(--xcs-accent); }
.xcs-stk-custom {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	font-weight: 600;
}
.xcs-stk-custom input[type="color"] {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.xcs-stk-match-label { margin: 10px 0 0; font-weight: 600; }
.xcs-stk-chips button {
	min-height: 44px;
	min-width: 44px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid var(--xcs-line);
	background: #fff;
}
.xcs-stk-chips button.is-on {
	background: var(--xcs-accent-bg);
	border-color: var(--xcs-accent);
	color: var(--xcs-accent-dk);
}
#xcs-stk-fit-row[hidden] { display: none !important; }
.xcs-stk-move-hint { margin: 6px 0 0; color: var(--xcs-muted); font-size: 13px; }
.xcs-stk-nudge { display: none; }
.xcs-stk-art-reset {
	margin-top: 8px;
	min-height: 44px;
	padding: 0 14px;
	border-radius: 999px;
	border: 1px solid var(--xcs-line);
	background: #fff;
	font-weight: 600;
}
.xcs-stk-stage.is-move canvas { cursor: grab; touch-action: none; }
.xcs-stk-stage.is-move.is-dragging canvas { cursor: grabbing; }
.xcs-stk-form-price {
	margin: 12px 0 0;
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
}
.xcs-stk-tier {
	margin: 6px 0 0;
	color: var(--xcs-muted);
	font-size: 14px;
}
.xcs-stk-dpi {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--xcs-bg);
}
.xcs-stk-dpi.is-ok { background: var(--xcs-ok-bg); color: var(--xcs-ok); }
.xcs-stk-dpi.is-warn { background: var(--xcs-warn-bg); color: var(--xcs-warn); }
.xcs-stk-dpi.is-bad { background: var(--xcs-err-bg); color: var(--xcs-err); }
.xcs-stk-legend {
	display: flex;
	gap: 14px;
	margin-top: 10px;
	color: var(--xcs-muted);
	font-size: 13px;
}
.xcs-stk-swatch {
	display: inline-block;
	width: 22px;
	height: 10px;
	margin-right: 6px;
	vertical-align: middle;
	border-radius: 2px;
}
.xcs-stk-swatch.border { background: #fff; border: 1px solid #d0d0d0; }
.xcs-stk-swatch.cut { border-top: 2px dashed #d1006f; height: 0; }
@media (min-width: 801px) {
	/* Preview about 55%, options about 45%. The page scrolls; the card does not. */
	body.xcs-sticker .xcs-stk-layout {
		grid-template-columns: minmax(0, 1.22fr) minmax(280px, 1fr);
		align-items: start;
	}
	body.xcs-sticker .xcs-stk-stage {
		min-height: 520px;
		height: auto;
		max-height: none;
	}
	body.xcs-sticker .xcs-stk-options {
		position: static;
		top: auto;
		max-height: none;
		overflow: visible;
		margin-bottom: 0;
		padding: 12px 14px;
	}
	body.xcs-sticker .xcs-stk-options .xcs-step-h { margin-bottom: 8px; }
	body.xcs-sticker .xcs-stk-options .xcs-stk-row { margin-top: 8px; }
	body.xcs-sticker .xcs-stk-options .xcs-stk-file { gap: 4px; }
}
@media (max-width: 800px) {
	.xcs-stk-layout { grid-template-columns: 1fr; }
	.xcs-stk-stage { min-height: 260px; height: auto; max-height: none; }
	.xcs-stk-options {
		position: static;
		top: auto;
		max-height: none;
		overflow: visible;
	}
	.xcs-stk-move-hint { display: none; }
	.xcs-stk-nudge {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin-top: 8px;
	}
	.xcs-stk-nudge button {
		min-width: 44px;
		min-height: 44px;
		padding: 0 12px;
		border-radius: 999px;
		border: 1px solid var(--xcs-line);
		background: #fff;
		font-size: 18px;
	}
	.xcs-stk-theme,
	body .xcs button.xcs-stk-theme,
	body .xcs button.xcs-stk-theme:hover,
	body .xcs button.xcs-stk-theme:focus,
	body .xcs button.xcs-stk-theme:active {
		align-self: stretch;
		width: 100% !important;
		min-height: 44px;
	}
}
@media (max-width: 480px) {
	/* 390px-wide phones: the upload, sliders, and chips stay easy to tap. */
	.xcs-stk-theme,
	body .xcs button.xcs-stk-theme,
	.xcs-stk-chips button,
	.xcs-stk-file input[type="file"] {
		min-height: 44px;
	}
}
