[hidden] {
	display: none !important;
}
.fc {
	display: grid;
	gap: 16px;
}
.fc-formats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.fc-format {
	position: relative;
	cursor: pointer;
}
.fc-format input {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.fc-format span {
	display: block;
	padding: 9px 16px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--bg);
	font-weight: 500;
}
.fc-format:hover span {
	border-color: var(--accent);
}
.fc-format input:checked + span {
	border-color: var(--accent);
	background: var(--accent);
	color: #ffffff;
}
.fc-format input:focus-visible + span,
.fc-seg input:focus-visible + span {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.fc-format.is-misfit span {
	border-style: dashed;
	color: var(--text-soft);
}
.fc-format.is-misfit input:checked + span {
	background: var(--surface);
	border-color: var(--accent);
	color: var(--accent);
}
.fc-work {
	display: grid;
	grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}
.fc-input,
.fc-output {
	min-width: 0;
}
.fc-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 34px;
	margin-bottom: 6px;
}
/* Preview options: direction, then size, with the colour button at the right end. */
.fc-bar--view {
	justify-content: flex-start;
}
.fc-bar__color {
	margin-left: auto;
}
.fc-bar__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	color: inherit;
}
.fc-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--accent);
	font: inherit;
	font-size: 0.875rem;
	text-decoration: underline;
	cursor: pointer;
}
.fc-link:hover {
	color: var(--accent-hover);
}
.fc-mode {
	margin: 6px 0 0;
	color: var(--text-soft);
	font-size: 0.8125rem;
}
.fc-notes {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
}
.fc-notes li {
	margin-top: 4px;
	padding: 6px 10px;
	border-radius: 6px;
	background: #fdf1e6;
	color: #6e3209;
}
.fc-seg {
	display: inline-flex;
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
}
.fc-seg label {
	position: relative;
	cursor: pointer;
}
.fc-seg input {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.fc-seg span {
	display: block;
	padding: 4px 14px;
	font-size: 0.875rem;
}
.fc-seg input:checked + span {
	background: var(--surface);
	color: var(--accent);
	font-weight: 500;
}
.fc-preview {
	display: flex;
	min-height: 200px;
	overflow: auto;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: #ffffff;
}
.fc-preview svg {
	display: block;
	flex: none;
	max-width: none;
	margin: auto;
}
/* 화면에 맞춤: shrinks to the width but never grows. The picture carries its own size. */
.fc-preview[data-fit='fit'] svg {
	flex: 0 1 auto;
	max-width: 100%;
	height: auto;
}
/* 원래 크기: as large as it is, scrolled inside the box. */
.fc-preview[data-fit='full'] {
	max-height: 76vh;
}
.fc-empty {
	margin: 0;
	padding: 72px 20px;
	color: var(--text-soft);
	text-align: center;
}
.fc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}
.fc-actions .button:disabled {
	opacity: 0.5;
	cursor: default;
}
.fc-status {
	min-height: 1.5em;
	margin: 8px 0 0;
	color: var(--text-soft);
	font-size: 0.875rem;
}
.fc-example {
	margin: 8px 0 12px;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--surface);
	font-family: ui-monospace, SFMono-Regular, Consolas, 'Noto Sans KR', monospace;
	font-size: 0.875rem;
	line-height: 1.6;
	white-space: pre;
	overflow-x: auto;
}
@media (max-width: 760px) {
	.fc-work {
		grid-template-columns: minmax(0, 1fr);
	}
	.fc-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}
	.fc-format {
		flex: 1 1 40%;
		text-align: center;
	}
}
