.page-kizahana .header {
  padding: 1rem 2rem;
}

.page-kizahana .header h1 {
  justify-content: center;
  text-align: center;
}

.page-kizahana .header h1 img {
  height: 5rem;
  width: auto;
}

.page-kizahana > .container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.page-kizahana .footer {
  border-top: 0.1rem solid #f0f0f0;
  background-image: none;
  font-size: 1.3rem;
  margin-top: 6rem;
}

.page-kizahana .footer .container {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

#main-content {
  max-width: 84rem;
  width: 100%;
}

#main-content article {
  padding: 2rem;
}

#main-content article h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 4rem;
}

#main-content article .entry-content {
  line-height: 1.8;
}

.kizahana-meta {
  position: relative;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
}

#sidebar {
  padding: 2rem;
  width: 30rem;
}

#sidebar h3 {
  font-size: 1.4rem;
  font-weight: 400;
  text-align: center;
}

#sidebar .toc-container {
  border-top: 0.1rem solid #d5d5d5;
  padding-top: 0.7rem;
}

#sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#sidebar ul.chapter-group {
  margin-bottom: 1rem;
}

#sidebar ul li {
  font-size: 1.4rem;
  line-height: 1.5;
}

#sidebar ul li a {
  display: block;
  padding: 1.2rem 0;
}

#sidebar ul li a:hover {
  opacity: 0.7;
}

#sidebar ul li.is-current a {
  color: #C7BA79;
}

#sidebar ul li.episode-item {
  border-bottom: 0.1rem solid #d5d5d5;
}

#sidebar p {
  font-size: 1.2rem;
  line-height: 1.5;
}

.chapter-title {
  cursor: pointer;
  display: flex;
  align-items: baseline;
  position: relative;
  padding-right: 2rem;
}

.chapter-title:hover {
  opacity: 0.7;
}

.chapter-title::after {
  content: "+";
  display: inline-block;
  font-size: 1.6rem;
  position: absolute;
  top: 50%;
  right: 0;
  width: 1rem;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
  text-align: center;
}

.chapter-title.list-active::after {
  content: "-";
  transform: translateY(-50%) rotate(180deg);
}

.edition-span {
  display: inline-block;
  margin-left: auto;
}

.edition-group {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.novel-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 7rem;
}

.novel-navigation a:hover {
  opacity: 0.7;
}

@media screen and (min-width: 1024px) {
  #main-content {
    width: calc(100% - 40rem);
  }

  #sidebar .toc-container {
    border-color: #d5d5d5;
  }

  #sidebar ul li {
    border-color: #d5d5d5;
  }

  #sidebar ul li a {
    padding: 0.7rem 0;
  }

  #sidebar {
    position: sticky;
    top: 2rem;
    width: 30rem;
    height: auto;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    background-color: #f5f5f5;
  }

  .mobile-menu-btn {
    display: none;
  }
}

@media screen and (min-width: 1290px) {
  .page-kizahana > .container {
    justify-content: space-between;
  }
}

@media screen and (max-width: 1024px) {
  .page-kizahana .footer {
    margin-top: 3rem;
  }

  #main-content article h2 {
    font-size: 1.8rem;
    margin-bottom: 3rem;
  }

  #main-content article .entry-content {
    line-height: 1.6;
  }

  .kizahana-meta {
    font-size: 1.6rem;
  }
}

@media screen and (max-width: 1023.98px) {
  .mobile-menu-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-size: 1.4rem;
    font-weight: bold;
  }

  .close-text {
    display: none;
    font-size: 24px;
  }

  .mobile-menu-btn.active {
    background: #555;
  }

  .mobile-menu-btn.active .open-text {
    display: none;
  }

  .mobile-menu-btn.active .close-text {
    display: block;
  }

  #sidebar {
    position: fixed;
    top: 0;
    right: -32rem;
    width: 30rem;
    height: 100%;
    background-color: #f5f5f5;
    z-index: 9999;
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  #sidebar.is-open {
    transform: translateX(-32rem);
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 9998;
  }

  .overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }
}