.editor-region-switch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 2.75rem;
	padding: 0 0.75rem;
	border: 1px solid #dce3de;
	border-radius: 0.65rem;
	background: #fff;
	color: var(--editor-brand-dark);
	font-size: 0.72rem;
	font-weight: 700;
}

.editor-region-switch svg {
	width: 1rem;
	height: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.editor-region-switch:focus-visible {
	outline: 0.18rem solid rgba(36, 54, 42, 0.55);
	outline-offset: 0.12rem;
}

.editor-region-switch--preview {
	margin-top: 1rem;
	background: var(--editor-brand-dark);
	box-shadow: 0 0.4rem 1rem rgba(36, 54, 42, 0.15);
	color: #fff;
}

@media (max-width: 64rem) and (min-width: 48rem) {
	:root {
		--editor-panel-width: 22.5rem;
	}

	.editor-panel {
		padding-inline: 1.15rem;
	}

	.editor-canvas__viewport {
		padding: 1.4rem;
	}
}

@media (max-width: 47.99rem) {
	.editor-body {
		overflow: hidden;
	}

	.editor-app {
		height: 100vh;
		height: 100svh;
		min-height: 0;
		grid-template-rows: calc(3.9rem + env(safe-area-inset-top)) minmax(0, 1fr);
	}

	.editor-topbar__content {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 0.8rem;
		padding-top: env(safe-area-inset-top);
		padding-right: max(0.95rem, env(safe-area-inset-right));
		padding-left: max(0.95rem, env(safe-area-inset-left));
	}

	.editor-brand {
		gap: 0.55rem;
	}

	.editor-brand__logo {
		max-width: 8rem;
		height: 2.45rem;
	}

	.editor-topbar__actions {
		grid-column: 2;
	}

	.editor-action {
		height: 2.75rem;
		padding-inline: 0.75rem;
	}

	.editor-shell {
		position: relative;
		display: block;
		overflow: hidden;
	}

	.editor-panel,
	.editor-preview {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		min-height: 0;
		transition: transform 180ms ease, opacity 180ms ease, visibility 180ms;
	}

	.editor-panel {
		overflow-x: hidden;
		overflow-y: auto;
		padding: 1.4rem max(1rem, env(safe-area-inset-right)) calc(1.8rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
		border-right: 0;
		border-bottom: 0;
	}

	.editor-preview {
		grid-template-rows: auto minmax(0, 1fr);
	}

	.editor-app[data-mobile-region="controls"] .editor-panel,
	.editor-app[data-mobile-region="preview"] .editor-preview {
		z-index: 2;
		visibility: visible;
		opacity: 1;
		transform: translateX(0);
	}

	.editor-app[data-mobile-region="controls"] .editor-preview {
		z-index: 1;
		visibility: hidden;
		opacity: 0;
		transform: translateX(100%);
	}

	.editor-app[data-mobile-region="preview"] .editor-panel {
		z-index: 1;
		visibility: hidden;
		opacity: 0;
		transform: translateX(-100%);
	}

	.editor-preview__header {
		min-height: 6.4rem;
		align-content: center;
		flex-wrap: wrap;
		gap: 0.55rem;
		padding: 0.65rem max(1rem, env(safe-area-inset-right)) 0.65rem max(1rem, env(safe-area-inset-left));
	}

	.editor-preview__title,
	.editor-preview__actions {
		width: 100%;
	}

	.editor-preview__actions {
		justify-content: space-between;
	}

	.editor-canvas__viewport {
		padding: 1.25rem max(1rem, env(safe-area-inset-right)) calc(2rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
	}
}

@media (max-width: 35.99rem) {
	.editor-action__long-label,
	.editor-preview__title small {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.editor-panel,
	.editor-preview {
		transition: none;
	}
}
