.sotds-designer {
	--sotds-navy: #082a4a;
	--sotds-yellow: #f4c430;
	--sotds-gray-50: #f6f7f9;
	--sotds-gray-200: #dce1e7;
	--sotds-gray-600: #536170;
	--sotds-white: #ffffff;
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(1rem, 3vw, 2.5rem);
	color: var(--sotds-navy);
	box-sizing: border-box;
	font-family: inherit;
}

.sotds-designer *,
.sotds-designer *::before,
.sotds-designer *::after {
	box-sizing: border-box;
}

.sotds-designer__header {
	margin-bottom: 1.5rem;
}

.sotds-designer__header h1 {
	margin: 0.2rem 0 0.5rem;
	font-size: clamp(1.75rem, 4vw, 2.6rem);
	line-height: 1.1;
}

.sotds-designer__header p {
	margin: 0;
}

.sotds-designer__eyebrow {
	color: #745c00;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.sotds-guide-callout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 1rem;
	align-items: center;
	margin-top: 1.25rem;
	padding: clamp(1rem, 2.5vw, 1.4rem);
	border: 3px solid var(--sotds-yellow);
	border-radius: 14px;
	background: #fff8d6;
	box-shadow: 0 10px 28px rgba(8, 42, 74, 0.12);
}

.sotds-guide-callout__copy {
	display: grid;
	gap: 0.25rem;
}

.sotds-guide-callout__copy strong {
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	line-height: 1.2;
}

.sotds-guide-callout__copy span {
	color: #24384a;
	font-size: 1rem;
	line-height: 1.5;
}

.sotds-guide-callout__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 58px;
	padding: 0.9rem 1.35rem;
	border: 3px solid var(--sotds-navy);
	border-radius: 10px;
	background: var(--sotds-yellow);
	color: #111827 !important;
	font-size: clamp(1rem, 1.7vw, 1.18rem);
	font-weight: 900;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 5px 0 var(--sotds-navy);
	transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.sotds-guide-callout__button:hover,
.sotds-guide-callout__button:focus-visible {
	background: #ffd84a;
	color: #111827 !important;
	transform: translateY(-2px);
	box-shadow: 0 7px 0 var(--sotds-navy);
}

.sotds-guide-callout__button:focus-visible {
	outline: 3px solid #1677c8;
	outline-offset: 3px;
}

.sotds-designer__layout {
	display: grid;
	grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
	min-height: 560px;
	border: 1px solid var(--sotds-gray-200);
	border-radius: 18px;
	overflow: visible;
	background: var(--sotds-white);
	box-shadow: 0 18px 50px rgba(8, 42, 74, 0.12);
}

.sotds-panel {
	padding: 1.5rem;
	border-radius: 18px 0 0 18px;
	background: var(--sotds-navy);
	color: var(--sotds-white);
}

.sotds-field + .sotds-field {
	margin-top: 1.25rem;
}

.sotds-field label {
	display: block;
	margin-bottom: 0.45rem;
	font-weight: 700;
}

.sotds-field select {
	display: block;
	width: 100%;
	min-height: 46px;
	padding: 0.65rem 2.4rem 0.65rem 0.75rem;
	border: 2px solid transparent;
	border-radius: 8px;
	background: var(--sotds-white);
	color: #111827;
	font: inherit;
}

.sotds-field input[type="number"],
.sotds-field input[type="range"] {
	display: block;
	width: 100%;
}

.sotds-field input[type="number"] {
	min-height: 46px;
	padding: 0.65rem 0.75rem;
	border: 2px solid transparent;
	border-radius: 8px;
	font: inherit;
}

.sotds-custom-size {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin-top: 1rem;
	padding: 0.85rem;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
}

.sotds-custom-size[hidden] {
	display: none;
}

.sotds-custom-size .sotds-field {
	margin: 0;
}

.sotds-custom-size .sotds-field:last-child {
	grid-column: 1 / -1;
}

.sotds-panel h2 {
	margin: 0 0 0.75rem;
	color: var(--sotds-white);
	font-size: 1rem;
}

