:root {
	--novel-font-size: 19px;
	--novel-line-height: 1.8;
	--novel-paragraph-gap: 1.7em;
	--novel-chapter-gap: 2em;
}

/* Keep the published reader typography consistent. */
.novel-reader {
	font-size: var(--novel-font-size);
	line-height: var(--novel-line-height);
	-ms-overflow-style: none;
	scrollbar-width: none;
}

/* Apply the shared metrics directly to the prose itself. */
.novel-reader .reader-content {
	font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
	font-size: inherit;
	line-height: var(--novel-line-height);
}

/* The reader has its own progress indicator, so hide the browser's bright scrollbar. */
.novel-reader::-webkit-scrollbar {
	display: none;
}

/* Match the progress direction to the current writing direction. */
.reader-progress i {
	margin-right: auto;
	margin-left: 0;
}

.reader.is-vertical-writing .reader-progress i {
	margin-right: 0;
	margin-left: auto;
}

.reader-content p,
.novel-reader.horizontal .reader-content p {
	margin-block: 0 var(--novel-paragraph-gap);
}

.novel-reader.vertical .reader-content p {
	margin: 0 0 0 var(--novel-paragraph-gap);
}

/* A standalone final 「了」 belongs at the bottom (inline end) of its
 * vertical column, as it appears in the writing preview. */
.novel-reader.vertical .reader-content > .novel-end-character:last-child {
	text-align: end;
}

/* Chapter separators and headings use the same gap in both writing modes. */
.reader-content hr,
.reader-content .wp-block-separator,
.reader-content .novel-chapter-break,
.reader-content > p:empty,
.reader-content > h2,
.reader-content > h3 {
	margin-block-start: var(--novel-chapter-gap) !important;
	margin-block-end: var(--novel-chapter-gap) !important;
}
