/*
 * Editor overlay.
 *
 * Nothing here depends on the theme. Every selector is prefixed and the
 * overlay is fixed to the viewport, so it sits over any product layout.
 *
 * The tokens below are defined once, on the overlay root, so every panel the
 * tools render inherits them rather than repeating hex values.
 */

body.skmpd-editor-open {
	overflow: hidden;
}

.skmpd-editor {
	--skmpd-desk: #e8e4dd;
	--skmpd-sunken: #faf8f5;
	--skmpd-line: #dcd7ce;
	--skmpd-ink: #1c1a17;
	--skmpd-ink-2: #5f5850;
	--skmpd-ink-3: #948d82;
	--skmpd-accent: #3b6ea8;
	--skmpd-accent-tint: #eaf1f8;
	--skmpd-warn: #9a6b12;
	--skmpd-warn-bg: #fdf6e7;
	--skmpd-danger: #9e3b2c;
	--skmpd-ok: #2f7a52;

	/* Radii: controls, cards. */
	--skmpd-radius-control: 7px;
	--skmpd-radius-card: 9px;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: var( --skmpd-ink );
	font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 13px;
	line-height: 1.45;
}

/*
 * Take the controls back from the theme.
 *
 * The overlay is rendered inside the theme's page, so a theme rule on a bare
 * element selector reaches every control in here. Flatsome's own
 * `.button, button, input[type=button], ...` rule carries twenty three
 * declarations, and six of them move things: text-transform uppercase, a
 * 2.4em line-height and 2.5em min-height that fight our fixed control heights,
 * letter-spacing, font-weight bolder, and a margin-right of 1em that opens
 * gaps between buttons we never asked for.
 *
 * `font: inherit` alone was not enough, because none of those six are part of
 * the font shorthand. This resets the whole set on every control the overlay
 * owns, so the editor looks the same on any theme, which is what the brief
 * asks for. Each panel then sets what it actually wants on top.
 *
 * Scoped to .skmpd-editor, so nothing here escapes into the shop.
 */
.skmpd-editor button,
.skmpd-editor input,
.skmpd-editor select,
.skmpd-editor textarea {
	margin: 0;
	font: inherit;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	max-width: none;
	vertical-align: baseline;
	box-shadow: none;
	transition: none;
}

/*
 * min-height and min-width are deliberately NOT in the block above.
 *
 * That selector is (0,1,1) and our own control classes such as
 * `.skmpd-editor__tool` are (0,1,0), so anything set there wins against them.
 * Both attempts to be clever here broke the tool buttons: `min-height: 0`
 * beat the tool's own min-height, and so did `min-height: revert`,
 * which resolves to `auto`. The reset cannot express "beat the theme but lose
 * to us" with specificity alone.
 *
 * It does not need to. Every control in the editor already sets its own height
 * or min-height, so the theme's `min-height: 2.5em` is overridden where it
 * actually matters, by the rule that knows what the control should be. The
 * only controls it could still reach are ones with no size of their own, and
 * for those the browser default and the theme's 2.5em look the same.
 *
 * A reset is for properties nothing else sets. Sizing is not one of them.
 *
 * Fonts are the same trap from the other side. The block above does set them,
 * so a control's own font-size or font-weight written with one class loses to
 * `font: inherit` without a word, and the button falls back to the editor's
 * plain 13px. Controls set their font with two classes instead,
 * `.skmpd-editor .skmpd-editor__x`, which is (0,2,0) and wins. Eight did not
 * until 2026-10-27, "Use this design" among them; the theme isolation spec
 * now measures each one.
 */


/*
 * The theme also styles the states. Ours are set per control, so the
 * inherited hover and focus treatments are cleared rather than overridden in
 * a dozen places.
 */
.skmpd-editor button:hover,
.skmpd-editor button:focus,
.skmpd-editor button:active {
	box-shadow: none;
	text-shadow: none;
	transform: none;
}

.skmpd-editor :focus-visible {
	outline: 2px solid var( --skmpd-accent );
	outline-offset: 2px;
}

/* Top bar ---------------------------------------------------------------- */

.skmpd-editor__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 56px;
	flex: 0 0 auto;
	padding: 0 16px;
	background: #fff;
	border-bottom: 1px solid var( --skmpd-line );
}

.skmpd-editor__bar-start {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 0;
	min-width: 0;
}

.skmpd-editor__bar-end {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 0;
	justify-content: flex-end;
}

.skmpd-editor__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.skmpd-editor__back {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex: 0 0 auto;
	height: 34px;
	padding: 0 11px 0 8px;
	border: 1px solid var( --skmpd-line );
	border-radius: var( --skmpd-radius-control );
	background: #fff;
	color: var( --skmpd-ink );
	cursor: pointer;
}

/* Fonts take two classes on every control; the reset says why. */
.skmpd-editor .skmpd-editor__back {
	font-size: 13px;
	font-weight: 500;
}

.skmpd-editor__back:hover {
	background: var( --skmpd-sunken );
}

/* The save status sits in the middle, between the two flexible halves. */
.skmpd-editor__save-status {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	flex: 0 0 auto;
	font-size: 12.5px;
	color: var( --skmpd-ink-3 );
}

.skmpd-editor__save-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var( --skmpd-ink-3 );
}

.skmpd-editor__save-status[data-state="saving"] {
	color: var( --skmpd-ink-2 );
}

.skmpd-editor__save-status[data-state="saving"] .skmpd-editor__save-dot {
	background: var( --skmpd-warn );
}

.skmpd-editor__save-status[data-state="saved"] {
	color: var( --skmpd-ink-2 );
}

.skmpd-editor__save-status[data-state="saved"] .skmpd-editor__save-dot {
	background: var( --skmpd-ok );
}

/*
 * Storage is blocked, so there is no backup. This is the one save state that is
 * a warning rather than progress, and it carries the longest wording, so it
 * gets the warning color and is allowed to wrap rather than being clipped.
 */
.skmpd-editor__save-status[data-state="unavailable"] {
	color: var( --skmpd-warn );
	white-space: normal;
	max-width: 22em;
	line-height: 1.3;
}

.skmpd-editor__save-status[data-state="unavailable"] .skmpd-editor__save-dot {
	background: var( --skmpd-warn );
}

/* Undo and Redo are one joined control, so they read as a pair. */
.skmpd-editor__history {
	display: flex;
	align-items: center;
	border: 1px solid var( --skmpd-line );
	border-radius: var( --skmpd-radius-control );
	overflow: hidden;
	background: #fff;
}

.skmpd-editor__undo,
.skmpd-editor__redo {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 11px;
	border: 0;
	background: #fff;
	color: var( --skmpd-ink );
	cursor: pointer;
}