.sotds-panel__section {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.sotds-text-adder {
	display: grid;
	gap: 0.5rem;
	margin-top: 1rem;
}

.sotds-text-adder label {
	font-weight: 700;
}

.sotds-text-adder input,
.sotds-text-adder button,
.sotds-upload,
.sotds-layer-controls button {
	min-height: 42px;
	border: 0;
	border-radius: 8px;
	font: inherit;
}

.sotds-text-adder input {
	width: 100%;
	padding: 0.65rem 0.75rem;
}

.sotds-text-adder button,
.sotds-upload,
.sotds-layer-controls button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 0.85rem;
	cursor: pointer;
	font-weight: 800;
}

.sotds-text-adder button,
.sotds-upload {
	background: var(--sotds-yellow);
	color: #1f2933;
}

.sotds-upload {
	width: 100%;
}

.sotds-panel small {
	display: block;
	margin-top: 0.4rem;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.75rem;
}

.sotds-field input[type="color"] {
	display: block;
	width: 100%;
	height: 42px;
	padding: 3px;
	border: 0;
	border-radius: 8px;
	background: var(--sotds-white);
}

.sotds-shadow-controls {
	display: grid;
	grid-template-columns: 1fr 48px;
	gap: 0.65rem;
	align-items: center;
	margin-top: 1rem;
}

.sotds-shadow-controls[hidden] {
	display: none;
}

.sotds-shadow-controls label {
	font-weight: 700;
}

.sotds-shadow-controls input[type="color"] {
	width: 48px;
	height: 38px;
	padding: 2px;
	border: 0;
	border-radius: 6px;
}

.sotds-shadow-controls input[type="range"] {
	grid-column: 1 / -1;
	width: 100%;
}

.sotds-shadow-controls select {
	grid-column: 1 / -1;
	min-height: 42px;
	padding: 0.55rem 0.7rem;
	border: 0;
	border-radius: 8px;
	font: inherit;
}

.sotds-layer-controls {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
	margin-top: 1rem;
}

.sotds-layer-controls button {
	background: var(--sotds-white);
	color: var(--sotds-navy);
	font-size: 0.8rem;
}

.sotds-layer-controls .sotds-button--danger {
	grid-column: 1 / -1;
	background: #a62b2b;
	color: var(--sotds-white);
}

.sotds-text-adder button:focus-visible,
.sotds-upload:focus-within,
.sotds-layer-controls button:focus-visible,
.sotds-element:focus-visible {
	outline: 3px solid var(--sotds-yellow);
	outline-offset: 2px;
}

.sotds-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.sotds-field select:focus-visible {
	border-color: var(--sotds-yellow);
	outline: 3px solid rgba(244, 196, 48, 0.35);
	outline-offset: 2px;
}

.sotds-panel__notice {
	display: grid;
	gap: 0.35rem;
	margin-top: 2rem;
	padding: 1rem;
	border-left: 4px solid var(--sotds-yellow);
	border-radius: 0 8px 8px 0;
	background: rgba(255, 255, 255, 0.09);
	font-size: 0.9rem;
}

.sotds-workspace {
	position: sticky;
	top: 1rem;
	display: flex;
	align-self: start;
	min-width: 0;
	max-height: calc(100vh - 2rem);
	flex-direction: column;
	border-radius: 0 18px 18px 0;
	background: var(--sotds-gray-50);
	overflow: hidden;
}

.admin-bar .sotds-workspace {
	top: 48px;
	max-height: calc(100vh - 64px);
}

.sotds-workspace__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 58px;
	padding: 0.8rem 1.25rem;
	border-bottom: 1px solid var(--sotds-gray-200);
	background: var(--sotds-white);
}

.sotds-workspace__toolbar span {
	color: var(--sotds-gray-600);
}

.sotds-stage-wrap {
	display: grid;
	flex: 1;
	place-items: center;
	padding: clamp(1.25rem, 4vw, 3rem);
}

