.lce-editor {
	--lce-split: 50%;
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid #ccd0d4;
	border-radius: 6px;
	background: #1e1e1e;
	color: #e0e0e0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	overflow: hidden;
	box-sizing: border-box;
}
.lce-editor * { box-sizing: border-box; }

.lce-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	background: #2d2d2d;
	border-bottom: 1px solid #3c3c3c;
	flex-wrap: wrap;
}
.lce-toolbar-left,
.lce-toolbar-center,
.lce-toolbar-right {
	display: flex;
	align-items: center;
	gap: 6px;
}
.lce-toolbar-center { margin-left: auto; }
.lce-toolbar-right { margin-left: auto; }

.lce-btn {
	background: #3c3c3c;
	color: #e0e0e0;
	border: 1px solid #555;
	border-radius: 4px;
	padding: 4px 8px;
	font-size: 12px;
	cursor: pointer;
	line-height: 1.4;
}
.lce-btn:hover { background: #4a4a4a; }
.lce-btn.active { background: #0e639c; border-color: #1177bb; }
.lce-publish { background: #1a7f37; border-color: #2ea043; }
.lce-publish:hover { background: #2ea043; }
.lce-download { background: #0e639c; border-color: #1177bb; }
.lce-download:hover { background: #1177bb; }
.lce-layout-btn { font-size: 14px; padding: 2px 6px; }
.lce-auto-label { font-size: 12px; display: flex; align-items: center; gap: 4px; }

.lce-main {
	display: flex;
	flex: 1;
	min-height: 0;
	position: relative;
}
.lce-layout-right .lce-main { flex-direction: row; }
.lce-layout-left .lce-main { flex-direction: row-reverse; }
.lce-layout-top .lce-main { flex-direction: column-reverse; }
.lce-layout-bottom .lce-main { flex-direction: column; }

.lce-code-pane {
	flex: 0 0 var(--lce-split);
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	background: #1e1e1e;
}
.lce-preview-pane {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	background: #fff;
}

.lce-resizer {
	flex: 0 0 6px;
	background: #3c3c3c;
	cursor: col-resize;
	position: relative;
	z-index: 2;
}
.lce-layout-top .lce-resizer,
.lce-layout-bottom .lce-resizer {
	cursor: row-resize;
}
.lce-resizer:hover,
.lce-resizer:focus {
	background: #0e639c;
	outline: none;
}

.lce-tabs {
	display: flex;
	background: #252526;
	border-bottom: 1px solid #3c3c3c;
}
.lce-tab {
	background: transparent;
	border: none;
	color: #ccc;
	padding: 8px 14px;
	cursor: pointer;
	font-size: 12px;
	border-bottom: 2px solid transparent;
}
.lce-tab:hover { color: #fff; }
.lce-tab.active { color: #fff; border-bottom-color: #0e639c; }

.lce-editors { flex: 1; min-height: 0; position: relative; }
.lce-editor-pane { display: none; height: 100%; }
.lce-editor-pane.active { display: block; }
.lce-editor-pane .CodeMirror {
	height: 100%;
	font-size: 13px;
	line-height: 1.5;
}

.lce-preview-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 10px;
	background: #f0f0f1;
	border-bottom: 1px solid #dcdcde;
	font-size: 12px;
	color: #1d2327;
}
.lce-preview-frame {
	flex: 1;
	width: 100%;
	border: 0;
	background: #fff;
}

.lce-console {
	display: none;
	flex-direction: column;
	height: 140px;
	background: #1e1e1e;
	border-top: 1px solid #3c3c3c;
}
.lce-console.open { display: flex; }
.lce-console-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 4px 8px;
	background: #2d2d2d;
	font-size: 12px;
	color: #ccc;
}
.lce-console-output {
	flex: 1;
	overflow: auto;
	padding: 4px 8px;
	font-family: monospace;
	font-size: 12px;
	line-height: 1.4;
}
.lce-console-line {
	border-bottom: 1px solid #2a2a2a;
	padding: 2px 0;
	white-space: pre-wrap;
	word-break: break-word;
}
.lce-console-line.error { color: #f48771; }
.lce-console-line.warn { color: #dcdcaa; }
.lce-console-line.log { color: #d4d4d4; }

.lce-console-badge {
	background: #0e639c;
	color: #fff;
	border-radius: 8px;
	padding: 0 5px;
	font-size: 10px;
	margin-left: 4px;
}