:root {
  --reader-header: 56px;
  --reader-dark: #2b2b2c;
  --reader-dark-2: #242425;
  --reader-dark-3: #3a3a3c;
  --reader-text: #e7e7e9;
  --reader-muted: #a1a2a7;
  --reader-red: #e9003f;
  --reader-line: rgba(255, 255, 255, .08);
  --comic-width: 800px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 1180px;
  color: var(--reader-text);
  background: var(--reader-dark);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 25px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.reader-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--reader-header);
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) auto 300px;
  align-items: center;
  padding: 0 28px;
  background: rgba(34, 34, 35, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  box-shadow: 0 2px 18px rgba(0, 0, 0, .18);
}

.reader-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.reader-logo {
  color: rgba(255, 255, 255, .86);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.reader-feedback {
  padding-left: 14px;
  color: rgba(255, 255, 255, .38);
  border-left: 1px solid rgba(255, 255, 255, .12);
  font-size: 14px;
}

.reader-crumb {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, .48);
  font-size: 15px;
  white-space: nowrap;
}

.reader-crumb a:first-child {
  color: #fff;
  font-weight: 700;
}

.reader-crumb a:hover {
  color: #fff;
}

.reader-crumb h1 {
  margin: 0;
  max-width: 180px;
  overflow: hidden;
  color: rgba(255, 255, 255, .34);
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-page-index {
  min-width: 62px;
  height: 26px;
  margin: 0 14px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  color: rgba(255, 255, 255, .78);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.reader-page-index:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .62);
}

.reader-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.reader-header-actions a,
.reader-header-actions button {
  min-width: 34px;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
}

.reader-header-actions a:hover,
.reader-header-actions button:hover,
.reader-header-actions button.is-on {
  color: #fff;
}

.reader-header-actions .material-symbols-rounded {
  font-size: 22px;
}

.reader-avatar {
  width: 42px;
  height: 42px;
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  color: #fff !important;
  background: rgba(255, 255, 255, .18);
}

.reader-mini-form {
  margin: 0;
}

.reader-toast {
  position: fixed;
  z-index: 80;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  padding: 10px 18px;
  color: #fff;
  text-align: center;
  background: rgba(20, 20, 21, .92);
  border-radius: 4px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}

.reader-toast.is-error {
  background: rgba(190, 20, 42, .95);
}

.reader-recommend {
  position: fixed;
  z-index: 30;
  top: var(--reader-header);
  bottom: 0;
  left: 0;
  width: 140px;
  overflow: hidden;
  background: rgba(51, 51, 53, .94);
  border-right: 1px solid rgba(255, 255, 255, .04);
}

.recommend-title {
  height: 32px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, .62);
  font-size: 15px;
}

.recommend-title .material-symbols-rounded {
  font-size: 18px;
}

.recommend-scroll {
  height: calc(100vh - var(--reader-header) - 32px);
  overflow-y: auto;
  padding: 0 16px 16px;
  scrollbar-color: rgba(255, 255, 255, .55) rgba(255, 255, 255, .08);
  scrollbar-width: thin;
}

.recommend-cover {
  display: block;
  margin-bottom: 18px;
}

.recommend-cover img {
  width: 100px;
  height: 133px;
  object-fit: cover;
  background: #1b1b1c;
}

.reader-shell {
  position: relative;
  width: var(--comic-width);
  min-height: 100vh;
  margin: 0 auto;
  padding-top: var(--reader-header);
}

.reader-info-pill {
  position: fixed;
  z-index: 20;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px 20px;
  color: rgba(255, 255, 255, .9);
  background: rgba(22, 22, 24, .72);
  font-size: 16px;
  pointer-events: none;
}

.reader-images {
  width: var(--comic-width);
  margin: 0 auto;
  padding: 4px 0 0;
}

.reading-image {
  display: block;
  width: var(--comic-width);
  max-width: none;
  height: auto;
  margin: 0 auto;
  background: #1d1d1f;
  box-shadow: none;
}

.reader-paged .reader-images {
  min-height: calc(100vh - var(--reader-header));
  display: flex;
  align-items: flex-start;
}

.reader-paged .reading-image {
  display: none;
}

.reader-paged .reading-image.is-active {
  display: block;
}

.reader-finish,
.reader-seo-summary,
.reader-app-card {
  margin: 28px auto;
  padding: 24px;
  color: #d9d9dd;
  background: rgba(21, 21, 22, .88);
  border: 1px solid rgba(255, 255, 255, .08);
}

.reader-finish h2,
.reader-seo-summary h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.reader-finish-actions,
.reader-seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reader-finish-actions a,
.reader-finish-actions span,
.reader-seo-links a,
.reader-app-card a {
  min-height: 38px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}

.reader-finish-actions .primary,
.reader-app-card a {
  color: #fff;
  background: var(--reader-red);
  border-color: var(--reader-red);
}

.reader-finish-actions .disabled {
  color: rgba(255, 255, 255, .32);
  cursor: not-allowed;
}

.reader-seo-summary {
  color: rgba(255, 255, 255, .68);
}

.reader-seo-summary p {
  margin: 0 0 16px;
  line-height: 1.8;
}

.reader-app-card {
  margin-bottom: 70px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  align-items: center;
}

.reader-app-card strong {
  color: #fff;
  font-size: 21px;
}

.reader-app-card span {
  color: rgba(255, 255, 255, .58);
}