.sotds-stage {
	position: relative;
	display: grid;
	width: min(100%, 760px, calc((100vh - 180px) * var(--sotds-aspect, 2)));
	aspect-ratio: var(--sotds-aspect, 2);
	place-items: center;
	border: 1px solid #c8ced6;
	background-color: var(--sotds-white);
	background-image:
		linear-gradient(45deg, #eef1f4 25%, transparent 25%),
		linear-gradient(-45deg, #eef1f4 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #eef1f4 75%),
		linear-gradient(-45deg, transparent 75%, #eef1f4 75%);
	background-position: 0 0, 0 10px, 10px -10px, -10px 0;
	background-size: 20px 20px;
	box-shadow: 0 12px 28px rgba(8, 42, 74, 0.14);
	overflow: hidden;
	touch-action: none;
}

.sotds-dimension {
	position: absolute;
	z-index: 20;
	padding: 0.2rem 0.45rem;
	border-radius: 5px;
	background: var(--sotds-navy);
	color: var(--sotds-white);
	font-size: 0.72rem;
	font-weight: 800;
	pointer-events: none;
}

.sotds-dimension--width {
	left: 50%;
	top: 6px;
	transform: translateX(-50%);
}

.sotds-dimension--height {
	left: 6px;
	top: 50%;
	transform: translateY(-50%) rotate(-90deg);
}

.sotds-stage-size-handle {
	position: absolute;
	right: 5px;
	bottom: 5px;
	z-index: 25;
	width: 24px;
	height: 24px;
	border: 3px solid var(--sotds-white);
	border-radius: 5px;
	background: var(--sotds-yellow);
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
	cursor: nwse-resize;
	touch-action: none;
}

.sotds-stage__safe-area {
	position: absolute;
	inset: 1rem;
	display: grid;
	place-content: center;
	border: 2px dashed rgba(8, 42, 74, 0.32);
	color: var(--sotds-navy);
	text-align: center;
}

.sotds-stage.has-elements .sotds-stage__safe-area {
	display: none;
}

.sotds-canvas {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.sotds-element {
	--sotds-rotation: 0deg;
	--sotds-perspective-y: 0deg;
	position: absolute;
	left: 50%;
	top: 50%;
	width: 30%;
	min-width: 36px;
	transform: translate(-50%, -50%) perspective(600px) rotate(var(--sotds-rotation)) rotateY(var(--sotds-perspective-y));
	transform-origin: center;
	cursor: move;
	user-select: none;
	touch-action: none;
}

.sotds-element__content {
	position: relative;
	z-index: 2;
	display: block;
	width: 100%;
	min-height: 1em;
	pointer-events: none;
}

.sotds-element__shadow {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	min-height: 1em;
	font-size: clamp(18px, 3vw, 42px);
	font-weight: 700;
	line-height: 1.1;
	text-align: center;
	white-space: pre-wrap;
	word-break: break-word;
	pointer-events: none;
}

.sotds-element__shadow[hidden] {
	display: none;
}

.sotds-element--image .sotds-element__content {
	height: auto;
}

.sotds-element--text .sotds-element__content {
	color: var(--sotds-navy);
	font-size: clamp(18px, 3vw, 42px);
	font-weight: 700;
	line-height: 1.1;
	text-align: center;
	white-space: pre-wrap;
	word-break: break-word;
}

.sotds-element.is-selected::after {
	position: absolute;
	inset: -5px;
	border: 2px solid #1677d2;
	content: "";
	pointer-events: none;
}

.sotds-handle {
	position: absolute;
	z-index: 10;
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid var(--sotds-white);
	border-radius: 50%;
	background: #1677d2;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.sotds-element.is-selected .sotds-handle {
	display: block;
}

.sotds-handle--resize {
	right: -13px;
	bottom: -13px;
	cursor: nwse-resize;
}

.sotds-handle--rotate {
	left: 50%;
	top: -34px;
	transform: translateX(-50%);
	cursor: grab;
}

.sotds-handle--rotate::after {
	position: absolute;
	left: 50%;
	top: 16px;
	width: 2px;
	height: 14px;
	background: #1677d2;
	content: "";
	transform: translateX(-50%);
}

.sotds-handle--perspective {
	right: -13px;
	top: 50%;
	transform: translateY(-50%);
	border-radius: 4px;
	background: #7a3fc2;
	cursor: ew-resize;
}

.sotds-handle--shadow {
	left: -34px;
	bottom: -34px;
	display: none !important;
	border-radius: 4px;
	background: #343a40;
	cursor: move;
}

.sotds-element.is-selected.has-shadow .sotds-handle--shadow {
	display: block !important;
}

.sotds-pointer-callout {
	position: fixed;
	z-index: 1000000;
	width: max-content;
	max-width: min(280px, calc(100vw - 20px));
	padding: 0.4rem 0.6rem;
	border-radius: 5px;
	background: var(--sotds-navy);
	color: var(--sotds-white);
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
	pointer-events: none;
}

.sotds-pointer-callout[hidden] {
	display: none;
}

.sotds-status {
	min-height: 1.4em;
	margin: 0.5rem 0 0;
	color: var(--sotds-gray-600);
	font-size: 0.82rem;
	text-align: center;
}

.sotds-submit {
	margin-top: 2rem;
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 1px solid var(--sotds-gray-200);
	border-radius: 18px;
	background: var(--sotds-white);
	box-shadow: 0 12px 32px rgba(8, 42, 74, 0.1);
}

.sotds-submit h2 { margin: 0 0 0.35rem; color: var(--sotds-navy); }
.sotds-submit > p { margin: 0 0 1.25rem; color: var(--sotds-gray-600); }
.sotds-submit__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sotds-submit .sotds-field { margin-top: 1rem; }
.sotds-submit__grid .sotds-field { margin-top: 0; }
.sotds-submit input[type="text"], .sotds-submit input[type="email"], .sotds-submit input[type="tel"], .sotds-submit textarea {
	display: block; width: 100%; min-height: 46px; padding: 0.7rem 0.8rem; border: 1px solid #aeb8c3; border-radius: 8px; font: inherit;
}
.sotds-submit textarea { resize: vertical; }
.sotds-fulfillment { display: flex; align-items: center; gap: 1.2rem; margin: 0; padding: 0.75rem; border: 1px solid #aeb8c3; border-radius: 8px; }
.sotds-fulfillment legend { padding: 0 0.35rem; font-weight: 700; }
.sotds-fulfillment label, .sotds-consent { display: flex; align-items: flex-start; gap: 0.45rem; }
.sotds-consent { margin-top: 1rem; font-weight: 600; }
.sotds-submit__button { margin-top: 1.25rem; min-height: 48px; padding: 0.75rem 1.2rem; border: 0; border-radius: 8px; background: var(--sotds-yellow); color: #1f2933; font: inherit; font-weight: 800; cursor: pointer; }
.sotds-submit__button:disabled { cursor: wait; opacity: 0.7; }
.sotds-submit__result { min-height: 1.5em; margin-top: 0.8rem; font-weight: 700; }
.sotds-submit__result.is-success { padding: 0.8rem; border-radius: 8px; background: #e5f6eb; color: #176b37; }
.sotds-submit__result.is-error { color: #a62b2b; }
.sotds-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.sotds-stage__safe-area span {
	font-size: clamp(1.15rem, 3vw, 1.8rem);
	font-weight: 800;
}

.sotds-stage__safe-area small {
	margin-top: 0.35rem;
	color: var(--sotds-gray-600);
}

@media (max-width: 760px) {
	.sotds-guide-callout {
		grid-template-columns: 1fr;
	}

	.sotds-guide-callout__button {
		width: 100%;
	}

	.sotds-designer__layout {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.sotds-panel {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
		border-radius: 18px 18px 0 0;
	}

	.sotds-workspace,
	.admin-bar .sotds-workspace {
		position: static;
		max-height: none;
		border-radius: 0 0 18px 18px;
		overflow: visible;
	}

	.sotds-stage {
		width: min(100%, 760px);
	}

	.sotds-field + .sotds-field,
	.sotds-panel__section,
	.sotds-panel__notice {
		margin-top: 0;
	}

	.sotds-panel__section {
		padding-top: 0;
		border-top: 0;
	}

	.sotds-panel__notice {
		grid-column: 1 / -1;
	}

	.sotds-stage-wrap {
		min-height: 360px;
		padding: 1rem;
	}
}

@media (max-width: 480px) {
	.sotds-panel {
		grid-template-columns: 1fr;
	}

	.sotds-workspace__toolbar {
		align-items: flex-start;
		flex-direction: column;
		gap: 0.1rem;
	}

	.sotds-stage-wrap {
		min-height: 300px;
	}

	.sotds-submit__grid { grid-template-columns: 1fr; }
	.sotds-fulfillment { align-items: flex-start; flex-direction: column; }
}
