.markdown-html-card {
	padding: 24px;
}

.markdown-html-workspace {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-top: 20px;
	box-sizing: border-box;
}

.markdown-html-panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	height: min(600px, calc(100vh - 180px));
	min-height: 0;
	overflow: hidden;
	box-sizing: border-box;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
}

.markdown-html-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	min-height: 54px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--line);
	background: var(--bg);
}

.markdown-html-panel-header label,
.markdown-html-panel-header>span {
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
}

.markdown-html-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.markdown-html-card .secondary-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 7px 14px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink);
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.markdown-html-card .secondary-button:hover {
	background: var(--soft);
	border-color: var(--blue);
	color: var(--blue);
}

.markdown-html-card .secondary-button:active {
	transform: translateY(1px);
}

.markdown-html-card .secondary-button:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
}

.markdown-html-textarea {
	display: block;
	flex: 1;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	min-height: 0;
	padding: 18px;
	border: 0;
	outline: none;
	resize: none;
	background: var(--surface);
	color: var(--ink);
	font-family: Consolas, Monaco, "Courier New", monospace;
	font-size: 14px;
	line-height: 1.7;
	tab-size: 4;
}

.markdown-html-textarea:focus {
	box-shadow: inset 0 0 0 2px var(--blue);
}

.markdown-html-output {
	background: var(--bg);
	white-space: pre;
	overflow: auto;
}

.markdown-html-stats {
	flex-shrink: 0;
	padding: 10px 16px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 12px;
	text-align: right;
}

.markdown-html-card .status-message {
	margin-top: 14px;
}

.markdown-html-panel textarea {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	display: block;
	resize: vertical;
}

@media (max-width: 850px) {
	.markdown-html-workspace {
		grid-template-columns: 1fr;
	}

	.markdown-html-panel {
		height: 500px;
		max-height: calc(100vh - 140px);
	}
}

@media (max-width: 520px) {
	.markdown-html-card {
		padding: 14px;
	}

	.markdown-html-panel-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.markdown-html-actions {
		width: 100%;
	}

	.markdown-html-actions button {
		flex: 1;
	}

	.markdown-html-textarea {
		padding: 14px;
		font-size: 13px;
	}
}