/*
   chaptering.css

   Copyleft 🄯 2021-2022 Taiji Yamada <taiji@aihara.co.jp>
*/
body { counter-reset: episode part chapter section subsection subsubsection paragraph subparagraph; }
:not(.asterisk).episode				{ counter-reset: chapter;	counter-increment: episode; }
:not(.asterisk).episode::before			{ margin-right: .5em; content: 'Episode ' counter(episode) '.'; }
:not(.asterisk):lang(ja).episode::before	{ margin-right: .5em; content: '第 ' counter(episode) ' 編'; }
:not(.asterisk).part				{ counter-reset: chapter;	counter-increment: part; }
:not(.asterisk).part::before			{ margin-right: .5em; content: 'Part ' counter(part, upper-roman) '.'; }
:not(.asterisk):lang(ja).part::before		{ margin-right: .5em; content: '第 ' counter(part, upper-roman) ' 部'; }
:not(.asterisk).chapter				{ counter-reset: section;	counter-increment: chapter; }
:not(.asterisk).chapter::before			{ margin-right: .5em; content: 'Chapter ' counter(chapter) '.'; }
:not(.asterisk):lang(ja).chapter::before	{ margin-right: .5em; content: '第 ' counter(chapter) ' 章'; }
:not(.asterisk).section				{ counter-reset: subsection;	counter-increment: section; }
:not(.asterisk).section::before			{ margin-right: .5em; content: counter(section) '.'; }
:not(.asterisk).subsection			{ counter-reset: subsubsection;	counter-increment: subsection; }
:not(.asterisk).subsection::before		{ margin-right: .5em; content: counter(section) '.' counter(subsection) '.'; }
:not(.asterisk).subsubsection			{ counter-reset: paragraph;	counter-increment: subsubsection; }
:not(.asterisk).subsubsection::before		{ margin-right: .5em; content: counter(section) '.' counter(subsection) '.'counter(subsubsection) '.'; }
:not(.asterisk).paragraph			{ counter-reset: subparagraph;	counter-increment: paragraph; }
:not(.asterisk).paragraph::before		{ margin-right: .5em; content: counter(section) '.' counter(subsection) '.'counter(subsubsection) '.' counter(paragraph) '.'; }
:not(.asterisk).subparagraph			{ counter-reset: subsubparagraph;	counter-increment: subparagraph; }
:not(.asterisk).subparagraph::before		{ margin-right: .5em; content: counter(section) '.' counter(subsection) '.'counter(subsubsection) '.' counter(paragraph) '.' counter(subparagraph) '.'; }

ol:not(.asterisk).episodelist				{ list-style: none; counter-reset: episodelist; }
ol:not(.asterisk).episodelist>li::before		{ counter-increment: episodelist; }
ol:not(.asterisk).episodelist>li::before		{ margin-right: .5em; content: 'Episode ' counter(episodelist) '.'; }
ol:not(.asterisk):lang(ja).episodelist>li::before	{ margin-right: .5em; content: '第 ' counter(episodelist) ' 編'; }
ol:not(.asterisk).partlist				{ list-style: none; counter-reset: partlist; }
ol:not(.asterisk).partlist>li::before			{ counter-increment: partlist; }
ol:not(.asterisk).partlist>li::before			{ margin-right: .5em; content: 'Part ' counter(partlist, upper-roman) '.'; }
ol:not(.asterisk):lang(ja).partlist>li::before		{ margin-right: .5em; content: '第 ' counter(partlist, upper-roman) ' 部'; }
ol:not(.asterisk).chapterlist				{ list-style: none; counter-reset: chapterlist; }
ol:not(.asterisk).chapterlist>li::before		{ counter-increment: chapterlist; }
ol:not(.asterisk).chapterlist>li::before		{ margin-right: .5em; content: 'Chapter ' counter(chapterlist) '.'; }
ol:not(.asterisk):lang(ja).chapterlist>li::before	{ margin-right: .5em; content: '第 ' counter(chapterlist) ' 章'; }
ol:not(.asterisk).sectionlist				{ list-style: none; counter-reset: sectionlist; }
ol:not(.asterisk).sectionlist li::before		{ counter-increment: sectionlist; }
ol:not(.asterisk).sectionlist li::before		{ margin-right: .5em; content: counters(sectionlist, '.'); }

/*
   for use with auto_chaptering.js
*/
h1 ._header_mark,
h2 ._header_mark,
h3 ._header_mark,
h4 ._header_mark,
h5 ._header_mark,
h6 ._header_mark { display: none; }
