/* HTML CSS JS Playground — component styles only. */
.lhpg,
.lhpg *,
.lhpg *::before,
.lhpg *::after {
	box-sizing: border-box;
}

.lhpg {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	height: var(--lhpg-height, 520px);
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid #d9e1eb;
	border-radius: 12px;
	background: #fff;
	color: #243247;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	text-align: start;
	box-shadow: 0 2px 8px rgb(26 42 63 / 4%);
}

.lhpg [hidden] {
	display: none !important;
}

.lhpg .lhpg-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.lhpg .lhpg-header {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 64px;
	margin: 0;
	padding: 12px 16px;
	border-bottom: 1px solid #e4e9f0;
	background: #fff;
}

.lhpg .lhpg-title {
	margin: 0;
	padding: 0;
	color: #243247;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
}

.lhpg .lhpg-actions {
	display: flex;
	flex: 0 1 auto;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.lhpg .lhpg-actions button {
	flex: 0 0 auto;
	white-space: nowrap;
}

.lhpg .lhpg-toolbar {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	min-width: 0;
	margin: 0;
	padding: 4px 16px;
	border-bottom: 1px solid #e4e9f0;
	background: #fff;
}

.lhpg .lhpg-completion-switch {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	margin: 0;
	padding: 0;
	color: #40526b;
	font: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	text-transform: none;
	cursor: pointer;
	user-select: none;
}

.lhpg .lhpg-completion-switch [data-lhpg-autoclose] {
	appearance: none;
	position: relative;
	display: inline-block;
	flex: 0 0 36px;
	width: 36px;
	min-width: 36px;
	max-width: 36px;
	height: 22px;
	min-height: 22px;
	margin: 0;
	padding: 0;
	border: 1px solid #8e9db0;
	border-radius: 999px;
	background: #aebaca;
	box-shadow: none;
	cursor: pointer;
}

.lhpg .lhpg-completion-switch [data-lhpg-autoclose]::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	display: block;
	width: 16px;
	height: 16px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgb(26 42 63 / 16%);
	transform: translateX(0);
}

.lhpg .lhpg-completion-switch [data-lhpg-autoclose]::after {
	content: none;
}

.lhpg .lhpg-completion-switch [data-lhpg-autoclose]:checked {
	border-color: #2366c4;
	background: #2366c4;
}

.lhpg .lhpg-completion-switch [data-lhpg-autoclose]:checked::before {
	transform: translateX(14px);
}

.lhpg .lhpg-completion-switch [data-lhpg-autoclose]:focus-visible {
	outline: 3px solid #80b4ff;
	outline-offset: 3px;
}

.lhpg .lhpg-completion-switch [data-lhpg-autoclose]:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.lhpg [data-lhpg-autoclose-state] {
	min-width: 26px;
	color: #63738a;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
}

.lhpg [data-lhpg-autoclose]:checked ~ [data-lhpg-autoclose-state] {
	color: #194f9c;
}

