@font-face {
  font-family: "Palatino";
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Palatino";
  font-weight: 400;
  font-style: italic;
}
@font-face {
  font-family: "Palatino";
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Palatino";
  font-weight: 600;
  font-style: italic;
}
@font-face {
  font-family: "Palatino";
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "Palatino";
  font-weight: 700;
  font-style: italic;
}
@font-face {
  font-family: "Times New Roman";
  font-weight: 700;
  font-style: italic;
}

html {
  background: transparent !important;
  font-family: "Palatino", "Georgia", Keyboard, Times, "Hiragino Mincho ProN", "ヒラギノ明朝 ProN", serif;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
  font-size: 11pt;
}

body {
  padding-top: 1rem;
  padding-bottom: 2rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  box-sizing: content-box;
  word-wrap: break-word;
  text-rendering: optimizeLegibility;
  -webkit-font-kerning: normal;
  font-kerning: normal;
  --foofy-color: #ff0000;
  --main-color: #000000;
  --bg-color: #FFFFFF;
  --bd-color: #101010;
  margin-left: 0;
  margin-right: 0;
  display: block;
}


:root {
    --color-primary: #000; 
    --color-background: #fff; 
  --main-color: #000000;
  --bg-color: #FFFFFF;

}

@media (prefers-color-scheme: dark) {
    --color-primary: #fff; 
    --color-background: #000;
  --main-color: #DDDDDD ;
  --bg-color: #11111b ;

}
/* Night Mode */

.night-mode,
.night-mode a {
  color: var(--main-color); /* iOS text color */
}

.night-mode {
  background-color: var(--bg-color); /* iOS background color */
}

.night-mode pre,
.night-mode code,
.night-mode kbd {
  background-color: rgba(245, 245, 245, 0.06);
}

.night-mode pre code {
  background-color: transparent;
}

/* Colors for OS X */
@media screen and (min-device-width: 1152px) {
  .night-mode,
  .night-mode a {
    color: #cccccc; /* OS X text color */
  }

  .night-mode {
  background-color: var(--bg-color); /* iOS background color */
  }
}

/* Fake sub-pixel lines */
.night-mode hr,
.night-mode caption,
.night-mode tbody th,
.night-mode td {
  border-bottom-color: #666;
}

.night-mode tbody th,
.night-mode td {
  border-top-color: #666;
}


@media (prefers-color-scheme: dark) {
  * {
    background: #11111b;
    color: #dddddd;
  }
}


* {
  box-sizing: border-box;
}
*, *:before, *:after {
 color: #000 !important;
 /* black prints faster */
 box-shadow: none !important;
 text-shadow: none !important;
}

p {
  /*text-indent: 2.54em;*/
  text-indent: min(2.54em, 10%);
  margin-top: 0.42em;
  margin-bottom: 0.42em;
  line-height: 1.5em;
  widows: 5;
  orphans: 5;
}

ul, ol {
  padding-left: 1.5rem;
}

img {
  max-width: 100%;
  vertical-align: top;
}
img, figure {
  page-break-inside: avoid;
  page-break-after: auto;
}
figure img {
  display: block;
}
hr {
  clear: both;
  margin: 3rem auto 3rem;
  border-bottom: 1px #e6e6e6 solid;
  border-bottom-color: #000 !important;
  border: 0.5px solid;
  margin-left: 25%;
  margin-right: 25%;
}
.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

code, samp, kbd {
 font-weight: 450;
}

.footnote {
  text-decoration: none;
}
.TOC a {
  text-decoration: none;
}

/*
.reversefootnote {
  display: none;
}
.tooltip:after {
  display: none;
}
*/

h1, h2, h3, h4, h5 {
page-break-inside: avoid;
page-break-after: avoid;
}
h1, h2, h3 {
  font-weight: 600;
  text-align: center;
}

strong {
  font-weight: 600;
}