.skmpd-editor .skmpd-editor__undo,
.skmpd-editor .skmpd-editor__redo {
	font-size: 12.5px;
	font-weight: 500;
}

.skmpd-editor__undo {
	border-right: 1px solid var( --skmpd-line );
}

.skmpd-editor__undo:hover:not( [disabled] ),
.skmpd-editor__redo:hover:not( [disabled] ) {
	background: var( --skmpd-sunken );
}

.skmpd-editor__undo[disabled],
.skmpd-editor__redo[disabled] {
	color: #bdb6ab;
	cursor: default;
}

.skmpd-editor__done {
	height: 38px;
	padding: 0 17px;
	border: 1px solid var( --skmpd-ink );
	border-radius: 8px;
	background: var( --skmpd-ink );
	color: #fff;
	cursor: pointer;
}

.skmpd-editor .skmpd-editor__done {
	font-size: 13.5px;
	font-weight: 600;
}

.skmpd-editor__done:hover:not( [disabled] ) {
	background: #322e29;
}

.skmpd-editor__done[disabled] {
	border-color: var( --skmpd-line );
	background: #efece6;
	color: var( --skmpd-ink-3 );
	cursor: not-allowed;
}

/* Body ------------------------------------------------------------------- */

.skmpd-editor__body {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
}

/*
 * "Use this design" at work. Off screen but still read out while idle, so a
 * screen reader hears the text when setBusy() fills it; a veil over the label
 * and the tools while the save runs.
 */
.skmpd-editor__busy {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset( 50% );
	white-space: nowrap;
}

.skmpd-editor.is-saving .skmpd-editor__busy {
	inset: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	padding: 24px 16px;
	overflow: visible;
	clip-path: none;
	white-space: normal;
	background: rgba( 255, 255, 255, 0.7 );
	cursor: progress;
}

/* Solid, so the sentence never sits over the customer's own lettering. */
.skmpd-editor__busy-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	max-width: 360px;
	padding: 22px 24px;
	border: 1px solid var( --skmpd-line );
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 8px 28px rgba( 0, 0, 0, 0.12 );
	text-align: center;
}

/* Locked by inert while saving; faded so it also looks it. */
.skmpd-editor.is-saving .skmpd-editor__history {
	opacity: 0.45;
}

.skmpd-editor__busy strong {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var( --skmpd-ink );
	font-size: 17px;
	font-weight: 600;
}

.skmpd-editor__busy strong::before {
	content: "";
	width: 20px;
	height: 20px;
	flex: none;
	border: 2px solid #dcd7ce;
	border-top-color: #3b6ea8;
	border-radius: 50%;
	animation: skmpd-spin 0.7s linear infinite;
}

.skmpd-editor__busy span {
	color: var( --skmpd-ink-3 );
	font-size: 14px;
}

/*
 * The canvas column.
 *
 * min-width:0 is load bearing. A flex child defaults to min-width:auto and
 * sizes itself to its own content, which here is the canvas, so the column
 * grew to whatever the canvas happened to be and reported that width back to
 * fitToStage. Nothing converged on the space available and the label was
 * clipped on the right. Every numeric assertion passed through that bug.
 */
.skmpd-editor__canvas-wrap {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	padding: 20px 24px 24px;
	background: var( --skmpd-desk );
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

/* View toggle ------------------------------------------------------------ */

.skmpd-editor__view {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	border: 1px solid #d5d0c7;
	border-radius: var( --skmpd-radius-card );
	background: #fff;
	overflow: hidden;
}

.skmpd-editor__view-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;

	/* The handoff's canvas controls minimum. Below this a control is hard to
	   hit on a phone, where most of these designs get made. */
	min-height: 44px;
	padding: 0 15px;
	border: 0;
	background: #fff;
	color: var( --skmpd-ink-2 );
	cursor: pointer;
}

/* Before .is-active, which raises the weight at the same specificity. */
.skmpd-editor .skmpd-editor__view-btn {
	font-size: 12.5px;
	font-weight: 500;
}

.skmpd-editor__view-btn + .skmpd-editor__view-btn {
	border-left: 1px solid #e6e1d9;
}

.skmpd-editor__view-btn.is-active {
	background: var( --skmpd-ink );
	color: #fff;
	font-weight: 600;
}

/* Canvas card ------------------------------------------------------------ */

.skmpd-editor__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	max-height: 100%;

	/*
	 * Three properties, and all three are load bearing. Two bugs came from
	 * getting this wrong, in opposite directions.
	 *
	 * min-width:0 because a flex item defaults to min-width:auto and refuses to
	 * shrink below its content. The stage's content is the canvas, so the stage
	 * grew to whatever the canvas happened to be and reported that width back
	 * to fitToStage, which fitted the canvas to the size the canvas had caused.
	 * Nothing converged on the space available and the label was clipped on the
	 * right. Measured as a 1085px stage inside a 785px wrap.
	 *
	 * flex:1 because min-width:0 alone lets it collapse the other way. With no
	 * growth the stage takes only what its content asks for, so once the tool
	 * panel appeared and competed for the row the stage fell to 232px and the
	 * label became too small to design on. Growing claims its share of the row;
	 * min-width lets it give that share back when it must.
	 *
	 * Every numeric test passed through both bugs, because the canvas really
	 * was the right size and the right ratio each time. Only looking at the
	 * screen showed either one.
	 */
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
}

/* Two layered shadows: a tight contact edge, then the soft lift. */
.skmpd-editor__stage .lower-canvas {
	background: #fff;
	box-shadow: 0 1px 2px rgba( 28, 26, 23, 0.18 ), 0 14px 34px rgba( 28, 26, 23, 0.16 );
}

/* Fabric's interaction layer sits above the artwork and must stay clear. */
.skmpd-editor__stage .upper-canvas {
	background: transparent;
}

/* Warning bar, filled by the locked zone check. ------------------------- */

.skmpd-editor__warning {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	max-width: min( 100%, 900px );
	padding: 9px 12px 9px 13px;
	border: 1px solid #ecdcb8;
	border-radius: 9px;
	background: #fdf6e7;
	font-size: 13px;
	color: #3d3934;
}

/*
 * Empty is the normal state, so the bar takes no room and no border until
 * something is actually wrong. A hidden element also drops out of the live
 * region, so nothing is announced while there is nothing to say.
 */
.skmpd-editor__warning:empty {
	display: none;
}

.skmpd-editor__warning > svg {
	flex: 0 0 auto;
	color: #9a6b12;
}

.skmpd-editor__warning-text {
	flex: 1 1 auto;
	min-width: 0;
}

