body {
  max-width: 900px;
  margin: 2em auto;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
  background: #fffbe6; /* warm paper tone */
  color: #333;
  padding: 2em;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  border-radius: 8px;
}

h1, h2, h3 {
  font-family: 'Palatino Linotype', Palatino, serif;
  color: #444;
  margin-top: 2em;
}

nav.epub-toc {
  margin-bottom: 2em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 1em;
}

nav.epub-toc ul {
  list-style: none;
  padding-left: 0;
}

nav.epub-toc li {
  margin: 0.5em 0;
}

nav.epub-toc a {
  text-decoration: none;
  color: #0077cc;
}

nav.epub-toc a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  margin: 1em 0;
}

.reader-container {
  display: flex;
  flex-direction: row;
  max-width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  background: #fefcf5;
  font-family: Georgia, serif;
}

.toc-sidebar {
  max-width:45%;
  background: #f8f4e3;
  padding: 1.5em;
  border-right: 1px solid #ccc;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}

.epub-toc ul {
  list-style: none;
  padding-left: 0;
}

.epub-toc li {
  margin: 0.5em 0;
}

.epub-toc a {
  text-decoration: none;
  color: #0066aa;
}

.epub-toc a:hover {
  text-decoration: underline;
}

.book-content {
  flex-grow: 1;
  padding: 2em;
  background: #fff;
  color: #333;
  line-height: 1.6;
  max-width: 55%;
  margin: 0 auto;
}


  label[for="toc-toggle"] {
    display: none;
  }
  .toc-sidebar {
    display: block;
    position: static;
    width: 250px;
    height: auto;
    box-shadow: none;
  }
  .reader-container {
    display: flex;
  }

/* Hide TOC sidebar by default on mobile */
@media (max-width: 768px) {
  .toc-sidebar {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 250px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    overflow-y: auto;
    z-index: 1000;
    padding: 1em;
  }

  /* Show TOC sidebar when toggle checked */
  #toc-toggle:checked ~ .toc-sidebar {
    display: block;
  }

  /* Hamburger icon styles */
  label[for="toc-toggle"] {
    display: block;
    position: fixed;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1100;
  }
  label[for="toc-toggle"] span {
    display: block;
    height: 3px;
    margin: 5px 0;
    background: #333;
    border-radius: 2px;
  }

  /* Hide the checkbox input */
  #toc-toggle {
    display: none;
  }

  /* Optionally adjust main content to full width when TOC hidden */
.book-content {
    max-width: 100% !important;
    width: 100%;
    margin: 0;
    padding: 1em;

  }


}