h1 {
  border-bottom: 2px solid /*black*/;
  border-top: 2px solid /*black*/;
  margin-top: 2em;
  margin-bottom: 2em;
  padding-top: 1em;
  padding-bottom: 1em;
  page-break-after: avoid;
  break-before: always;
  page-break-before: always;
  font-size: 1.7em;
}
h1.title {
  font-family: "Cinzel Decorative";
  margin-bottom: 0;
  border-bottom: 0;
  font-weight: 700;
  font-size: 2em;
  padding-bottom: 0em;
  page-break-before: always;
  page-break-after: avoid;
}
h1.subtitle {
  font-family: "Cinzel Decorative";
  margin-bottom: 0;
  border-bottom: 0;
  font-weight: 200;
  font-size: 1.4em;
  margin-top: 0;
  border-top: 0;
  page-break-before: avoid;
  page-break-after: avoid;
}
h1.author {
  margin-top: 1em;
  border-top: 0;
  font-weight: 200;
  font-family: "Cinzel Decorative";
  font-size: 100%;
  page-break-after: always;
  page-break-before: avoid;
  counter-reset: chapter;
}
h2 {
  font-size: 1.4em;  
  border-bottom: 1px solid;
  border-top: 1px solid;
  padding-top: 1em;
  padding-bottom: 1em;
  margin-top: 2em;
  margin-bottom: 2em;
  page-break-after: avoid;
  page-break-before: always;
}
h3 {
  font-size: 1.25em;
  margin-bottom: 0;
}
figure {
  border: none;
  padding: none;
  padding-bottom: none;
  margin: none;
  page-break-after: auto;
  break-inside: avoid-page;
  page-break-inside: avoid;

}
figure.illustration {
  position: relative;
  border: thin silver solid;
  padding: 0.5em;
  width: 90%;
  margin: auto;
  margin-top: 2em;
  margin-bottom: 2em;
  text-indent: 0;
  page-break-before: auto;
  page-break-after: auto;
  font-size: smaller;
  font-style: italic;
  text-align: center;
  line-height: 1.2;
  break-inside: avoid-page;
  page-break-inside: avoid;

}
figurecaption.illustration {
  font-size: smaller;
  font-style: italic;
  text-align: center;
  padding: 0.5em;
  margin: 0.5em;
  border: thin;
}
img.illustration {
  padding: 0.5em;
}
figure p {
  padding: 0.5em;
  text-align: left;
  text-indent: 0;
  line-height: 1.2;
  break-inside: avoid-page;
  page-break-inside: avoid;
}
figure.title_page {
  border: none;
  padding: none;
  padding-bottom: none;
  margin: none;
  page-break-after: auto;
}

ul {
  list-style: none;
  line-height: 1.4em;
}
ul.level2{
  counter-reset: chapter-list;
}
ul > li:before {
  content: "• ";
  float: left;
}
ul.level2 > li:before {
  counter-increment: chapter-list;
  content: "• Chapter " counter(chapter-list) "- ";
  float: left;
}


blockquote {
	
  border-style: solid;
  border-width: thin;
  padding-left: 2em;
  padding-right: 2em;
  border-radius: 1em;
  font-family: "Times New Roman";
  page-break-inside: avoid;
  break-inside: avoid-page;
}

/*body {
  max-width: 365pt;
}*/


p.end {
  font-size: 3em;
  font-weight: bold;
  line-height: 1em;
  text-align: center;
  text-indent: 0em;
}

div.art_image {
  width: calc(100vw - 2em);
  height: fit-content;
  /* max-height: calc(100vh - 2em); */
  margin: auto;
  border: none;
  display: block;
	a {
		border: none;
		display: block;
		height: fit-content;
		width: fit-content;
		max-width: 100%;
		margin: auto;
	}
	img {
		margin: auto;
		border: none;
		max-height: max(600px,calc(100vh - 4rem));
	}
 
}

/*Edited by Kalany 2025-10-17*/