.skmpd-editor__warning button {
	flex: 0 0 auto;
	height: 30px;
	padding: 0 12px;
	border-radius: 7px;
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}

.skmpd-editor__warning-move {
	border: 1px solid #1c1a17;
	background: #1c1a17;
	color: #fff;
}

/* Two classes, because `.skmpd-editor__warning button` above is (0,1,1) and
 * was taking this button's padding and weight as well as the reset. */
.skmpd-editor__warning .skmpd-editor__warning-hide {
	border: 0;
	padding: 0 10px;
	background: transparent;
	color: #6f6860;
	font-weight: 500;
}

.skmpd-editor__warning button:focus-visible {
	outline: 2px solid #3b6ea8;
	outline-offset: 2px;
}

/* Tool tabs --------------------------------------------------------------
 *
 * Four abreast across the top of the right panel, icon over name. A tab is
 * about 65px wide at the panel's 280px, so a long name wraps to a second line
 * rather than squeezing its neighbors, and the pressed tab keeps the same
 * weight as the rest: bold made "Background" too wide for its tab.
 */

.skmpd-editor__toolbar {
	display: grid;
	grid-auto-columns: 1fr;
	grid-auto-flow: column;
	gap: 2px;
	flex: 0 0 auto;
	padding: 6px 4px;
	border-bottom: 1px solid #e6e1d9;
}

.skmpd-editor__tool {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 0;
	min-height: 64px;
	padding: 4px 2px;
	border: 0;
	border-radius: var( --skmpd-radius-card );
	background: transparent;
	color: var( --skmpd-ink );
	text-align: center;
	cursor: pointer;
}

/*
 * Two classes, because the theme reset's `font: inherit` outranks one. 11px
 * rather than more because Mac's system face runs wider than Windows', and
 * "Background" has to fit a 65px tab on both.
 */
.skmpd-editor .skmpd-editor__tool {
	font-size: 11px;
	font-weight: 500;
}

.skmpd-editor__tool:hover:not( .is-active ) {
	background: var( --skmpd-sunken );
}

.skmpd-editor__tool.is-active {
	background: var( --skmpd-ink );
	color: #fff;
}

/* Right panel ------------------------------------------------------------ */

.skmpd-editor__panel-wrap {
	display: flex;
	flex-direction: column;
	width: 280px;
	flex: 0 0 auto;
	background: #fff;
	border-left: 1px solid var( --skmpd-line );
	min-height: 0;
}

.skmpd-editor__panel-head {
	display: flex;
	align-items: center;
	height: 44px;
	flex: 0 0 auto;
	padding: 0 14px;
	border-bottom: 1px solid #e6e1d9;
	font-size: 13.5px;
	font-weight: 600;
}

/*
 * The pressed tab already names the tool, so the header only shows in the
 * bottle view, where the tabs are hidden and it names the summary instead.
 */
.skmpd-editor:not( .is-bottle ) .skmpd-editor__panel-head {
	display: none;
}

.skmpd-editor__panel {
	flex: 1 1 auto;
	padding: 14px;
	overflow-y: auto;
	min-height: 0;
}

/* Tool panels -----------------------------------------------------------
 *
 * The text panel is Task 7 and the background panel Task 9. The photo panel is
 * redesigned in Task 8; until then it keeps working off the shared button rule.
 */

.skmpd-editor__panel {
	padding: 16px 14px 20px;
}

.skmpd-editor__panel .skmpd-panel button {
	color: var( --skmpd-ink );
	background: #fff;
	border: 1px solid var( --skmpd-line );
	border-radius: var( --skmpd-radius-control );
	padding: 8px 10px;
	margin: 0;
	min-height: 44px;
	font-size: 13px;
	cursor: pointer;
}

.skmpd-editor__panel .skmpd-panel [data-action="delete"] {
	border-color: var( --skmpd-danger );
	color: var( --skmpd-danger );
}

/*
 * A label a screen reader reads but the eye does not, for controls the design
 * names in the panel header or in an icon instead of beside the field.
 */
.skmpd-u-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	clip-path: inset( 50% );
	white-space: nowrap;
	border: 0;
}

.skmpd-editor__panel .skmpd-panel__heading {
	margin: 0 0 9px;
	color: #3d3934;
	font-size: 12.5px;
	font-weight: 600;
}

/*
 * Add words, the panel's entry action.
 *
 * It had no rule of its own and was inheriting the theme's button styling,
 * which is how it came to be uppercase and a different shape from every other
 * control in here. The margin underneath is the gap to the textarea: the two
 * are separate actions, adding a new text object versus editing the selected
 * one, and they were reading as one control stuck together.
 */
/*
 * Adding words and editing the selected words are two panels, not one.
 *
 * boot.js renders the entry action and the tool's own controls as separate
 * `.skmpd-panel` siblings, so with nothing between them the button sat flush
 * against the textarea and the two read as a single stuck-together control.
 * The gap goes on the wrapper rather than the button, because the button's own
 * margin is cleared by the theme reset above, which is more specific than a
 * single class.
 */
.skmpd-editor__panel .skmpd-panel + .skmpd-panel {
	margin-top: 18px;
}

/*
 * An upload in flight.
 *
 * The images tool has always set aria-busy and this class, and nothing drew
 * either, so a customer uploading a phone photograph over a slow connection
 * pressed Choose a photo and watched nothing happen. Some pressed it twice.
 *
 * Unscoped, and with literal colors rather than the editor's tokens, because
 * the panel is also built outside the overlay where those tokens do not
 * resolve. The spinner is a pseudo element so it needs no extra markup.
 */
.skmpd-panel.is-busy {
	position: relative;
	cursor: progress;
}

/* Everything the upload replaces, dimmed. The note itself is the exception. */
.skmpd-panel.is-busy > *:not( .skmpd-panel__busy-note ) {
	opacity: 0.45;
	pointer-events: none;
}

/*
 * The wording sits below the dimmed controls rather than over them, so the
 * spinner and the sentence read as one thing and neither covers what the
 * customer was just looking at.
 */
.skmpd-panel__busy-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin: 14px 0 0;
	color: #5f5850;
	font-size: 13px;
}

.skmpd-panel__busy-note::before {
	content: "";
	width: 16px;
	height: 16px;
	flex: none;
	border: 2px solid #dcd7ce;
	border-top-color: #3b6ea8;
	border-radius: 50%;
	animation: skmpd-spin 0.7s linear infinite;
}

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

/*
 * Respect a customer who has asked for less motion: keep the indicator, drop
 * the spin. An upload still has to look like it is happening.
 */
