:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #eef5f1;
  --ink: #17242f;
  --muted: #6b7785;
  --line: #dce5df;
  --teal: #2f7d76;
  --teal-dark: #215e5a;
  --coral: #e9634d;
  --gold: #d7a742;
  --reader-size: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

.auth-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(47, 125, 118, 0.12), transparent 48%),
    var(--bg);
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-card {
  padding: 26px;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(23, 36, 47, 0.16);
}

.auth-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 12px 28px rgba(23, 36, 47, 0.18);
}

.auth-card h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.auth-subtitle {
  margin: 8px 0 18px;
  color: var(--muted);
}

.auth-error {
  margin: 0 0 12px;
  color: var(--coral);
  font-weight: 800;
}

.auth-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  text-align: left;
  font-weight: 750;
}

.auth-field input {
  height: 46px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--surface);
}

.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 16px;
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
}

body.shell-page {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(47, 125, 118, 0.08), transparent 320px),
    var(--bg);
  font-size: 15px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 58px;
  color: #fff;
  background: linear-gradient(135deg, #17242f, #205b58);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(23, 36, 47, 0.16);
}

.header .title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  overflow: hidden;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.82);
}

.header .home,
.header .user {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.header .home {
  left: 12px;
}

.header .user {
  right: 12px;
}

.lnr {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nav {
  max-width: 1120px;
  margin: 16px auto 0;
  padding: 0 14px;
}

.nav ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

.nav li,
.lis li,
.topli li {
  list-style: none;
}

.nav a {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: var(--teal-dark);
  font-weight: 750;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search {
  max-width: 760px;
  margin: 16px auto;
  padding: 0 14px;
}

.search form {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 36, 47, 0.08);
}

.search .text {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  border: 0;
  outline: 0;
  background: transparent;
}

.search .btn,
.login .btn {
  min-width: 58px;
  height: 44px;
  padding: 0 18px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  background: var(--coral);
}

.wrap,
.books,
.comment,
.link,
.login,
.userinfo {
  width: min(1120px, calc(100% - 28px));
  margin-inline: auto;
}

.hot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.item {
  position: relative;
  min-height: 144px;
  overflow: hidden;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(23, 36, 47, 0.07);
}

.item .p10 {
  display: contents;
}

.item .image {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 82px;
}

.item .image img {
  width: 82px;
  height: 108px;
  object-fit: cover;
  background: var(--surface-soft);
  border-radius: 6px;
  box-shadow: 0 10px 18px rgba(23, 36, 47, 0.16);
}

.item dl {
  min-height: 110px;
  margin: 0;
  padding-left: 100px;
}

.item dt {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
}

.item dt span {
  order: 2;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.item dt a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item dd {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.block {
  margin: 22px 0;
  padding: 0;
}

.block h2,
.book_about dt,
.book_last dt,
.comment dt {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.3;
}

.block h2::before,
.book_about dt::before,
.book_last dt::before,
.comment dt::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
  background: var(--coral);
  border-radius: 999px;
}

.lis,
.topli,
.tlis {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.lis li,
.topli li,
.tlis li {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) minmax(70px, auto);
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lis .s1,
.lis .s3 {
  color: var(--muted);
  font-size: 13px;
}

.lis .s2,
.lis .s2 a,
.topli a,
.tlis a {
  min-width: 0;
  overflow: hidden;
  color: var(--teal-dark);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page,
.loadmore,
.book_more,
.comment_more {
  width: min(560px, 100%);
  margin: 18px auto;
  text-align: center;
}

.comment,
.link,
.readinline,
.read_verif,
.bdsharebuttonbox,
.readon,
a[onclick*="book_error"],
a[onclick*="chapter_error"],
a[onclick*="addBookMark"],
a[onclick*="addBookCase"] {
  display: none !important;
}

.page a,
.page b,
.loadmore,
.book_more a,
.comment_more {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin: 4px;
  padding: 0 14px;
  color: var(--teal-dark);
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.page b,
.book_more a,
.loadmore:not(.is-done) {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.books {
  margin-top: 18px;
}

.book_info {
  position: relative;
  min-height: 170px;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(47, 125, 118, 0.13), rgba(255, 255, 255, 0.92));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book_info .cover {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 104px;
}

.book_info .cover img {
  width: 104px;
  height: 138px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 14px 26px rgba(23, 36, 47, 0.2);
}

.book_box {
  min-height: 138px;
  padding-left: 126px;
}

.book_box dl {
  margin: 0;
}

.book_box .name,
.book_box .title {
  margin-bottom: 12px;
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.15;
}

.dd_box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
}

.dd_box span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.readlink {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 22px;
}

.readlink a {
  min-height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border-radius: 8px;
  background: var(--teal);
}

.readlink .rl {
  background: var(--coral);
}

.book_about,
.book_last,
.comment {
  margin-bottom: 22px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book_about dl,
.book_last dl,
.comment dl {
  margin: 0;
}

.book_about dd {
  margin: 0;
  color: #3d4854;
  font-size: 16px;
  line-height: 1.9;
}

.book_last dd {
  margin: 0;
  border-top: 1px solid var(--line);
}

.book_last dd a {
  display: block;
  overflow: hidden;
  padding: 12px 0;
  color: var(--teal-dark);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book_last .onlist,
.oninfo {
  float: right;
  color: var(--coral);
  font-size: 13px;
}

.comment dd {
  margin: 12px 0 0;
  padding-top: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.comment dd p {
  margin: 4px 0;
  color: #3d4854;
}

.link {
  overflow-x: auto;
  padding: 12px 0;
  color: var(--muted);
  white-space: nowrap;
}

.link a {
  display: inline-flex;
  margin: 4px;
  padding: 6px 10px;
  color: var(--teal-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.footer {
  margin-top: 26px;
  padding: 24px 14px 34px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  background: #17242f;
}

.footer a {
  color: rgba(255, 255, 255, 0.88);
  margin: 0 8px;
}

.empty-state,
.hots {
  padding: 44px 16px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.shell-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 99;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  color: #fff;
  font-weight: 750;
  background: rgba(23, 36, 47, 0.94);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.shell-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.shell-error {
  width: min(640px, calc(100% - 28px));
  margin: 12vh auto;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.shell-error h1 {
  margin-top: 0;
}

body.is-reader {
  background: #f2f5f2;
}

body.is-reader[data-reader-theme="night"] {
  color: #d6ddd9;
  background: #121918;
}

body.is-reader[data-reader-theme="night"] .header,
body.is-reader[data-reader-theme="night"] .footer {
  background: #0d1212;
}

#read {
  min-height: 100vh;
}

.Readpage {
  width: min(820px, calc(100% - 28px));
  margin: 14px auto;
  padding: 10px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.Readpage a,
.reader-shell-controls button,
.button,
.sizebg {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin: 3px;
  padding: 0 12px;
  color: var(--teal-dark);
  font-weight: 850;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.reader-shell-controls {
  position: sticky;
  top: 68px;
  z-index: 20;
  width: min(820px, calc(100% - 28px));
  margin: 14px auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reader-shell-controls button {
  cursor: pointer;
}

.reader-shell-controls button.is-on {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.Readarea,
#chaptercontent {
  width: min(820px, calc(100% - 28px));
  margin: 18px auto;
  padding: clamp(18px, 4vw, 42px);
  color: #24313a;
  font-family: Georgia, "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: var(--reader-size);
  line-height: 2.05;
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(23, 36, 47, 0.08);
}

body.is-reader[data-reader-theme="night"] .Readarea,
body.is-reader[data-reader-theme="night"] #chaptercontent,
body.is-reader[data-reader-theme="night"] .Readpage,
body.is-reader[data-reader-theme="night"] .reader-shell-controls button {
  color: #d6ddd9;
  background: #182120;
  border-color: #2c3b37;
}

.readinline {
  width: min(820px, calc(100% - 28px));
  margin: 12px auto;
  color: var(--muted);
  text-align: center;
}

.auto-next-frame {
  position: fixed !important;
  left: -10000px !important;
  top: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

body.is-reader iframe:not(.auto-next-frame),
body.is-reader ins,
body.is-reader .adsbygoogle,
body.is-reader .google-auto-placed,
body.is-reader [id*="广告"],
body.is-reader [class*="广告"] {
  display: none !important;
}

.auto-next-sentinel {
  width: min(820px, calc(100% - 28px));
  margin: 16px auto 28px;
  text-align: center;
}

.auto-next-button {
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
}

.auto-next-chapter {
  width: min(820px, calc(100% - 28px));
  margin: 24px auto;
}

.auto-next-chapter h2 {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 22px;
  text-align: center;
}

.auto-next-content {
  padding: clamp(18px, 4vw, 42px);
  color: #24313a;
  font-family: Georgia, "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: var(--reader-size);
  line-height: 2.05;
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(23, 36, 47, 0.08);
}

body.is-reader[data-reader-theme="night"] .auto-next-content {
  color: #d6ddd9;
  background: #182120;
  border-color: #2c3b37;
}

@media (min-width: 760px) {
  .nav ul {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .hot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-home .hot:first-child {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.is-home .hot:first-child .item {
    min-height: 256px;
  }

  body.is-home .hot:first-child .item .image {
    position: static;
    width: 100%;
    margin-bottom: 12px;
  }

  body.is-home .hot:first-child .item .image img {
    width: 100%;
    height: 188px;
  }

  body.is-home .hot:first-child .item dl {
    padding-left: 0;
  }
}

@media (min-width: 1040px) {
  .hot {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .header {
    min-height: 52px;
    padding-inline: 54px;
  }

  .nav ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .item {
    min-height: 132px;
    padding: 12px;
  }

  .item .image {
    top: 12px;
    left: 12px;
    width: 74px;
  }

  .item .image img {
    width: 74px;
    height: 100px;
  }

  .item dl {
    padding-left: 88px;
  }

  .item dt {
    display: block;
  }

  .item dt span {
    display: block;
    margin: 3px 0 0;
  }

  .lis li,
  .topli li,
  .tlis li {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .lis .s3 {
    display: none;
  }

  .book_info {
    min-height: 152px;
    padding: 14px;
  }

  .book_info .cover {
    top: 14px;
    left: 14px;
    width: 88px;
  }

  .book_info .cover img {
    width: 88px;
    height: 118px;
  }

  .book_box {
    padding-left: 104px;
  }

  .readlink {
    grid-template-columns: 1fr;
  }
}
