body {
  background-image: url('images/chapter_back.jpg');
  tab-interval: 25pt;
}



.chapter_container {
  text-align: justify;
  max-width: 375pt;
  width: 100%;
  box-sizing: border-box;
  background-color: #000000;
  padding: 20px;
  color: #FFFFFF;
  margin: 0px auto;
}

.body_text {
  margin: 0in 0in .0001pt 0in;
  text-indent: 40pt;
  line-height: 150%;
  font-size: 16.0pt;
  font-family: "Garamond", serif;
}

.body_text_noindent {
  margin: 0in 0in .0001pt 0in;
  text-indent: 0pt;
  line-height: 150%;
  font-size: 16.0pt;
  font-family: "Garamond", serif;
}

.chapter_number {
  margin: 0in 0in 5pt 0in;
  text-align: center;
  font-style: italic;
  font-size: 28.0pt;
  font-family: "Arial", sans-serif;
}

.spacer {
  margin: 0in;
  text-indent: 25pt;
  line-height: 150%;
  font-size: 12.0pt;
  font-family: "Garamond", serif;
}

.scene_break {
  margin: 0in 0in .0001pt 0in;
  text-indent: 25pt;
  line-height: 300%;
  font-size: 16.0pt;
  font-family: "Garamond", serif;
  text-align: center;
}

a:link,
a:visited,
a:active {
  color: #FFFFFF;
  text-decoration: none;
}

a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.counter {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 1px;
  height: 1px;
}

.footer {
  position: relative;
  left: 10px;
  border: 0px solid #999999;
  margin: 0.0001pt;
  text-align: left;
}

.buy_at {
  position: absolute;
  left: 6px;
  top: 30px;
  border: 0px solid;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 24px;
  color: #FFFFFF;
  text-align: left;
  display: flex;
  align-items: center;
}

.buy_at .buy_label {
  margin-top: 0;
  margin-right: 10px;
  font-family: 'Roboto Condensed', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 30px;
  transform: scaleY(1.35);
  transform-origin: center left;
}

.buy_at .buy_links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.buy_at a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
  border: 2px solid #FFFFFF;
  border-radius: 8px;
  padding: 5px 15px;
  display: block;
  margin: 0;
  text-align: center;
}

.buy_at a:hover {
  color: #F97C03;
  border-color: #F97C03;
}

.chap_read {
  position: absolute;
  left: 320px;
  top: 30px;
  border: 0px solid;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chap_read.centered {
  align-items: center;
}

.book_cover {
  width: 200px;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
}

.buy_at.last_chap {
  left: 234px;
  top: 120px;
}

.chap_read.last_chap {
  left: 6px;
}

.chap_read a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
  border: 2px solid #FFFFFF;
  border-radius: 8px;
  padding: 5px 15px;
  display: block;
  text-align: center;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  cursor: pointer;
}

.chap_read a:hover {
  color: #F97C03;
  border-color: #F97C03;
}

.chap_read a.next_chap {
  font-size: 24px;
  line-height: 1.1;
  padding: 10px 20px;
}

.chap_read a.prev_chap {
  font-size: 14px;
  padding: 5px 15px;
}

.adv_cont {
  position: absolute;
  left: 20px;
  top: 0px;
  border: 0px solid;
}


.copyright_text {
  color: #999999;
  font-size: 12px;
  margin-top: 100px;
  margin-left: 0;
  text-align: right;
  display: block;
  clear: both;
}

.blank_spacer {
  border: 0px solid;
}


/* 
.chap_amazon {
  position: absolute;
  left: 2px;
  top: 96px;
  border: 0px solid;
}

.chap_BandN {
  position: absolute;
  left: 78px;
  top: 26px;
  border: 0px solid;
}

.chap_buy_at {
  position: absolute;
  left: 21px;
  top: 30px;
  border: 0px solid;
}
*/


/*
.end_excerpt .chap_amazon {
  left: 230px;
  top: 146px;
}

.end_excerpt .chap_BandN {
  left: 306px;
  top: 76px;
}

.end_excerpt .chap_buy_at {
  left: 249px;
  top: 80px;
}

.end_excerpt .buy_at {
  left: 249px;
  top: 80px;
}

/*
.end_excerpt .chap_read {
  left: 24px;
  top: 21px;
}
*/

/* Mobile Responsive Chapter Layout */
@media (max-width: 768px) {
    body {
        background-image: none !important; /* remove background pattern on small screens */
        background-color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        width: 100vw !important;
    }
    .chapter_container {
        width: 100vw !important;
        max-width: 100% !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        margin: 0 !important;
    }
    .body_text, .body_text_noindent {
        font-size: 18px;
        line-height: 1.4;
    }
    .footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        left: 0;
        position: relative;
        margin-top: 40px;
    }
    .buy_at, .chap_read, .buy_at.last_chap, .chap_read.last_chap {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        margin-bottom: 60px;
    }
    .buy_at {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .chap_read.last_chap {
        order: -1;
        margin-bottom: 12px !important;
    }
    .buy_at.last_chap {
        margin-bottom: 30px;
    }
    .buy_at .buy_label {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .buy_at .buy_links {
        display: flex;
        flex-direction: row;
        gap: 15px;
        align-items: center;
    }
    .buy_at a {
        min-width: 120px;
    }
    .copyright_text {
        margin-left: 0;
        text-align: center;
        margin-top: 20px;
        margin-bottom: 40px;
    }
    .chap_read {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .chap_read a.next_chap {
        width: auto;
        padding: 5px 15px;
        box-sizing: border-box;
    }
    .chap_read a.prev_chap {
        box-sizing: border-box;
    }
}