@media ( prefers-reduced-motion: reduce ) {
	.skmpd-panel__busy-note::before,
	.skmpd-editor__busy strong::before {
		animation: none;
		border-top-color: #3b6ea8;
		border-right-color: #3b6ea8;
	}
}

/*
 * button. rather than a plain class, like the photo panel's actions. The
 * shared panel button rule is (0,2,1) and took everything here but the layout,
 * so from 2026-09-15 to 2026-10-27 this drew as a plain white button instead
 * of the handoff's dashed one. The states need the same weight to beat it.
 */
.skmpd-editor__panel .skmpd-panel button.skmpd-panel__add-text {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 44px;
	padding: 0 14px;
	border: 1px dashed #b5aca0;
	border-radius: var( --skmpd-radius-card );
	background: var( --skmpd-sunken );
	color: var( --skmpd-ink );
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.skmpd-editor__panel .skmpd-panel button.skmpd-panel__add-text:hover:not( [disabled] ) {
	border-color: var( --skmpd-ink-3 );
	background: #f4f1ec;
}

.skmpd-editor__panel .skmpd-panel button.skmpd-panel__add-text[disabled] {
	color: var( --skmpd-ink-3 );
	cursor: not-allowed;
}

.skmpd-panel__text-copy {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 10px 11px;
	color: var( --skmpd-ink );
	background: var( --skmpd-sunken );
	border: 1px solid var( --skmpd-line );
	border-radius: 8px;
	font: inherit;
	resize: vertical;
}

/* Pick a style: one row per font, previewing the customer's own words. */

.skmpd-panel__fonts {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 20px;
}

.skmpd-editor__panel .skmpd-panel__font {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	height: 52px;
	padding: 0 13px;
	border-radius: var( --skmpd-radius-card );
	text-align: left;
	overflow: hidden;
}

/*
 * One size for every face rather than a per font number. The handoff tuned
 * each row by eye against four specific fonts; the template's font list is
 * whatever a client configures, so a fixed size that fits the tallest face is
 * the one that holds for any list.
 */
.skmpd-panel__font-sample {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 25px;
	line-height: 1.1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.skmpd-panel__font-tick {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	color: var( --skmpd-accent );
	visibility: hidden;
}

.skmpd-editor__panel .skmpd-panel__font.is-selected {
	border: 2px solid var( --skmpd-accent );
	background: var( --skmpd-accent-tint );
	padding: 0 12px;
}

.skmpd-panel__font.is-selected .skmpd-panel__font-tick {
	visibility: visible;
}

/* Size: two 44px steps either side of the slider. */

.skmpd-panel__size {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
}

.skmpd-editor__panel .skmpd-panel__size-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	min-height: 44px;
	padding: 0;
	border-radius: var( --skmpd-radius-card );
	font-size: 14px;
	font-weight: 600;
}

.skmpd-editor__panel .skmpd-panel__size-step--up {
	font-size: 18px;
}

.skmpd-panel__size .skmpd-panel__slider {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	accent-color: var( --skmpd-accent );
}

/*
 * Line spacing, full width under its heading.
 *
 * The theme reset zeroes margins on form controls, so the bottom margin is
 * put back here rather than inherited. [hidden] is restated because the
 * display below would otherwise beat the browser default and the control
 * would stay visible on single-line text.
 */
.skmpd-editor__panel .skmpd-panel__spacing-part[hidden] {
	display: none;
}

.skmpd-editor__panel input.skmpd-panel__spacing-part {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 18px;
	accent-color: var( --skmpd-accent );
}

/*
 * The words the customer is typing, and the space under them.
 *
 * The theme reset zeroes margins on every form control, and this textarea had
 * no rule of its own to put one back, so it sat flush against the "Pick a
 * style" heading with nothing between them at all. 18px is the rhythm the
 * panel already uses between its blocks. The size and line height are here for
 * the same reason: the reset outranked them in the rule above.
 */
.skmpd-editor__panel .skmpd-panel__text-copy {
	display: block;
	width: 100%;
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.4;
	resize: vertical;
}

/*
 * Where a selection toolbar button just sent the customer.
 *
 * Color and Bend the text focused a control and did nothing else. The panel is
 * usually all on screen, so there was nothing to scroll, and the focus ring is
 * :focus-visible, which browsers suppress for programmatic focus after a mouse
 * click. Both buttons read as broken. This gives the jump somewhere to land.
 *
 * The mark is taken off after 1.2s by boot.js, so it points and then gets out
 * of the way rather than becoming a second kind of selected.
 */
.skmpd-panel .is-target {
	border-radius: var( --skmpd-radius-control );
	outline: 2px solid var( --skmpd-accent );
	outline-offset: 5px;
	animation: skmpd-point 1.2s ease-out;
}

@keyframes skmpd-point {
	0% {
		outline-color: transparent;
	}

	15% {
		outline-color: var( --skmpd-accent );
	}

	70% {
		outline-color: var( --skmpd-accent );
	}

	100% {
		outline-color: transparent;
	}
}

/*
 * Reduced motion keeps the outline and drops the fade. The point of the mark is
 * to say where you landed, which a static outline does just as well.
 */
@media ( prefers-reduced-motion: reduce ) {
	.skmpd-panel .is-target {
		animation: none;
	}
}

/* Color: round swatches, plus the dashed More colors control. */

.skmpd-panel__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
}

/*
 * The 38px comes from the handoff and is deliberate: a swatch sits in a grid
 * of its own with 8px between, so the whole row is one target area rather than
 * a lone control next to the canvas. The extra specificity is to beat the
 * shared 44px min-height on every panel button.
 */
.skmpd-editor__panel .skmpd-panel button.skmpd-panel__swatch,
.skmpd-editor__panel .skmpd-panel .skmpd-panel__swatch {
	position: relative;
	box-sizing: border-box;
	width: 38px;
	height: 38px;
	min-height: 38px;
	padding: 0;
	border: 1px solid #c7c0b4;
	border-radius: 50%;
	cursor: pointer;
}

.skmpd-editor__panel .skmpd-panel button.skmpd-panel__swatch.is-selected,
.skmpd-editor__panel .skmpd-panel .skmpd-panel__swatch.is-selected {
	border: 2px solid var( --skmpd-accent );
	box-shadow: inset 0 0 0 2px #fff;
}

.skmpd-panel__swatch--more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-style: dashed;
	background: #fff;
	color: var( --skmpd-ink-2 );
}

.skmpd-panel__swatch--more svg {
	width: 16px;
	height: 16px;
}

/*
 * The native color input is the control the label opens. Hiding it with
 * display:none would stop the label reaching it in some browsers, so it sits
 * under the swatch instead.
 */
