body {
  background: #f6f4ef;
  color: #1b1b1b;
}

#reader-content {
  max-width: 820px;
  margin: 40px auto 80px auto;
  padding: 24px 20px 48px 20px;
  background: #fffdf8;
  border: 1px solid #e8e1d6;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

#reader-title {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 24px 0;
  color: #1f1a14;
}

#reader-body {
  font-size: 1.08rem;
  line-height: 1.9;
  color: #2a241d;
}

.reader-chapter {
  margin: 0 0 48px 0;
  padding: 0 0 24px 0;
  border-bottom: 1px solid #eee3d3;
}

.reader-chapter:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.reader-chapter h3 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 0 0 18px 0;
  color: #2f261d;
}

.reader-chapter p {
  margin: 0 0 1.15em 0;
}

.reader-chapter p:last-child {
  margin-bottom: 0;
}

::selection {
  background: #fde7a3;
  color: #111;
}

@media (max-width: 768px) {
  #reader-content {
    margin: 16px 10px 32px 10px;
    padding: 18px 14px 28px 14px;
    border-radius: 12px;
  }

  #reader-title {
    font-size: 1.5rem;
  }

  #reader-body {
    font-size: 1rem;
    line-height: 1.8;
  }

  .reader-chapter {
    margin-bottom: 36px;
  }
}

html {
  scroll-behavior: smooth;
}

.reader-chapter {
  scroll-margin-top: 24px;
}

#reader-toc {
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.reader-toc-item {
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
}

.reader-toc-item:hover {
  background: #f3f3f3;
}

.reader-toc-item.active {
  background: #e9ecef;
  font-weight: 700;
}
