.novel-world {
  --novel-rail: 0px;
  padding: 0 !important;
  display: grid;
  grid-template-columns: var(--novel-rail) minmax(0, 1fr);
  min-height: 100dvh;
  overflow-x: clip;
}
.novel-world .work-page {
  grid-column: 2;
  width: 100%;
  max-width: 1160px;
  min-width: 0;
  margin: 0 auto;
  padding: 20px clamp(18px, 4vw, 46px) calc(100px + env(safe-area-inset-bottom)) !important;
}
.novel-world .novel-nav {
  position: fixed;
  inset: auto 0 0;
  width: auto;
  height: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  gap: 4px;
  border: 0;
  border-top: 1px solid var(--page-line);
  z-index: 30;
  background: var(--page-card);
}
.novel-world .novel-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 14px;
  padding: 8px 4px;
  background: none;
  color: var(--page-muted);
  font-size: 11px;
  width: auto;
  height: auto;
}
.novel-world .novel-nav svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.novel-world .novel-nav button.active {
  background: color-mix(in srgb, var(--page-accent) 10%, transparent);
  color: var(--page-accent);
}
.library-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--page-muted);
  font-size: 13px;
}
.library-heading {
  padding: 28px 0 22px;
}
.novel-eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--page-accent);
}
.library-heading h1 {
  font:
    600 clamp(25px, 4vw, 38px)/1.35 Georgia,
    "Noto Serif SC",
    serif;
  margin: 10px 0;
}
.library-heading > p:last-child {
  font-size: 13px;
  color: var(--page-muted);
  margin: 0;
}
.library-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0 24px;
  font-size: 13px;
  color: var(--page-muted);
}
.library-tools select {
  background: var(--page-card);
  color: var(--page-text);
  border: 1px solid var(--page-line);
  border-radius: 12px;
  padding: 9px 10px;
  font: inherit;
}
.novel-world .work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 26px;
}
.novel-world .novel-open {
  display: grid;
  grid-template-columns: 85px minmax(0, 1fr) !important;
  gap: 16px;
  width: 100%;
  background: none;
  border: 0;
}
.novel-world .novel-open .novel-cover {
  width: 85px;
  aspect-ratio: 3/4;
}
.novel-world .novel-copy h3 {
  font:
    600 17px/1.5 Georgia,
    "Noto Serif SC",
    serif;
  margin: 0 0 8px;
}
.novel-world .novel-copy .novel-intro-preview {
  margin: 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.8;
  font-size: 12px;
}
.novel-shelf-remove {
  margin: 10px 0 0 101px;
  font-size: 11px;
  background: none;
  color: var(--page-muted);
  border: 0;
  padding: 5px;
}
.novel-world #novelProfile {
  padding: 20px 0;
  display: flex;
  flex-wrap: nowrap;
}
.novel-world #novelProfile > div {
  min-width: 0;
}
.novel-world #novelProfile p {
  overflow-wrap: anywhere;
}
.library-profile-stats {
  display: flex;
  gap: clamp(20px, 6vw, 70px);
  align-items: center;
  border-block: 1px solid var(--page-line);
  padding: 30px 0;
  flex-wrap: wrap;
}
.library-profile-stats strong {
  display: block;
  font-size: 28px;
}
.library-profile-stats span,
.library-profile-stats a {
  font-size: 12px;
  color: var(--page-muted);
}
.library-profile-stats a {
  color: var(--page-accent);
  margin-left: auto;
}
.novel-work-focus {
  display: grid;
  grid-template-columns: minmax(100px, 180px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 40px);
  border: 1px solid var(--page-line);
  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--page-accent) 8%, var(--page-card)),
    var(--page-card)
  );
  border-radius: 25px;
  padding: clamp(20px, 4vw, 36px);
}
.novel-work-focus > .novel-cover {
  width: 100%;
  max-width: 180px;
  align-self: center;
}
.novel-work-description {
  min-width: 0;
  align-self: center;
}
.novel-work-description h2 {
  font:
    600 clamp(21px, 3vw, 30px)/1.5 Georgia,
    "Noto Serif SC",
    serif;
  overflow-wrap: anywhere;
  margin: 12px 0;
}
.novel-work-intro {
  font-size: 13px;
  color: var(--page-muted);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.novel-work-strip {
  display: flex;
  gap: 14px;
  padding: 24px 3px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.novel-work-strip button {
  width: 68px;
  flex: none;
  background: none;
  border: 2px solid transparent;
  border-radius: 9px;
  padding: 3px;
  scroll-snap-align: start;
}
.novel-work-strip .selected {
  border-color: var(--page-accent);
}
.novel-work-strip .novel-cover {
  width: 100%;
  border-radius: 5px;
}
.book-review-list {
  padding-top: 22px;
}
.book-review {
  border-top: 1px solid var(--page-line);
  padding: 16px 0;
}
.book-review header {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
}
.book-review p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.8;
}
.book-review-rating {
  color: var(--page-accent);
  margin-left: auto;
}
.novel-reader #generate,
.novel-reader #undoGeneration {
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 10px;
}
.novel-reader #regenerateRow {
  display: none !important;
}
.novel-reader #readerMenu #regenerateChapter,
.novel-reader #readerMenu #generationVersions {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: left;
  padding: 12px 18px;
  font-size: 14px;
}
.novel-reader #readerMenu svg {
  display: none;
}
.novel-reader #readerMenu {
  max-height: min(420px, 70dvh);
  overflow: auto;
}
@media (min-width: 1000px) and (min-height: 540px) {
  .novel-world {
    --novel-rail: 104px;
  }
  .novel-world .novel-nav {
    inset: 0 auto 0 0;
    width: var(--novel-rail);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--page-line);
    border-top: 0;
    gap: 12px;
    padding: 20px 12px;
  }
  .novel-world .novel-nav button {
    padding: 15px 6px;
    width: 100%;
  }
}
@media (max-width: 480px) {
  .novel-work-focus {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
  }
  .novel-work-description .community-actions {
    gap: 6px;
  }
  .novel-work-description button {
    font-size: 12px;
    padding: 8px 10px;
  }
  .novel-work-intro {
    -webkit-line-clamp: 2;
  }
}
