#bcApp {
	--bc-ink: #0f172a;
	--bc-muted: #64748b;
	--bc-line: #e2e8f0;
	--bc-soft: #eff6ff;
	--bc-accent: #3b82f6;
	--bc-accent-hover: #2563eb;
	--bc-accent-ink: #1d4ed8;
	--bc-cta: #2563eb;
	--bc-cta-hover: #1d4ed8;
	--bc-radius: 1rem;
	--bc-radius-sm: 0.65rem;
	--bc-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
	--bc-ease: 180ms ease;
}

#bcApp .bc-workspace {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	align-items: start;
}

@media (min-width: 1024px) {
	#bcApp .bc-workspace {
		grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
		gap: 1.5rem;
		align-items: stretch;
	}
}

#bcApp .bc-editor,
#bcApp .bc-preview {
	background: #fff;
	border: 1px solid var(--bc-line);
	border-radius: var(--bc-radius);
	box-shadow: var(--bc-shadow);
	overflow: hidden;
}

#bcApp .bc-editor-inner,
#bcApp .bc-preview-inner {
	padding: 1.15rem 1rem 1.35rem;
}

@media (min-width: 640px) {
	#bcApp .bc-editor-inner,
	#bcApp .bc-preview-inner {
		padding: 1.5rem 1.5rem 1.65rem;
	}
}

#bcApp .bc-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.85rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bc-accent-ink);
}

#bcApp .bc-kicker::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 999px;
	background: var(--bc-accent);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

#bcApp .bc-section {
	padding: 1rem 0;
	border-top: 1px dashed #dbe3ef;
}

#bcApp .bc-section:first-of-type {
	padding-top: 0;
	border-top: 0;
}

#bcApp .bc-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

#bcApp .bc-section-title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--bc-ink);
}

#bcApp .bc-section-desc {
	margin: 0;
	font-size: 0.75rem;
	color: var(--bc-muted);
}

#bcApp .bc-label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #334155;
}

#bcApp .bc-select-wrap {
	position: relative;
}

#bcApp .bc-select-chevron {
	position: absolute;
	right: 0.7rem;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	color: #9ca3af;
	pointer-events: none;
}

#bcApp .bc-btn:focus-visible {
	outline: 2px solid var(--bc-accent);
	outline-offset: 2px;
}

#bcApp .bc-hint {
	margin: 0.45rem 0 0;
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--bc-muted);
}

#bcApp .bc-colors {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	#bcApp .bc-colors {
		grid-template-columns: 1fr 1fr;
	}
}

#bcApp .bc-style-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 640px) {
	#bcApp .bc-style-grid {
		grid-template-columns: 1fr 1fr;
	}
}

#bcApp .bc-range-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.35rem;
}

#bcApp .bc-range-value {
	font-size: 0.8125rem;
	font-weight: 700;
	color: #334155;
	font-variant-numeric: tabular-nums;
}

#bcApp .bc-range {
	width: 100%;
	accent-color: var(--bc-accent);
	height: 1.4rem;
	cursor: pointer;
}

#bcApp .bc-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
}

#bcApp .bc-check {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--bc-ink);
	cursor: pointer;
}

#bcApp .bc-check input {
	width: 1rem;
	height: 1rem;
	accent-color: var(--bc-accent);
	cursor: pointer;
}

#bcApp .bc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 2.85rem;
	padding: 0 1.05rem;
	border-radius: 0.75rem;
	border: 1px solid transparent;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color var(--bc-ease), border-color var(--bc-ease), color var(--bc-ease), box-shadow var(--bc-ease);
}

#bcApp .bc-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

#bcApp .bc-btn-cta {
	background: var(--bc-cta);
	color: #fff;
}

#bcApp .bc-btn-cta:hover:not(:disabled) {
	background: var(--bc-cta-hover);
}

#bcApp .bc-btn-block {
	width: 100%;
}

#bcApp .bc-btn-icon {
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
}

#bcApp .bc-preview {
	position: relative;
	display: flex;
	flex-direction: column;
}

#bcApp .bc-preview-inner {
	flex: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
}

@media (min-width: 1024px) {
	#bcApp .bc-preview {
		position: sticky;
		top: 1rem;
	}
}

#bcApp .bc-stage {
	position: relative;
	isolation: isolate;
	flex: 1;
	min-height: 14rem;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	background-color: #fff;
	background-image: repeating-conic-gradient(#e5e7eb 0% 25%, #fff 0% 50%);
	background-size: 16px 16px;
}

#bcApp .bc-stage-frame {
	position: relative;
	z-index: 1;
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
	padding: 0.85rem;
	background: #fff;
	border-radius: var(--bc-radius-sm);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	animation: bcPop 360ms ease;
}

#bcApp .bc-stage-empty {
	position: relative;
	z-index: 1;
	max-width: 14rem;
	margin: 0;
	text-align: center;
	font-size: 0.875rem;
	line-height: 1.55;
	color: #64748b;
}

@keyframes bcPop {
	from { opacity: 0; transform: translateY(8px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

#bcApp .bc-stage canvas {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	background: #fff;
}

#bcApp .bc-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 1rem;
}

#bcApp .bc-meta span {
	display: inline-flex;
	align-items: center;
	min-height: 1.7rem;
	padding: 0.15rem 0.65rem;
	border-radius: 999px;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	color: #64748b;
	font-size: 0.75rem;
	font-weight: 600;
}

#bcApp .bc-preview-actions {
	margin-top: 1rem;
}

#bcApp .is-invalid {
	border-color: #f87171;
}

#bcApp .is-invalid:focus {
	border-color: #ef4444;
	--tw-ring-color: #fecaca;
}

#bcApp .bc-alert {
	margin-top: 0.85rem;
	padding: 0.7rem 0.85rem;
	border-radius: 0.75rem;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	font-size: 0.8125rem;
	line-height: 1.45;
}

#bcApp .bc-note {
	display: flex;
	align-items: flex-start;
	gap: 0.45rem;
	margin: 0.85rem 0 0;
	font-size: 0.75rem;
	line-height: 1.55;
	color: var(--bc-muted);
}

#bcApp .bc-note-icon {
	width: 0.95rem;
	height: 0.95rem;
	margin-top: 0.15rem;
	flex-shrink: 0;
	color: var(--bc-accent);
}

#bcApp .bc-notes {
	background: #fff;
	border: 1px solid var(--bc-line);
	border-radius: var(--bc-radius);
	box-shadow: var(--bc-shadow);
}

#bcApp .bc-notes a {
	color: #2563eb;
}

#bcApp .bc-notes code {
	font-size: 0.85em;
	background: var(--bc-soft);
	padding: 0.05em 0.3em;
	border-radius: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
	#bcApp .bc-btn,
	#bcApp .bc-stage-frame {
		animation: none !important;
		transition: none !important;
	}
}
