/* ALL */

:root {
  --yellow: #afa846;
  --black: #000;
  --white: #fff;
  --brighterwhite: #c3c3c3;
  --bgwhite: rgb(243, 243, 243);
  --mainfont: 'adobe-garamond-pro', 'Georgia', serif;
  --titlefont: 'IM Fell DW Pica SC', 'Georgia', serif;
}

/* agp-regular - latin */
@font-face {
  font-family: 'adobe-garamond-pro';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/agp-regular.eot');
  /* IE9 Compat Modes */
  src: local(''), url('fonts/agp-regular.eot?#iefix') format('embedded-opentype'),
    /* IE6-IE8 */
    url('fonts/agp-regular.woff2') format('woff2'),
    /* Super Modern Browsers */
    url('fonts/agp-regular.woff') format('woff'),
    /* Modern Browsers */
    url('fonts/agp-regular.ttf') format('truetype'),
    /* Safari, Android, iOS */
    url('fonts/agp-regular.svg') format('svg');
  /* Legacy iOS */
}

/* agp-italic - latin */
@font-face {
  font-family: 'adobe-garamond-pro-italic';
  font-style: italic;
  font-weight: 400;
  src: url('fonts/agp-italic.eot');
  /* IE9 Compat Modes */
  src: local(''), url('fonts/agp-italic.eot?#iefix') format('embedded-opentype'),
    /* IE6-IE8 */
    url('fonts/agp-italic.woff2') format('woff2'),
    /* Super Modern Browsers */
    url('fonts/agp-italic.woff') format('woff'),
    /* Modern Browsers */
    url('fonts/agp-italic.ttf') format('truetype'),
    /* Safari, Android, iOS */
    url('fonts/agp-italic.svg') format('svg');
  /* Legacy iOS */
}

/* agaramondpro-bold - latin */
@font-face {
  font-family: 'adobe-garamond-pro';
  font-style: bold;
  font-weight: 700;
  src: url('fonts/agaramondpro-bold.eot');
  /* IE9 Compat Modes */
  src: local(''), url('fonts/agaramondpro-bold.eot?#iefix') format('embedded-opentype'),
    /* IE6-IE8 */
    url('fonts/agaramondpro-bold.woff2') format('woff2'),
    /* Super Modern Browsers */
    url('fonts/agaramondpro-bold.woff') format('woff'),
    /* Modern Browsers */
    url('fonts/agaramondpro-bold.ttf') format('truetype'),
    /* Safari, Android, iOS */
    url('fonts/agaramondpro-bold.svg') format('svg');
  /* Legacy iOS */
}

/* im-fell-dw-pica-sc-regular - latin */
@font-face {
  font-family: 'IM Fell DW Pica SC';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/im-fell-dw-pica-sc-v12-latin-regular.eot');
  /* IE9 Compat Modes */
  src: local(''), url('fonts/im-fell-dw-pica-sc-v12-latin-regular.eot?#iefix') format('embedded-opentype'),
    /* IE6-IE8 */
    url('fonts/im-fell-dw-pica-sc-v12-latin-regular.woff2') format('woff2'),
    /* Super Modern Browsers */
    url('fonts/im-fell-dw-pica-sc-v12-latin-regular.woff') format('woff'),
    /* Modern Browsers */
    url('fonts/im-fell-dw-pica-sc-v12-latin-regular.ttf') format('truetype'),
    /* Safari, Android, iOS */
    url('fonts/im-fell-dw-pica-sc-v12-latin-regular.svg#IMFellDWPicaSC') format('svg');
  /* Legacy iOS */
}