.skmpd-panel__color {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.skmpd-panel__color:focus-visible + .skmpd-panel__swatch--more,
.skmpd-panel__swatch--more:focus-within {
	outline: 2px solid var( --skmpd-accent );
	outline-offset: 2px;
}

/* Bend the text: four presets, 44px each. */

.skmpd-panel__bends {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 6px;
}

.skmpd-editor__panel .skmpd-panel__bend {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	min-height: 44px;
	padding: 0;
	border-radius: var( --skmpd-radius-card );
	color: var( --skmpd-ink-2 );
}

.skmpd-panel__bend svg {
	width: 26px;
	height: 16px;
}

.skmpd-editor__panel .skmpd-panel__bend.is-selected {
	border: 2px solid var( --skmpd-accent );
	background: var( --skmpd-accent-tint );
	color: #2c5580;
}

/* Floating toolbar over the selection ------------------------------------ */

/*
 * The bar itself is absolutely positioned inside .skmpd-editor__canvas-wrap,
 * which is already position:relative, and selection-toolbar.js sets left and
 * top in that element's coordinates.
 *
 * Deviation from the 44px canvas controls rule, and it is deliberate. The
 * handoff draws these buttons at 34px inside a 44px tall bar, which is how it
 * fits six controls over a label without covering the artwork. The bar meets
 * the 44px target; the individual buttons do not. Frames E2 and E3 are the
 * approved design, so they win here, and the same operations all remain
 * available at full size in the right panel.
 */
.skmpd-editor .skmpd-selection {
	position: absolute;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 4px;

	/*
	 * There is no global box-sizing reset in this stylesheet, so this is not
	 * decoration. Without it the 5px padding and the border sit outside the
	 * 44px and the bar renders 56px tall, which is the handoff's top bar height
	 * rather than its toolbar height. Caught by measuring the rendered box in
	 * the spec, not by reading the declaration.
	 */
	box-sizing: border-box;
	height: 44px;
	padding: 5px;
	border: 1px solid #d5d0c7;
	/* The handoff draws this bar at 10, between the control and card radii. */
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 4px 14px rgba( 28, 26, 23, 0.14 );
	white-space: nowrap;
}

.skmpd-editor .skmpd-selection[hidden] {
	display: none;
}

/*
 * button. rather than a plain class, on purpose.
 *
 * .skmpd-editor__panel .skmpd-panel button { min-height: 44px } outranks a bare
 * class selector and has already silently resized a 38px control to 44px with
 * nothing visible saying so. This bar lives in the canvas column rather than
 * the panel, so that rule cannot reach it today, but the qualifier costs
 * nothing and keeps the 34px real if the bar ever moves.
 */
.skmpd-editor button.skmpd-selection__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 34px;
	height: 34px;
	min-height: 34px;
	padding: 0 10px;
	border: 0;
	border-radius: var( --skmpd-radius-control );
	background: transparent;
	color: var( --skmpd-ink );
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}

/*
 * A control the selection refuses, which today is only the two stacking
 * buttons over a backdrop photo. Disabled rather than removed, so the bar does
 * not change width and reflow under the pointer, and it has to look disabled
 * or the customer reads a dead button as a broken one. Caught in a screenshot:
 * without this the two buttons were indistinguishable from the live ones.
 */
.skmpd-editor button.skmpd-selection__button:disabled {
	opacity: 0.35;
	cursor: default;
}

.skmpd-editor button.skmpd-selection__button--icon {
	width: 34px;
	padding: 0;
}

.skmpd-editor button.skmpd-selection__button--swatch {
	width: 34px;
	padding: 0;
}

.skmpd-editor button.skmpd-selection__button--font {
	background: #f4f1ec;
}

.skmpd-editor button.skmpd-selection__button--danger {
	color: var( --skmpd-danger );
}

.skmpd-editor button.skmpd-selection__button:hover,
.skmpd-editor button.skmpd-selection__button:focus-visible {
	background: var( --skmpd-accent-tint );
}

.skmpd-editor .skmpd-selection__swatch {
	width: 20px;
	height: 20px;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	border-radius: 50%;
}

.skmpd-editor .skmpd-selection__divider {
	width: 1px;
	height: 22px;
	background: #e6e1d9;
}

.skmpd-editor .skmpd-selection__label {
	padding: 0 6px;
	color: var( --skmpd-ink-2 );
	font-size: 12.5px;
}

/* The font name renders in its own face, as the style rows do. */
.skmpd-editor button.skmpd-selection__button--font .skmpd-selection__text {
	font-size: 19px;
	font-weight: 400;
	line-height: 1;
}

/* Background panel -------------------------------------------------------
 *
 * Squares rather than the text panel's circles, because a background is a
 * whole surface and a round chip reads as a spot of ink. 44px is the canvas
 * control minimum and matches the handoff, so unlike the text swatch there is
 * nothing here to win back off the shared min-height. The `button.` qualifier
 * is still needed to outrank the 38px round rule, which is the same weight.
 */

.skmpd-panel__swatches--square {
	gap: 8px;
}

.skmpd-editor__panel .skmpd-panel button.skmpd-panel__swatch--square,
.skmpd-editor__panel .skmpd-panel .skmpd-panel__swatch--square {
	width: 44px;
	height: 44px;
	min-height: 44px;
	border-radius: var( --skmpd-radius-card );
}

/*
 * Three across a 280px panel. A fixed height keeps the row even whatever shape
 * the preset is, and the thumbnail covers rather than stretches, the same way
 * setImage() covers the canvas.
 */
.skmpd-panel__patterns {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 7px;
	margin: 0 0 18px;
}

.skmpd-editor__panel .skmpd-panel__pattern {
	position: relative;
	height: 52px;
	min-height: 52px;
	padding: 0;
	overflow: hidden;
	border-radius: 8px;
	background: var( --skmpd-sunken );
}

.skmpd-panel__pattern img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.skmpd-editor__panel .skmpd-panel__pattern.is-selected {
	border: 2px solid var( --skmpd-accent );
}

.skmpd-editor__panel .skmpd-panel__reset {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	padding: 0;
	border-radius: 8px;
	font-weight: 500;
}

.skmpd-panel__reset svg {
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
}

/*
 * The note the handoff draws in the panel footer. The wrapper has its own note
 * element but nothing fills it, and a tool only ever renders into the scrolling
 * body, so the panel carries the note and is styled to match that footer.
 *
 * margin-top:auto pins it to the bottom of a short panel rather than leaving it
 * floating half way down, which is how it read in the first screenshot. It
 * needs the panel itself to be a full height flex column for that to bite.
 */
