.hxt-editor {
	--hxt-ink: #20342e;
	--hxt-accent: #145748;
	--hxt-muted: #51675f;
	--hxt-line: #dce5df;
	--hxt-white: #fff;
	color: var(--hxt-ink);
	background: #f8faf7;
	border: 1px solid var(--hxt-line);
	border-radius: 18px;
	overflow: hidden;
	font: 16px/1.5 system-ui, sans-serif;
}
.hxt-editor, .hxt-editor * { box-sizing: border-box; }
.hxt-editor [hidden] { display: none !important; }
.hxt-editor :focus-visible { outline: 3px solid #146b57; outline-offset: 3px; }
.hxt-intro {
	padding: clamp(20px, 4vw, 38px);
	border-bottom: 1px solid var(--hxt-line);
	background: #eaf2eb;
}
.hxt-intro h2 { margin: 0; color: var(--hxt-ink); font: 700 clamp(25px, 4vw, 38px)/1.2 system-ui, sans-serif; }
.hxt-intro p { margin: 8px 0 0; color: var(--hxt-muted); }
.hxt-workspace { display: grid; grid-template-columns: minmax(245px, 2fr) minmax(0, 3fr); }
.hxt-controls { padding: clamp(15px, 2.8vw, 27px); background: white; min-width: 0; }
.hxt-label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.hxt-label > span { color: var(--hxt-ink); }
.hxt-editor textarea, .hxt-editor select, .hxt-editor input[type="text"] {
	width: 100%;
	min-width: 0;
	border: 1px solid #9eaea6;
	border-radius: 8px;
	padding: 8px 10px;
	background: white;
	color: var(--hxt-ink);
	font: inherit;
}
.hxt-editor textarea { resize: vertical; font-size: 16px; }
.hxt-input-meta {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 8px;
	color: var(--hxt-muted);
	font-size: 13px;
	margin-top: 7px;
}
.hxt-editor button.hxt-text-button {
	padding: 2px 0;
	background: transparent;
	border: 0;
	color: var(--hxt-accent);
	cursor: pointer;
	font: 600 13px/1.5 system-ui, sans-serif;
	text-decoration: underline;
}
.hxt-toggle { display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; font-size: 14px; font-weight: 600; }
.hxt-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--hxt-accent); }
.hxt-readings { border: 1px solid var(--hxt-line); border-radius: 8px; padding: 9px 11px; background: #f8faf7; }
.hxt-readings summary { cursor: pointer; color: var(--hxt-accent); font-size: 14px; font-weight: 600; }
.hxt-readings summary span { color: #78420d; font-size: 12px; white-space: nowrap; }
.hxt-animation { margin-top: 12px; border: 1px solid var(--hxt-line); border-radius: 8px; padding: 9px 11px; }
.hxt-animation summary { cursor: pointer; color: var(--hxt-accent); font-size: 14px; font-weight: 600; }
.hxt-animation-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 9px; }
.hxt-animation-controls .hxt-text-button { min-height: 38px; }
.hxt-animation-stage {
	display: grid;
	place-items: center;
	width: min(100%, 9rem);
	aspect-ratio: 1;
	margin: 10px auto 0;
	border: 1px solid var(--hxt-line);
	border-radius: 8px;
	background: #f8faf7;
}
.hxt-animation-stage svg { width: 88%; height: 88%; }
.hxt-stroke-median {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	animation: hxt-draw-stroke .36s linear var(--hxt-stroke-delay) forwards;
}
.hxt-stroke-completed {
	opacity: 0;
	animation: hxt-complete-stroke .36s steps(1, end) var(--hxt-stroke-delay) forwards;
}
.hxt-stroke-finished {
	opacity: 0;
	animation: hxt-complete-stroke .48s steps(1, end) var(--hxt-stroke-delay) forwards;
}
.hxt-print-ink { margin-bottom: 12px; }
@keyframes hxt-draw-stroke { to { stroke-dashoffset: 0; } }
@keyframes hxt-complete-stroke { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.hxt-stroke-median { animation: none; }
	.hxt-stroke-completed { animation-duration: 0s; }
}
.hxt-reading-list { display: grid; gap: 8px; max-height: 290px; overflow: auto; padding: 9px 4px; }
.hxt-reading-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 6px; font-size: 14px; }
.hxt-reading-row small { color: var(--hxt-muted); overflow-wrap: anywhere; }
.hxt-reading-row input { font-size: 16px; }
.hxt-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 0 0; border: 0; margin: 20px 0; min-width: 0; }
.hxt-options legend { padding: 0; font-weight: 700; }
.hxt-editor button.hxt-primary { width: 100%; border: 0; padding: 11px 14px; border-radius: 8px; background: var(--hxt-accent); color: white; font: 700 15px/1.4 system-ui, sans-serif; cursor: pointer; }
.hxt-editor button.hxt-primary:hover:enabled { background: #0b4337; }
.hxt-editor button.hxt-primary:disabled { opacity: .48; cursor: default; }
.hxt-note { margin: 7px 0 0; color: #78420d; font-size: 13px; }
.hxt-preview { min-width: 0; border-inline-start: 1px solid var(--hxt-line); padding: clamp(15px, 2.8vw, 27px); }
.hxt-preview-bar { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; margin-bottom: 13px; }
.hxt-preview-bar h3 { color: var(--hxt-ink); margin: 0; font: 700 16px/1.4 system-ui, sans-serif; }
.hxt-preview-bar > span { font-size: 13px; color: var(--hxt-muted); }
.hxt-empty { margin: 0; border: 1px dashed #9eaea6; border-radius: 9px; padding: 36px 12px; text-align: center; font-size: 14px; color: var(--hxt-muted); }
.hxt-previews { display: grid; gap: 14px; min-width: 0; }
.hxt-preview-page { position: relative; min-width: 0; overflow: hidden; background: white; box-shadow: 0 1px 4px #24392f25; }
.hxt-preview-page .hxt-paper { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--hxt-scale, 1)); }
.hxt-print-frame { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; border: 0; }
@media (max-width: 680px) {
	.hxt-workspace { grid-template-columns: minmax(0, 1fr); }
	.hxt-preview { border-inline-start: 0; border-top: 1px solid var(--hxt-line); }
}
.hxt-preview-page { width: var(--hxt-page-width, 100%); height: var(--hxt-page-height, 0px); margin-inline: auto; }
.hxt-editor { container-type: inline-size; }
@container (max-width: 650px) {
	.hxt-workspace { grid-template-columns: minmax(0, 1fr); }
	.hxt-preview { border-inline-start: 0; border-top: 1px solid var(--hxt-line); }
}
