.atc-post-composer {
	--atc-pc-accent: #28c8c8;
	padding: clamp(16px, 3vw, 32px);
	border: 1px solid #dce5e1;
	border-radius: 16px;
	background: #fff;
	color: #28c8c8;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
}

/* Keep theme resets outside the widget; explicitly own typography and control states. */
.atc-post-composer *,
.atc-post-composer *::before,
.atc-post-composer *::after { box-sizing: border-box; }
.atc-post-composer [hidden] { display: none !important; }
.atc-post-composer .atc-pc__heading { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.3; color: inherit; }
.atc-post-composer p { margin: 0 0 12px; }
.atc-post-composer .atc-pc__intro { color: #54665f; }
.atc-post-composer .atc-pc__upload {
	display: grid;
	gap: 10px;
	padding: 20px;
	margin: 20px 0 12px;
	border: 2px dashed #a7bfb5;
	border-radius: 12px;
	background: #f5f9f7;
	font-weight: 600;
}
.atc-post-composer .atc-pc__upload span,
.atc-post-composer .atc-pc__preview p,
.atc-post-composer .atc-pc__result p { font-size: 13px; font-weight: 400; color: #54665f; }
.atc-post-composer input[type="file"] { width: 100%; max-width: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.atc-post-composer .atc-pc__status { min-height: 26px; margin-block: 12px 20px; overflow-wrap: anywhere; }
.atc-post-composer .atc-pc__workspace { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); align-items: start; gap: 24px; }
.atc-post-composer .atc-pc__preview { display: flex; flex-direction: column; align-self: stretch; min-width: 0; text-align: center; }
.atc-post-composer .atc-pc__ratio-mode { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.atc-post-composer .atc-pc__ratio-mode button[type="button"] { min-width: 0; padding-inline: 8px; }
.atc-post-composer .atc-pc__drag-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.atc-post-composer .atc-pc__drag-mode button[type="button"] { min-width: 0; padding-inline: 12px; }
.atc-post-composer .atc-pc__ratio-mode button[aria-pressed="true"],
.atc-post-composer .atc-pc__drag-mode button[aria-pressed="true"] { background: var(--atc-pc-accent); color: #fff; box-shadow: inset 0 0 0 1px var(--atc-pc-accent); }
.atc-post-composer .atc-pc__preview > .atc-pc__actions { margin-top: auto; padding-top: 12px; }
.atc-post-composer .atc-pc__preview > .atc-pc__actions > * { flex: 1 1 0; }
.atc-post-composer canvas {
	display: block;
	align-self: center;
	flex: none;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 680px;
	margin: 0 auto 12px;
	background-color: #e6ebe8;
	background-image: conic-gradient(#d4ddd7 25%, transparent 0 50%, #d4ddd7 0 75%, transparent 0);
	background-size: 20px 20px;
	touch-action: none;
	cursor: move;
}
.atc-post-composer .atc-pc__controls { display: grid; gap: 16px; min-width: 0; }
.atc-post-composer fieldset { display: grid; gap: 12px; min-width: 0; padding: 16px; margin: 0; border: 1px solid #dce5e1; border-radius: 10px; }
.atc-post-composer legend { display: block; width: auto; max-width: 100%; margin: 0; padding: 0 6px; color: inherit; font-weight: 600; font-size: 16px; line-height: 1.6; white-space: normal; }
.atc-post-composer label { display: block; font-size: 14px; line-height: inherit; vertical-align: baseline; }
.atc-post-composer select[data-control] { display: block; width: 100%; padding: 8px; margin: 6px 0 0; border: 1px solid #a7bfb5; border-radius: 6px; background: #fff; color: #28c8c8; font: inherit; line-height: 1.5; text-transform: none; transition: border-color .16s ease; }
.atc-post-composer select[data-control]:focus { border-color: var(--atc-pc-accent); }
.atc-post-composer .atc-pc__range { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; }
.atc-post-composer output { padding: 0; color: #54665f; font-size: 13px; }
.atc-post-composer input[type="range"] { grid-column: 1 / -1; width: 100%; min-height: 28px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; accent-color: var(--atc-pc-accent); cursor: pointer; }
.atc-post-composer .atc-pc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.atc-post-composer button[type="button"],
.atc-post-composer a[data-action="download"] { touch-action: manipulation; }
.atc-post-composer button[type="button"],
.atc-post-composer a[data-action="download"],
.atc-post-composer input[type="file"]::file-selector-button { appearance: none; display: inline-flex; justify-content: center; align-items: center; width: auto; max-width: 100%; min-height: 44px; margin: 0; padding: 10px 18px; border: 1px solid var(--atc-pc-accent); border-radius: 8px; background: #fff; color: var(--atc-pc-accent); box-shadow: none; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.5; text-align: center; text-transform: none; text-decoration: none; white-space: normal; cursor: pointer; transition: filter .16s ease; }
.atc-post-composer input[type="file"]::file-selector-button { margin-inline-end: 12px; }
.atc-post-composer .atc-pc__primary { background: var(--atc-pc-accent) !important; color: #fff !important; }
.atc-post-composer button[type="button"]:hover:not(:disabled),
.atc-post-composer a[data-action="download"]:hover,
.atc-post-composer input[type="file"]:not(:disabled)::file-selector-button:hover { filter: brightness(.92); }
.atc-post-composer button[type="button"]:focus-visible,
.atc-post-composer a[data-action="download"]:focus-visible,
.atc-post-composer input[data-control]:focus-visible,
.atc-post-composer select[data-control]:focus-visible,
.atc-post-composer canvas[data-role="canvas"][tabindex]:focus-visible { outline: 3px solid var(--atc-pc-accent); outline-offset: 3px; box-shadow: none; }
.atc-post-composer :disabled,
.atc-post-composer button[type="button"]:disabled,
.atc-post-composer input[data-control]:disabled { opacity: .5; cursor: not-allowed; }
.atc-post-composer .atc-pc__result { margin-top: 28px; padding-top: 24px; border-top: 1px solid #dce5e1; scroll-margin-top: var(--atc-pc-scroll-offset, 96px); }
.atc-post-composer .atc-pc__result h4 { margin: 0 0 16px; font-size: 20px; font-weight: 700; line-height: 1.3; color: inherit; }
.atc-post-composer .atc-pc__result img { display: block; width: auto; height: auto; max-width: 100%; max-height: 600px; margin: 0 auto 20px; }
.atc-post-composer .atc-pc__result p { margin-top: 12px; }
@media (max-width: 767px) {
	.atc-post-composer .atc-pc__workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.atc-post-composer canvas { max-height: 65vh; }
	.atc-post-composer .atc-pc__actions > * { flex: 1 1 auto; }
}