.skmpd-panel--background,
.skmpd-panel--looks {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	box-sizing: border-box;
}

/* Ready-made looks, frame E1 ---------------------------------------------- */

.skmpd-panel__intro {
	margin: 0 0 12px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var( --skmpd-ink-2 );
}

.skmpd-panel__looks {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/*
 * button. rather than a plain class, on purpose.
 *
 * .skmpd-editor__panel .skmpd-panel button { min-height: 44px } outranks a bare
 * class selector. A card is far taller than 44px so nothing is being resized
 * here, but the qualifier is what lets the padding and the fixed thumb height
 * below win, and it costs nothing.
 */
.skmpd-editor__panel .skmpd-panel button.skmpd-panel__look {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 0;
	overflow: hidden;
	border: 1px solid var( --skmpd-line );
	border-radius: var( --skmpd-radius-card );
	background: #fff;
	text-align: left;
	cursor: pointer;
}

/*
 * A fixed height keeps the column even whatever shape a thumbnail is, and the
 * image covers rather than stretches, the same way the pattern grid does. The
 * sunken fill is what a look with no thumbnail shows, rather than a broken
 * image or a collapsed card.
 */
.skmpd-panel__look-thumb {
	display: block;
	height: 88px;
	overflow: hidden;
	border-bottom: 1px solid #f0ece4;
	background: var( --skmpd-sunken );
}

.skmpd-panel__look-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.skmpd-panel__look-name {
	display: block;
	padding: 8px 10px;
	font-size: 12.5px;
	font-weight: 600;
	color: var( --skmpd-ink );
}

.skmpd-panel__note {
	margin: 18px -14px -20px;
	margin-top: auto;
	padding: 12px 14px;
	border-top: 1px solid #e6e1d9;
	background: var( --skmpd-sunken );
	font-size: 12px;
	line-height: 1.5;
	color: #6f6860;
}

/*
 * hidden must win over a display rule.
 *
 * A plain .skmpd-editor__view { display: flex } outranks the browser's own
 * [hidden] { display: none }, so the view toggle stayed on screen over a
 * template with no mockups: hidden in the DOM, visible to the customer, and an
 * empty frame is exactly what Task 12 exists to avoid. Every element in this
 * file that is toggled with the hidden property needs this.
 */
.skmpd-editor [hidden] {
	display: none !important;
}

/* On the bottle, frame E4 ------------------------------------------------
 *
 * There is no editing in this view, so everything that edits is hidden rather
 * than disabled: the canvas, the tool tabs, the locked zone bar, and the
 * tool panel's body. Hidden, not merely styled out, so nothing in here can be
 * clicked or tabbed to.
 */

.skmpd-editor.is-bottle .skmpd-editor__stage,
.skmpd-editor.is-bottle .skmpd-editor__toolbar,
.skmpd-editor.is-bottle .skmpd-editor__warning,
.skmpd-editor.is-bottle .skmpd-editor__panel,
/*
 * The floating toolbar over the selection, which is absolutely positioned in
 * this same column and would otherwise sit over the bottle photograph offering
 * Delete and Duplicate in a view that does no editing.
 */
.skmpd-editor.is-bottle .skmpd-selection {
	display: none;
}

.skmpd-editor__bottle {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	width: 100%;

	/* The slot fills the column; the fitted frame is centered inside it. */
	align-items: center;

	/*
	 * The mockup takes the space the switch and the caption do not, which is
	 * what makes it the large thing on screen the handoff draws. justify-content
	 * is deliberately left alone: the slot grows instead, so the switch and the
	 * caption stay under the photograph rather than floating away from it.
	 */
	justify-content: flex-start;
	gap: 18px;
	min-height: 0;
}

/* An empty slot supplies available space without intrinsic image sizing. */
.skmpd-editor__bottle-space {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/*
 * The mockup card.
 *
 * The frame shrinks to the photograph rather than being a box the photograph
 * sits inside, and that is the whole point of it. The region is a percentage of
 * the photograph, the label is positioned in percentages of its offset parent,
 * and those two only mean the same rectangle while the frame and the photograph
 * are the same box. A frame that letterboxed the photograph would put the label
 * on the empty space beside the bottle at any photograph whose ratio did not
 * match the column, and every percentage would still be arithmetically correct.
 *
 * watchBottle() fits this frame into the available slot at the photo's natural
 * ratio. Explicit dimensions avoid different flex image sizing across engines.
 */
.skmpd-editor__bottle-frame {
	position: relative;
	flex: 0 0 auto;
	box-sizing: border-box;
	border: 1px solid #d5d0c7;
	border-radius: 4px;
	background: #f4f1ec;
	overflow: hidden;
}

.skmpd-editor__bottle-photo {
	display: block;

	/* The frame already has the photo's ratio. Themes must not change it. */
	max-width: none !important;
	max-height: none !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: fill !important;
	margin: 0;
	padding: 0;
	border: 0;
}

/*
 * The region the label occupies on this view, and the window the slice is seen
 * through. The percentages are set in showBottleView() because they come off
 * the template, and overflow:hidden is what turns an oversized render into one
 * slice of it.
 */
.skmpd-editor__bottle-wrap {
	position: absolute;
	overflow: hidden;
}

/*
 * The curved bottle, when the view asks for one.
 *
 * The shading is the half of this that does the work. The silhouette is set in
 * showBottleView() as a border radius, and this darkens both sides equally and
 * leaves a highlight left of center, which is the cue the eye reads as a round
 * surface. Symmetrical on purpose: a label on a bottle is seen head on, so
 * anything that favours one edge looks like a flat card turning instead.
 *
 * --skmpd-curve is 0 to 1 and scales the strength, so a view set to a gentle
 * curve gets gentle shading rather than the same overlay at a different shape.
 */
.skmpd-editor__bottle-wrap.is-curved::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(
			to right,
			rgba(0, 0, 0, calc(0.38 * var(--skmpd-curve, 0))) 0%,
			rgba(0, 0, 0, calc(0.10 * var(--skmpd-curve, 0))) 14%,
			rgba(255, 255, 255, calc(0.22 * var(--skmpd-curve, 0))) 34%,
			rgba(255, 255, 255, calc(0.05 * var(--skmpd-curve, 0))) 52%,
			rgba(0, 0, 0, calc(0.12 * var(--skmpd-curve, 0))) 78%,
			rgba(0, 0, 0, calc(0.42 * var(--skmpd-curve, 0))) 100%
		);
}

.skmpd-editor__bottle-label,
.skmpd-editor__bottle-label-tail,
.skmpd-editor__bottle-panels,
.skmpd-editor__bottle-panels-tail {
	position: absolute;
	margin: 0;
	padding: 0;
	border: 0;

	/*
	 * Fill the box rather than preserving the render's own ratio. The region is
	 * the rectangle the printer's label occupies on the bottle, and the render
	 * is that same label, so the two match by definition. Anything else would
	 * leave a gap the customer would read as a gap on the real bottle.
	 *
	 * Width, height and offsets are set in showBottleView(): the render is the
	 * whole label scaled up by the inverse of the view's slice, so the wanted
	 * part fills the wrap and the rest is clipped away.
	 *
	 * That only works if nothing caps the image at its box. Themes style bare
	 * img with max-width:100%, and the cap pulls a 200% wide label back to the
	 * wrap: Front shows the whole label squashed into part of its box and Back,
	 * shifted a full width left, shows almost nothing.
	 *
	 * !important, because raising specificity is not reliably enough. Two
	 * classes (0,2,0) beat Flatsome's bare `img` and were taken as sufficient.
	 * On Understrap 1.2.4 the same cap came back and broke both bottle views on
	 * a real shop page, with the theme's stylesheet loading after this one.
	 *
	 * Measured on that page rather than reasoned about: with !important the
	 * label renders at exactly twice its wrap, which is what a 50% slice needs;
	 * removing it at runtime drops the label straight back to the wrap's width
	 * and max-width computes to 100%.
	 *
	 * These three declarations are the geometry the bottle view depends on, not
	 * styling a theme could have a legitimate opinion about, so no theme should
	 * win them whatever its selectors or load order happen to be. That is the
	 * case for !important here, and it does not rest on any one theme.
	 */
	max-width: none !important;
	max-height: none !important;
	object-fit: fill !important;
}

.skmpd-editor__bottle-views {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	padding: 5px;
	border: 1px solid #d5d0c7;
	border-radius: 10px;
	background: #fff;
}

.skmpd-editor__bottle-view {
	min-height: 38px;
	padding: 0 20px;
	border: 0;
	border-radius: var( --skmpd-radius-control );
	background: transparent;
	color: var( --skmpd-ink-2 );
	cursor: pointer;
}

/* Before .is-active, which raises the weight at the same specificity. */
.skmpd-editor .skmpd-editor__bottle-view {
	font-size: 13px;
	font-weight: 500;
}

.skmpd-editor__bottle-view.is-active {
	background: var( --skmpd-ink );
	color: #fff;
	font-weight: 600;
}

.skmpd-editor__bottle-caption {
	flex: 0 0 auto;
	max-width: 520px;
	margin: 0;
	text-align: center;
	font-size: 12.5px;
	line-height: 1.5;
	color: #6f6860;
}

/* The bottle view's summary, which replaces the tool panel. ------------- */

.skmpd-editor__summary {
	flex: 1 1 auto;
	padding: 14px;
	overflow-y: auto;
	min-height: 0;
}

/* The mockup could not be built. Sits above the summary it replaces. */
.skmpd-editor__bottle-error,
.skmpd-editor__panels-error {
	flex: 0 0 auto;
	margin: 0 0 14px;
	padding: 10px 12px;
	border-radius: 6px;
	background: var( --skmpd-warn-bg );
	color: var( --skmpd-warn );
	font-size: 12.5px;
	line-height: 1.4;
}

.skmpd-editor__summary-list {
	margin: 0 0 18px;
	font-size: 12.5px;
}

.skmpd-editor__summary-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 0;
	border-bottom: 1px solid #f0ece4;
}

