body {
  margin: 0;
  background: #2a211b; /* dark outer frame */
  color: #2b2b2b;
  font-family: Georgia, serif;
}

.reader-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px;
}

.reader-header {
  text-align: center;
  color: #e6dccf;
  margin-bottom: 20px;
}

.reader-header h1 {
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.reader-sub {
  font-style: italic;
  opacity: 0.85;
}

.reader-actions {
  margin-top: 12px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid #e6dccf;
  color: #e6dccf;
  text-decoration: none;
  font-size: 14px;
}

.btn:hover {
  background: rgba(255,255,255,0.08);
}

/* Reading frame */
.reader-frame {
  background: #f6f1e7;
  padding: 40px 28px;   /* narrower side margins */
  min-height: 55vh;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

/* Page text */
.reader-page {
  font-size: 18px;
  line-height: 1.7;

  height: 56vh;            /* ← THIS IS THE REAL FIX */
  overflow: hidden;
  
  white-space: pre-line;
  text-indent: 1.5em;
}


/* Controls */
.reader-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  color: #e6dccf;
}

.reader-controls button {
  background: none;
  border: 1px solid #e6dccf;
  color: #e6dccf;
  padding: 8px 14px;
  cursor: pointer;
}

.reader-controls button:hover {
  background: rgba(255,255,255,0.08);
}

#pageIndicator {
  font-size: 14px;
  opacity: 0.8;
}

.reader-tools{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  margin-top:12px;
}

/* Chapter dropdown (TOC) */
.toc {
  color: #1a1a1a;           /* dark text */
  background-color: #ffffff;
  border: 1px solid #3a2f26;
  padding: 6px 10px;
  font-size: 15px;
  font-family: Georgia, serif;
}


.font-tools{
  display:flex;
  gap:8px;
}

.btn-small{
  background:none;
  border:1px solid #e6dccf;
  color:#e6dccf;
  padding:8px 10px;
  cursor:pointer;
}
.btn-small:hover{ background: rgba(255,255,255,0.08); }

.reader-nav {
  margin-bottom: 10px;
}

.reader-home {
  font-size: 14px;
  color: #e6dccf;
  text-decoration: none;
  opacity: 0.85;
}

.reader-home:hover {
  text-decoration: underline;
  opacity: 1;
}
.reader-page {
  text-indent: 0;
}
.reader-page {
  white-space: pre-wrap;
}

.reader-page p {
  margin-top: 0.8em;
}
/* Chapter heading */
.chapter-title {
  font-weight: 600;
  font-size: 1.15em;
  margin: 1.5em 0 1.2em 0;
  letter-spacing: 0.02em;
}

/* Drop cap on first paragraph after chapter */
.chapter-title + p::first-letter {
  float: left;
  font-size: 3.2em;
  line-height: 0.9;
  padding-right: 0.1em;
  padding-top: 0.05em;
  font-weight: 500;
}