/* The same reading rhythm is used in board detail and the post editor. */
:where(.fkmtu-board-view-content, body.editor-styles-wrapper) {
	--fkmtu-article-font-size: var(--fkmtu-font-size-body, 15px);
	--fkmtu-article-paragraph-gap: 32px;
	--fkmtu-article-line-height: 1.8;
	font-size: var(--fkmtu-article-font-size);
	line-height: var(--fkmtu-article-line-height);
}

body.editor-styles-wrapper {
	font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", sans-serif;
}

:where(.fkmtu-board-view-content, .editor-styles-wrapper) :where(p.wp-block-paragraph, figure.wp-block-image, .wp-block-list, .wp-block-table) {
	margin-top: 0;
	margin-bottom: var(--fkmtu-article-paragraph-gap);
}

:where(.fkmtu-board-view-content, .editor-styles-wrapper) p.wp-block-paragraph {
	font-size: inherit;
	line-height: inherit;
}

:where(.fkmtu-board-view-content, .editor-styles-wrapper) :where(h2.wp-block-heading, h3.wp-block-heading, h4.wp-block-heading) {
	margin-top: var(--fkmtu-article-paragraph-gap);
	margin-bottom: 16px;
	line-height: 1.45;
}

:where(.fkmtu-board-view-content, .editor-styles-wrapper) h2.wp-block-heading {
	font-size: var(--fkmtu-font-size-section-title, 24px);
}

:where(.fkmtu-board-view-content, .editor-styles-wrapper) h3.wp-block-heading {
	font-size: var(--fkmtu-font-size-heading, 22px);
}

:where(.fkmtu-board-view-content, .editor-styles-wrapper) h4.wp-block-heading {
	font-size: var(--fkmtu-font-size-card-title, 18px);
}

:where(.fkmtu-board-view-content, .editor-styles-wrapper) .wp-block-list {
	padding-inline-start: 2em;
	line-height: var(--fkmtu-article-line-height);
}

:where(.fkmtu-board-view-content, .editor-styles-wrapper) :where(.wp-block-image img, .wp-block-table table) {
	max-width: 100%;
}

:where(.fkmtu-board-view-content, .editor-styles-wrapper) .wp-block-image img {
	height: auto;
}

/* Inline formats override a paragraph-wide font without changing nearby text. */
span.fkmtu-inline-font--pretendard {
	--fkmtu-inline-font-family: var(--wp--preset--font-family--fkmtu-pretendard);
}

span.fkmtu-inline-font--myeongjo {
	--fkmtu-inline-font-family: var(--wp--preset--font-family--fkmtu-myeongjo);
}

span.fkmtu-inline-font--nanum-gothic {
	--fkmtu-inline-font-family: var(--wp--preset--font-family--fkmtu-nanum-gothic);
}

span.fkmtu-inline-font--gowun-dodum {
	--fkmtu-inline-font-family: var(--wp--preset--font-family--fkmtu-gowun-dodum);
}

span.fkmtu-inline-font--gowun-batang {
	--fkmtu-inline-font-family: var(--wp--preset--font-family--fkmtu-gowun-batang);
}

span.fkmtu-inline-font--song-myung {
	--fkmtu-inline-font-family: var(--wp--preset--font-family--fkmtu-song-myung);
}

body:not(.wp-admin) .fkmtu-board-view-content span[class*="fkmtu-inline-font--"],
.editor-styles-wrapper span[class*="fkmtu-inline-font--"],
body:not(.wp-admin) .fkmtu-board-view-content span[class*="fkmtu-inline-font--"] :where(a, span, em, strong),
.editor-styles-wrapper span[class*="fkmtu-inline-font--"] :where(a, span, em, strong) {
	font-family: var(--fkmtu-inline-font-family) !important;
}