.skmpd-editor__summary-row:last-child {
	border-bottom: 0;
}

.skmpd-editor__summary-row dt {
	color: #6f6860;
}

.skmpd-editor__summary-row dd {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-weight: 600;
	text-align: right;

	/* A long line of words wraps rather than pushing the term off the row. */
	min-width: 0;
	overflow-wrap: anywhere;
}

.skmpd-editor__summary-swatch {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	border: 1px solid #c7c0b4;
	border-radius: 3px;
}

.skmpd-editor__summary-back {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	min-height: 44px;
	border: 1px solid var( --skmpd-line );
	border-radius: var( --skmpd-radius-card );
	background: #fff;
	color: var( --skmpd-ink );
	cursor: pointer;
}

.skmpd-editor .skmpd-editor__summary-back {
	font-size: 13.5px;
	font-weight: 600;
}

.skmpd-editor__summary-back:hover {
	background: var( --skmpd-sunken );
}

.skmpd-editor__summary-back:focus-visible {
	outline: 2px solid var( --skmpd-accent );
	outline-offset: 2px;
}

/* Phone: the panel becomes a sheet under the canvas. --------------------- */

@media ( max-width: 782px ) {
	.skmpd-editor__body {
		flex-direction: column;
	}

	.skmpd-editor__canvas-wrap {
		padding: 12px;
		gap: 12px;
		order: 1;
	}

	.skmpd-editor__panel-wrap {
		order: 2;
		width: auto;
		max-height: 40vh;
		border-left: 0;
		border-top: 1px solid var( --skmpd-line );
	}

	/*
	 * Two rows on a phone: the way out and the way on, then the save status
	 * beside Undo and Redo. One row wanted about 430px against a phone's 320
	 * to 390, and the start group's min-width: 0 let Back slide under Undo
	 * rather than wrap. The end group dissolves so its halves take a row each.
	 *
	 * The middle column lets Undo and Redo run wider than Use this design
	 * without narrowing Back's room above them: the history spans it, the
	 * done button does not, and Back's cell reaches over it.
	 */
	.skmpd-editor__bar {
		display: grid;
		grid-template-columns: minmax( 0, 1fr ) auto auto;
		grid-template-areas:
			"start start done"
			"status history history";
		align-items: center;
		height: auto;
		padding: 8px 10px;
		gap: 8px;
	}

	.skmpd-editor__bar-start {
		grid-area: start;
	}

	.skmpd-editor__bar-end {
		display: contents;
	}

	.skmpd-editor__done {
		grid-area: done;
		justify-self: end;
	}

	.skmpd-editor__save-status {
		grid-area: status;
	}

	.skmpd-editor__history {
		grid-area: history;
		justify-self: end;
	}

	/*
	 * No room for the heading beside Back on a phone, where it drew as a
	 * clipped sliver. Hidden for the eye only, the same way as .skmpd-u-hidden,
	 * so it is still a heading to a screen reader, as it was while the old
	 * one-row bar squeezed it to nothing.
	 */
	.skmpd-editor__title {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect( 0 0 0 0 );
		clip-path: inset( 50% );
		white-space: nowrap;
	}

	/*
	 * iPhone Safari zooms the whole page into any text field under 16px when
	 * it is tapped, and Flatsome's viewport tag allows it. This is the
	 * editor's only typing field.
	 */
	.skmpd-editor__panel .skmpd-panel__text-copy {
		font-size: 16px;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.skmpd-editor * {
		transition: none !important;
		animation: none !important;
	}
}

/* Photo panel, frame E3 ---------------------------------------------------
 *
 * Two panels in one body: boot.js prepends .skmpd-panel--image-object above
 * .skmpd-panel--images when a photo is selected, which is the order the handoff
 * draws. Neither is a full height flex column, because two of those would each
 * claim the whole body and push the note off the bottom; the note sits last in
 * normal flow instead.
 */

.skmpd-panel__warning {
	display: flex;
	gap: 10px;
	box-sizing: border-box;
	margin: 0 0 16px;
	padding: 10px;
	border: 1px solid #ecdcb8;
	border-radius: var( --skmpd-radius-card );
	background: var( --skmpd-warn-bg );
}

.skmpd-panel__warning[hidden] {
	display: none;
}

.skmpd-panel__warning > svg {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 1px;
}

.skmpd-panel__warning-body {
	flex: 1 1 auto;
	min-width: 0;
}

.skmpd-panel__warning-text {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: #3d3934;
}

/*
 * The one place the panel deviates from the 44px canvas control minimum, and
 * it is the handoff's own figure. The card is an interruption rather than a
 * tool the customer reaches for repeatedly, and a 44px button inside a 10px
 * card makes the card taller than the warning it carries.
 */
.skmpd-editor__panel .skmpd-panel button.skmpd-panel__shrink {
	width: 100%;
	height: 34px;
	min-height: 34px;
	margin-top: 9px;
	padding: 0 12px;
	border-color: var( --skmpd-ink );
	border-radius: var( --skmpd-radius-control );
	background: var( --skmpd-ink );
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
}

/*
 * "Use as a background", shown only once the photo covers most of the label.
 *
 * A real checkbox, so the state is the platform's rather than an aria-pressed
 * of our own, and the whole row is the label so the 44px target covers the
 * text as well as the box. The row is a canvas adjacent control, so it keeps
 * the 44px minimum the smaller cards inside the panel are allowed to drop.
 */
.skmpd-panel__backdrop {
	box-sizing: border-box;
	margin: 0 0 16px;
	padding: 8px 10px;
	border: 1px solid var( --skmpd-line );
	border-radius: var( --skmpd-radius-card );
	background: var( --skmpd-sunken );
}

.skmpd-panel__backdrop[hidden] {
	display: none;
}

.skmpd-panel__backdrop-row {
	display: flex;
	gap: 9px;
	align-items: center;
	min-height: 44px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: var( --skmpd-ink );
}

.skmpd-panel__backdrop-box {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: var( --skmpd-accent );
	cursor: pointer;
}

.skmpd-panel__backdrop .skmpd-panel__caption {
	margin: 0 0 2px;
}

/*
 * The size row reuses the text panel's 44px steps. The slider sits on a track
 * wrapper rather than directly in the row, because the green mark is absolutely
 * positioned against it and a native range cannot carry a child.
 */
.skmpd-panel__track {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
}

.skmpd-panel__track .skmpd-panel__slider {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	accent-color: var( --skmpd-accent );
}

/*
 * The green mark, drawn on the track behind the thumb.
 *
 * translateX centers the 2px rule on the position rather than starting it
 * there, which the spec caught: without it the mark reads a pixel to the right
 * of the width it stands for.
 *
 * The native thumb does not travel the whole track. It stops half its own width
 * from each end, so a mark placed by percentage is out by up to half a thumb at
 * the extremes. That is under 1 percent of a 200px track and the mark is a
 * target rather than a readout, so it is not worth reimplementing the range
 * input to correct. The caption below the slider says what the mark means, and
 * Shrink it to fit reaches the exact width without going near it.
 */
.skmpd-panel__mark {
	position: absolute;
	top: 50%;
	left: 0;
	width: 2px;
	height: 18px;
	margin-top: -9px;
	transform: translateX( -50% );
	background: var( --skmpd-ok );
	border-radius: 1px;
	pointer-events: none;
}

.skmpd-panel__caption {
	margin: 0 0 18px;
	font-size: 11.5px;
	line-height: 1.5;
	color: #6f6860;
}

.skmpd-panel--image-object .skmpd-panel__slider--wide {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 20px;
	accent-color: var( --skmpd-accent );
}

/* Flip and Remove, side by side. */

.skmpd-panel__actions {
	display: flex;
	gap: 7px;
	margin: 0 0 22px;
}

/*
 * button. rather than a plain class, on purpose. The shared
 * .skmpd-editor__panel .skmpd-panel button { min-height: 44px } outranks a bare
 * class, and the handoff draws these at 40px. Measured in the spec rather than
 * read off the declaration, which is the only way the same trap was caught on
 * the text panel's swatches.
 */
.skmpd-editor__panel .skmpd-panel button.skmpd-panel__action {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 0;
	height: 40px;
	min-height: 40px;
	padding: 0;
	border-radius: 8px;
	font-size: 12.5px;
	font-weight: 500;
}

.skmpd-panel__action svg {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
}

.skmpd-editor__panel .skmpd-panel button.skmpd-panel__action--danger {
	color: var( --skmpd-danger );
	border-color: var( --skmpd-line );
}

/*
 * Choose a photo. The native file input is the control the label opens, hidden
 * the same way the color picker is: display:none would stop a label reaching
 * it in some browsers.
 */
.skmpd-panel__upload {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.skmpd-panel__choose {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	margin: 0 0 9px;
	border: 1px dashed #b5aca0;
	border-radius: var( --skmpd-radius-card );
	background: var( --skmpd-sunken );
	color: var( --skmpd-ink );
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.skmpd-panel__choose svg {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}

.skmpd-panel__upload:focus-visible + .skmpd-panel__choose {
	outline: 2px solid var( --skmpd-accent );
	outline-offset: 2px;
}

/* Or use one of ours: three across, the same grid as the pattern list. */

.skmpd-panel__presets {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 7px;
	margin: 0;
}

.skmpd-editor__panel .skmpd-panel button.skmpd-panel__preset {
	position: relative;
	height: 56px;
	min-height: 56px;
	padding: 0;
	overflow: hidden;
	border-radius: 8px;
	background: var( --skmpd-sunken );
}

.skmpd-panel__preset img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.skmpd-panel__error {
	margin: 12px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var( --skmpd-danger );
}

.skmpd-panel__error[hidden] {
	display: none;
}