/* im-fell-dw-pica-regular - latin */
@font-face {
  font-family: 'IM Fell DW Pica';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/im-fell-dw-pica-v12-latin-regular.eot'); /* IE9 Compat Modes */
  src: local(''), url('fonts/im-fell-dw-pica-v12-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('fonts/im-fell-dw-pica-v12-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ url('fonts/im-fell-dw-pica-v12-latin-regular.woff') format('woff'), /* Modern Browsers */ url('fonts/im-fell-dw-pica-v12-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('fonts/im-fell-dw-pica-v12-latin-regular.svg#IMFellDWPica') format('svg'); /* Legacy iOS */
}
/* im-fell-dw-pica-italic - latin */
@font-face {
  font-family: 'IM Fell DW Pica';
  font-style: italic;
  font-weight: 400;
  src: url('fonts/im-fell-dw-pica-v12-latin-italic.eot'); /* IE9 Compat Modes */
  src: local(''), url('fonts/im-fell-dw-pica-v12-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('fonts/im-fell-dw-pica-v12-latin-italic.woff2') format('woff2'), /* Super Modern Browsers */ url('fonts/im-fell-dw-pica-v12-latin-italic.woff') format('woff'), /* Modern Browsers */ url('fonts/im-fell-dw-pica-v12-latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */ url('fonts/im-fell-dw-pica-v12-latin-italic.svg#IMFellDWPica') format('svg'); /* Legacy iOS */
}

html {
  font-size: 16px;
  overflow-y: scroll;
}

@media all and (max-width: 899px) {
  html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
}

body {
  background: var(--white);
  text-align: left;
  font-family: var(--mainfont);
  margin: auto;
  max-width: 600px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0;
  padding-bottom: 0;
}

@media all and (max-width: 899px) {
  body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
}

a {
  text-align: center;
  text-decoration: none;
  font-family: var(--mainfont);
  color: var(--black);
  text-transform: capitalize;
}

a:hover {
  cursor: pointer;
  -webkit-transition: 500ms linear 0s;
  -moz-transition: 500ms linear 0s;
  -o-transition: 500ms linear 0s;
  transition: 500ms linear 0s;
  outline: 0 none;
  color: var(--black);
  text-shadow: -0.0625rem 0.0625rem 0.5rem #b5b5b5, 0.0625rem -0.0625rem 0.5rem grey;
}

.titles {
  min-height: 79px; /* to prevent pyramid from jumping */
}

@media all and (max-width: 899px) {
  .titles {
    min-height: 83px; /* to prevent pyramid from jumping */
  }
}

.poetry h3 {
  margin-bottom: 1rem;
}

.intro.front.poetry {
  margin-bottom: 0;
}

.intro {
  margin-top: .5rem;
  margin-bottom: .5rem;
  display: flex;
  /* align-items: center; */
  height: 50px;
}

div {
  color: var(--black);
}

pre {
  margin: 0;
  margin-top: 0;
  margin-bottom: 0;
}

h1 {
  text-align: center;
  font-family: var(--mainfont);
  color: var(--black);
  font-weight: bold;
  text-transform: capitalize;
}

@media all and (max-width: 899px) {
  h1 {
    margin: auto;
    font-size: 30px;
  }
}

@media (min-width: 900px) and (max-width: 1400px) {
  h1 {
    margin: auto;
    font-size: 35px;
  }
}

@media all and (min-width: 1401px) {
  h1 {
    margin: auto;
    font-size: 35px;
  }
}

h2 {
  text-align: left;
  font-family: var(--mainfont);
  color: var(--black);
  display: block;
  margin: auto;
  margin-top: 25px;
  margin-bottom: 20px;
  line-height: 30px;
  font-size: 28px;
  font-weight: bold;
  text-transform: capitalize;
}

@media all and (max-width: 899px) {
  h2 {
    font-size: 24px;
    margin: 0 0 10px;
    margin-top: 20px;
  }
}

h2.full-text-header {
  margin-top: 0px;
}

.links {
  padding-left: 10px;
  padding-right: 10px;
}

.links h2 {
  text-align: left;
  font-family: var(--mainfont);
  color: var(--black);
  display: block;
  margin: auto;
  margin-top: 25px;
  margin-bottom: 10px;
  line-height: 30px;
  font-size: 28px;
  font-weight: bold;
  text-transform: capitalize;
}

@media all and (max-width: 899px) {
  .links h2 {
    font-size: 24px;
    margin: 0 0 10px;
    margin-top: 10px;
  }
}

.links h2.full-text-header {
  margin-top: 0px;
}

img {
  margin: 0 auto;
  display: inline;
}

.pyramid {
  text-align: center;
  font-family: var(--mainfont);
  margin-bottom: 26px;
  font-size: 20px;
  font-weight: 600;
}

@media all and (max-width: 899px) {
  .pyramid {
    margin-bottom: 16px;
  }
}

.name:hover {
  cursor: pointer;
}

.frontimage {
    margin: 0 auto;
    /* margin-top: .4em; */
    margin-left: 10px;
    display: block;
    width: 40px;
    height: 40px;
}

@media all and (max-width: 899px) {
  .frontimage {
    margin-left: 10px;
  }
}

@media all and (max-width: 370px) {
  .frontimage {
    width: 40px;
    height: 40px;
  }
}

.frontimage:hover {
  transform: scale(1.1);
  transition: transform 300ms ease-out;
}

.front {
  margin: 0 auto;
  max-width: 600px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  text-align: justify;
  font-family: var(--mainfont);
  color: var(--black);
}

@media all and (max-width: 899px) {
  .front {
    padding-top: 0.8rem;
    padding-bottom: 0;
  }
}

@media (min-width: 900px) and (max-width: 1400px) {
  .front {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }
}

p {
  color: var(--black);
  font-family: var(--mainfont);
  text-align: left;
  margin-bottom: 1.5rem;
}

p.justified {
  text-align: justify;
  text-align-last: justify;
}

@media all and (max-width: 480px) {
  .stanza p {
    text-indent: -1em;
    padding-left: 1em;
  }
}

.collection {
  display: flex;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  padding-top: 0rem;
  max-width: 600px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
}

@media all and (max-width: 899px) {
  .collection {
    letter-spacing: 0.5px;
    padding-top: 0;
    line-height: 1;
  }
}

@media (min-width: 900px) {
  .collection {
    letter-spacing: 0.75px;
    line-height: 1.1;
  }
}

/*
.links::after {
  content: '';
  flex: auto;
}
*/

.col {
  text-align: center;
  font-family: var(--mainfont);
  flex: 1 1 left;
  padding: 5px;
}

.col:after {
  content: 'กค';
  margin-left: 10px;
}

.col:last-child:after {
  display: none;
}

@media all and (max-width: 899px) {
  .col {
    font-size: 18px;
    padding: 8px;
  }
}

@media all and (max-width: 349px) {
  #top {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media all and (min-width: 350px) and (max-width: 899px) {
  #top {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (min-width: 900px) and (max-width: 1400px) {
  #top {
    padding-left: 5px;
    padding-right: 5px;
  }
}

@media all and (min-width: 1401px) {
  #top {
    padding-left: 5px;
    padding-right: 5px;
  }
}


.poetry {
  text-align: center;
  font-family: var(--mainfont);
  margin: auto;
  max-width: 600px;
  font-size: 20px;
  font-weight: 500;
  font-style: normal;
  text-rendering: optimizeLegibility;
  line-height: 26px;
  margin-bottom: 1rem;
}

@media all and (max-width: 349px) {
  .poetry {
    font-size: 18px;
    line-height: 1.3;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media all and (min-width: 350px) and (max-width: 899px) {
  .poetry {
    font-size: 18px;
    line-height: 1.3;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (min-width: 900px) and (max-width: 1400px) {
  .poetry {
    padding-left: 5px;
    padding-right: 5px;
  }
}

@media all and (min-width: 1401px) {
  .poetry {
    padding-left: 5px;
    padding-right: 5px;
  }
}

.has-dropcap:first-letter {
  float: left;
  font-size: 5rem;
  margin: 0.1em 0.1em 0em 0;
}

@media all and (max-width: 349px) {
  .has-dropcap:first-letter {
    font-size: 3.5rem;
    line-height: 0.8;
  }
}

@media all and (min-width: 350px) and (max-width: 899px) {
  .has-dropcap:first-letter {
    font-size: 3.8rem;
    line-height: 0.8;
  }
}

@media (min-width: 900px) and (max-width: 1400px) {
  .has-dropcap:first-letter {
    line-height: 0.7;
  }
}

@media all and (min-width: 1401px) {
  .has-dropcap:first-letter {
    line-height: 0.7;
  }
}

.arrowleft {
  display: block;
  text-wrap: nowrap;
  float: left;
  /*width: 33.33%;*/
  text-align: left;
  color: yellow;
  height: 24px;
}

.arrownav {
  display: flex;
  justify-content: space-between;
  max-width: 300px;
  font-size: 18px;
}

.nav {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 500;
  max-width: 404px;
  justify-content: space-between;
  padding: 10px 15px;
  padding-top: 10px;
  padding-left: 0;
}

.nav span {
  margin: 0 5px;
}

@media all and (max-width: 800px) {
  .nav {
    width: fit-content;
    padding-bottom: 60px;
    margin-left: 8px;
    margin-right: 8px;
  }
}

@media all and (max-width: 800px) {
  .arrownav {
    margin: 0 4px;
  }
}

.arrowright {
  display: block;
  text-wrap: nowrap;
  float: left;
  /*width: 33.33%; */
  text-align: right;
  color: yellow;
  height: 24px;
}

.random {
  padding-top: 1rem;
  padding-bottom: 1rem;
  display: block;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin: auto;
  font-size: 16px;
  height: 24px;
  font-weight: 700;
  font-family: var(--mainfont);
  width: 40%;
  max-width: 500px;
  text-align: center;
  color: var(--black);
  height: fit-content;
}

@media all and (max-width: 800px) {
  .random {
    width: 99%;
  }
}

.chapter {
  margin-bottom: 0;
  margin-top: 0;
  text-align: left;
}

.separator {
  text-align: center;
}


/* New style */

.chapter {
  margin-bottom: 50px;
}

@media all and (max-width: 899px) {
  .chapter {
      margin-bottom: 20px;
    }
}

.chapter h2 {
  text-align: left;
  font-size: 33px;
  margin-bottom: 1.5rem;
}

.stanza p {
  margin-top: 0;
  margin-bottom: 0;
}

p.indented {
  margin-left: 2rem;
}

.subtitle, .changelog {
  font-family: var(--mainfont);
  font-size: 19px;
  padding: 0px 5px;
}

@media all and (max-width: 899px) {
  .subtitle, .changelog {
      font-family: var(--mainfont);
      font-size: 17px;
    }
}

hr {
  width: 80%;
  margin-top: 1em;
  margin-bottom: 1em;
  border-color: var(--black);
}

.backtotop {
  padding: 10px 15px;
  position: fixed;
  right: 25vw;
  bottom: 0;
  font-weight: 800;
}

@media all and (max-width: 500px) {
  .backtotop {
    right: 0;
    font-size: 30px;
    padding: 10px 20px;
  }
}

.break {
  margin: 1em 0;
}