.reader-app-card a {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.reader-empty {
  margin-top: 120px;
  padding: 80px 30px;
  color: rgba(255, 255, 255, .62);
  text-align: center;
  background: rgba(255, 255, 255, .05);
}

.reader-tools {
  position: fixed;
  z-index: 40;
  top: 50%;
  right: 0;
  width: 68px;
  padding: 10px 0;
  display: grid;
  gap: 4px;
  transform: translateY(-50%);
  background: rgba(64, 64, 66, .78);
  border-radius: 16px 0 0 16px;
}

.reader-tools a,
.reader-tools button {
  min-height: 54px;
  display: grid;
  place-items: center;
  gap: 3px;
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
}

.reader-tools form {
  margin: 0;
}

.reader-tools .material-symbols-rounded {
  font-size: 27px;
}

.reader-tools a:hover,
.reader-tools button:hover,
.reader-tools button.is-on {
  color: #fff;
}

.reader-catalog,
.reader-page-popover {
  position: fixed;
  z-index: 70;
  top: 70px;
  right: 78px;
  width: 390px;
  max-height: calc(100vh - 110px);
  overflow: hidden;
  color: #e8e8eb;
  background: rgba(28, 28, 30, .98);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
}

.catalog-head {
  height: 52px;
  padding: 0 14px 0 18px;
  display: grid;
  grid-template-columns: 1fr auto 34px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.catalog-head strong {
  font-size: 18px;
}

.catalog-head span {
  color: rgba(255, 255, 255, .48);
  font-size: 13px;
}

.catalog-head button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .5);
}

.catalog-list {
  max-height: calc(100vh - 162px);
  overflow-y: auto;
  padding: 8px;
}

.catalog-list a {
  min-height: 42px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  color: rgba(255, 255, 255, .72);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.catalog-list a:hover,
.catalog-list a.active {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.catalog-list span {
  color: rgba(255, 255, 255, .38);
  font-variant-numeric: tabular-nums;
}

.catalog-list em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-list {
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.page-list button {
  height: 38px;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .06);
}

.page-list button:hover,
.page-list button.active {
  color: #fff;
  background: var(--reader-red);
}

.reader-theme-light {
  --reader-dark: #f3f3f4;
  --reader-dark-2: #fff;
  --reader-text: #28292d;
  --reader-muted: #686c74;
  background: #f3f3f4;
}

.reader-theme-light .reader-header {
  background: rgba(255, 255, 255, .96);
  border-bottom-color: rgba(0, 0, 0, .08);
}

.reader-theme-light .reader-logo,
.reader-theme-light .reader-crumb a:first-child,
.reader-theme-light .reader-crumb a:hover,
.reader-theme-light .reader-header-actions a:hover,
.reader-theme-light .reader-header-actions button:hover,
.reader-theme-light .reader-header-actions button.is-on {
  color: #202124;
}

.reader-theme-light .reader-crumb,
.reader-theme-light .reader-crumb h1,
.reader-theme-light .reader-feedback,
.reader-theme-light .reader-header-actions a,
.reader-theme-light .reader-header-actions button,
.reader-theme-light .reader-page-index {
  color: rgba(30, 32, 36, .58);
}

.reader-theme-light .reader-page-index {
  border-color: rgba(0, 0, 0, .22);
}

.reader-theme-light .reader-recommend,
.reader-theme-light .reader-tools,
.reader-theme-light .reader-catalog,
.reader-theme-light .reader-page-popover {
  background: rgba(255, 255, 255, .96);
  color: #28292d;
  border-color: rgba(0, 0, 0, .08);
}

.reader-theme-light .recommend-title,
.reader-theme-light .reader-tools a,
.reader-theme-light .reader-tools button,
.reader-theme-light .catalog-head span,
.reader-theme-light .catalog-head button,
.reader-theme-light .catalog-list a,
.reader-theme-light .catalog-list span {
  color: rgba(30, 32, 36, .58);
}

.reader-theme-light .reader-tools a:hover,
.reader-theme-light .reader-tools button:hover,
.reader-theme-light .catalog-list a:hover,
.reader-theme-light .catalog-list a.active {
  color: #202124;
  background: rgba(0, 0, 0, .04);
}

.reader-theme-light .reader-finish,
.reader-theme-light .reader-seo-summary,
.reader-theme-light .reader-app-card {
  color: #33363d;
  background: #fff;
  border-color: rgba(0, 0, 0, .08);
}

.reader-theme-light .reader-finish h2,
.reader-theme-light .reader-seo-summary h2,
.reader-theme-light .reader-app-card strong {
  color: #17191f;
}

.reader-theme-light .reader-seo-summary p,
.reader-theme-light .reader-app-card span {
  color: #6c717c;
}

.reader-theme-light .reader-finish-actions a,
.reader-theme-light .reader-finish-actions span,
.reader-theme-light .reader-seo-links a {
  color: #30343b;
  background: #f6f6f7;
  border-color: rgba(0, 0, 0, .08);
}

.reader-theme-light .reader-finish-actions .primary,
.reader-theme-light .reader-app-card a {
  color: #fff;
}

@media (max-width: 1320px) {
  body {
    min-width: 1000px;
  }

  .reader-header {
    grid-template-columns: 210px minmax(0, 1fr) auto 260px;
    padding: 0 18px;
  }

  .reader-recommend {
    display: none;
  }
}