.lhpg button {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	margin: 0;
	padding: 7px 13px;
	border: 1px solid #cdd7e5;
	border-radius: 6px;
	background: #fff;
	color: #40526b;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: normal;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}

.lhpg button:hover:not(:disabled) {
	border-color: #8ba9d5;
	background: #f0f5fc;
	color: #204d8c;
}

.lhpg button:focus-visible {
	outline: 3px solid #80b4ff;
	outline-offset: 2px;
	position: relative;
	z-index: 1;
}

.lhpg button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.lhpg [data-lhpg-run] {
	min-width: 76px;
	border-color: #2366c4;
	background: #2366c4;
	color: #fff;
}

.lhpg [data-lhpg-run]:hover:not(:disabled) {
	border-color: #174f9f;
	background: #174f9f;
	color: #fff;
}

.lhpg .lhpg-tabs {
	display: flex;
	flex: 0 0 auto;
	gap: 0;
	min-width: 0;
	margin: 0;
	padding: 0 8px;
	overflow-x: auto;
	border-bottom: 1px solid #e4e9f0;
	background: #f5f7fa;
}

.lhpg [data-lhpg-tab] {
	flex: 0 0 auto;
	min-height: 42px;
	padding: 10px 14px;
	border: 0;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	background: transparent;
	white-space: nowrap;
}

.lhpg [data-lhpg-tab][aria-selected="true"] {
	border-bottom-color: #2366c4;
	background: #fff;
	color: #194f9c;
}

.lhpg [data-lhpg-tab]:focus-visible {
	outline-offset: -4px;
}

.lhpg .lhpg-panels {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

.lhpg .lhpg-panel {
	display: flex;
	flex: 1 1 0;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

.lhpg [data-lhpg-code] {
	appearance: none;
	display: block;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	max-width: none;
	height: 100%;
	min-height: 0;
	max-height: none;
	margin: 0;
	padding: 16px;
	overflow: auto;
	resize: none;
	border: 0;
	border-radius: 0;
	background: #fbfcfe;
	color: #243247;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.65;
	letter-spacing: normal;
	tab-size: 2;
	text-align: left;
	text-indent: 0;
	text-transform: none;
	white-space: pre;
	word-wrap: normal;
	box-shadow: none;
}

.lhpg [data-lhpg-code]::placeholder {
	color: #7b899b;
	opacity: 1;
}

.lhpg [data-lhpg-code]:focus {
	outline: 0;
	box-shadow: inset 0 0 0 2px #80b4ff;
}

.lhpg .lhpg-width-switch,
.lhpg .lhpg-width-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
}

.lhpg [data-lhpg-width][aria-pressed="true"] {
	border-color: #8aafdF;
	background: #edf4ff;
	color: #194f9c;
}

.lhpg .lhpg-preview-viewport {
	display: flex;
	flex: 1 1 0;
	align-items: stretch;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: auto;
	background: #edf1f6;
}

.lhpg .lhpg-preview-stage {
	flex: 0 0 auto;
	width: 100%;
	min-width: 0;
	max-width: none;
	height: 100%;
	min-height: 100%;
	margin: 0 auto;
	padding: 0;
	background: #fff;
}

.lhpg .lhpg-frame {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: none;
	height: 100%;
	min-height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
}

.lhpg .lhpg-placeholder,
.lhpg .lhpg-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	margin: 0;
	padding: 24px;
	color: #69798f;
	font: inherit;
	font-size: 13px;
	line-height: 1.8;
	text-align: center;
	overflow-wrap: anywhere;
}

.lhpg .lhpg-status {
	flex: 0 0 auto;
	min-width: 0;
	min-height: 43px;
	margin: 0;
	padding: 11px 14px;
	border-top: 1px solid #e4e9f0;
	background: #f8fafc;
	color: #63738a;
	font: inherit;
	font-size: 12px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.lhpg .lhpg-status[data-tone="error"] {
	background: #fff5f4;
	color: #a12b25;
}

.lhpg .lhpg-status[data-tone="success"] {
	color: #23603d;
}

.lhpg noscript {
	margin: 0;
	padding: 12px 14px;
	background: #fff5f4;
	color: #a12b25;
	font: inherit;
	font-size: 13px;
}

@media (max-width: 480px) {
	.lhpg .lhpg-header {
		padding: 10px 12px;
	}

	.lhpg [data-lhpg-code] {
		padding: 12px;
		font-size: 16px;
	}
}

@media (forced-colors: active) {
	.lhpg .lhpg-completion-switch [data-lhpg-autoclose] {
		appearance: auto;
		flex-basis: 22px;
		width: 22px;
		min-width: 22px;
		max-width: 22px;
		border: 0;
		background: transparent;
	}

	.lhpg .lhpg-completion-switch [data-lhpg-autoclose]::before {
		display: none;
	}
}
