:root {
  --brand: #0788ad;
  --brand-dark: #057899;
  --page: #f2f3f4;
  --panel: #fff;
  --text: #4f565f;
  --heading: #222f38;
  --muted: #7a8490;
  --rule: #e7eaee;
  --soft: #f7f9fa;
  --danger: #b42318;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-size: 16px;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  height: 74px;
  background: var(--brand);
  color: #fff;
}

.header-inner {
  width: min(1200px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand-text {
  flex: 1;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 16px;
  font-weight: 700;
}

.top-nav a {
  white-space: nowrap;
  opacity: 0.9;
}

.top-nav a:hover,
.top-nav a[aria-current],
.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

.top-nav a::before {
  display: inline-block;
  width: 17px;
  margin-right: 2px;
  text-align: center;
  opacity: 0.96;
}

.top-nav a:nth-child(1)::before { content: "⌂"; }
.top-nav a:nth-child(2)::before { content: "▥"; }
.top-nav a:nth-child(3)::before { content: "▣"; }
.top-nav a:nth-child(4)::before { content: "☷"; }
.top-nav a:nth-child(5)::before { content: "❤"; }
.top-nav a:nth-child(6)::before { content: "▤"; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.language-btn {
  height: 34px;
  padding: 0 15px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 5px;
  font-size: 15px;
}

.language-btn::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, #fff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 88%, #fff 0 31%, transparent 32%),
    #dfe6ea;
  display: inline-block;
}

.menu-toggle {
  display: none;
}

.page-shell {
  min-height: calc(100vh - 204px);
  padding: 20px 0 40px;
  outline: 0;
}

.home-panel,
.content-panel {
  width: min(1115px, calc(100% - 40px));
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.home-panel {
  min-height: 960px;
  padding: 62px 48px 46px;
}

.content-panel {
  padding: 34px 38px 42px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 56px;
}

.logo-wordmark {
  width: 326px;
  max-width: 82vw;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "number name"
    "domain domain";
  align-items: end;
  justify-content: center;
  column-gap: 10px;
  color: var(--brand);
  line-height: 1;
}

.logo-number {
  grid-area: number;
  font-size: 70px;
  font-weight: 900;
  letter-spacing: 0;
}

.logo-name {
  grid-area: name;
  padding-bottom: 5px;
  font-size: 48px;
  font-weight: 900;
}

.logo-domain {
  grid-area: domain;
  margin-top: 6px;
  text-align: center;
  color: #178aaf;
  font-size: 18px;
  letter-spacing: 3px;
}

.search-box,
.large-search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e7e9ee;
  box-shadow: 0 10px 28px rgba(20, 45, 62, 0.06);
  overflow: hidden;
}

.search-box {
  width: min(600px, 100%);
  height: 50px;
  margin: 0 auto 70px;
  border-radius: 28px;
}

.search-box input,
.large-search input,
.compact-search input,
.filter-line input {
  width: 100%;
  min-width: 0;
  color: #333;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-box input {
  height: 100%;
  padding: 0 18px;
  font-size: 16px;
}

.search-box button {
  width: 58px;
  height: 100%;
  border: 0;
  background: transparent;
}

.search-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  border: 3px solid #666;
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: "";
  width: 10px;
  height: 3px;
  background: #666;
  position: absolute;
  right: -8px;
  bottom: -5px;
  transform: rotate(45deg);
  border-radius: 2px;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: min(925px, 100%);
  margin: 0 auto 56px;
}

.quick-links a,
.primary-action,
.secondary-action,
.detail-actions button,
.compact-search button,
.large-search button,
.filter-line button,
.card-actions a,
.card-actions button,
.empty-state a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 6px;
  font-weight: 800;
}

.quick-links a {
  height: 50px;
  font-size: 17px;
}

.quick-links a:hover,
.primary-action:hover,
.compact-search button:hover,
.large-search button:hover,
.filter-line button:hover,
.card-actions a:hover,
.empty-state a:hover {
  background: var(--brand-dark);
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px;
}

.rank-card h2 {
  margin: 0;
  padding: 0 0 12px;
  color: #333;
  border-bottom: 2px solid var(--rule);
  font-size: 18px;
  line-height: 1.2;
}

.rank-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-card li {
  min-height: 44px;
  border-bottom: 1px solid var(--rule);
}

.rank-card li a {
  height: 44px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 2px;
  font-weight: 700;
}

.rank-index {
  width: 18px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #777;
  background: #ececec;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 800;
}

.rank-card li:nth-child(1) .rank-index {
  color: #fff;
  background: #f10b04;
}

.rank-card li:nth-child(2) .rank-index {
  color: #fff;
  background: #ff7707;
}

.rank-card li:nth-child(3) .rank-index {
  color: #fff;
  background: #d4a900;
}

.book-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #5d5d5d;
}

.book-status {
  color: #878787;
  text-align: right;
  font-weight: 400;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}

.section-head h1 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 28px;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.compact-search,
.filter-line {
  width: min(360px, 100%);
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}

.compact-search input,
.filter-line input {
  min-height: 42px;
  padding: 0 12px;
}

.compact-search button,
.filter-line button {
  min-height: 42px;
  border-radius: 0;
  white-space: nowrap;
}

.large-search {
  width: min(680px, 100%);
  min-height: 54px;
  margin: 24px 0 16px;
  border-radius: 9px;
}

.large-search input {
  min-height: 54px;
  padding: 0 16px;
}

.large-search button {
  min-height: 54px;
  border-radius: 0;
}

.filter-line {
  margin: 20px 0;
}

.sub-nav,
.chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sub-nav {
  margin: 20px 0 24px;
}

.sub-nav a,
.chip-row a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #4c5965;
  background: var(--soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-weight: 700;
}

.sub-nav a.active,
.chip-row a.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.book-list {
  display: grid;
  gap: 14px;
}

.book-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 112px;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.book-row:last-child {
  border-bottom: 0;
}

.book-row-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.book-row-title a,
.book-card h2,
.history-row h2 {
  margin: 0;
  color: var(--heading);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 800;
}

.book-row-title a:hover,
.book-card h2 a:hover,
.history-row h2 a:hover,
.update-row a:hover,
.text-link:hover {
  color: var(--brand);
}

.meta-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 14px;
}

.meta-line span + span::before {
  content: "·";
  margin-right: 12px;
  color: #b7bdc4;
}

.book-summary {
  margin: 10px 0;
  line-height: 1.75;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list a,
.status-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: #066580;
  background: #eaf8fc;
  border: 1px solid #d4edf4;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.book-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  text-align: right;
  font-size: 13px;
}

.book-row-side strong {
  color: var(--heading);
  font-size: 20px;
}

.text-link,
.plain-action,
.rank-badge {
  color: var(--brand);
  background: transparent;
  border: 0;
  font-weight: 800;
}

.plain-action {
  padding: 0;
}

.rank-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #fff;
  background: #1e7892;
  border-radius: 999px;
}

.book-cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 5px;
  box-shadow: 0 8px 20px rgba(10, 37, 52, 0.14);
}

.book-cover span {
  padding: 8px 8px 0;
  font-size: 12px;
  opacity: 0.88;
}

.book-cover strong {
  padding: 0 8px 10px;
  line-height: 1.25;
  font-size: 14px;
}

.remote-cover {
  background: #e9eef1;
}

.remote-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cover-small {
  width: 76px;
  height: 104px;
}

.cover-card {
  width: 100%;
  aspect-ratio: 3 / 4;
}

.cover-card strong {
  font-size: 18px;
}

.cover-large {
  width: 164px;
  min-width: 164px;
  height: 222px;
}

.cover-large strong {
  padding: 0 12px 16px;
  font-size: 23px;
}

.cover-large span {
  padding: 14px 12px 0;
}

.cover-aqua { background: linear-gradient(145deg, #0397c8, #143c61); }
.cover-amber { background: linear-gradient(145deg, #b65d11, #3d2a18); }
.cover-rose { background: linear-gradient(145deg, #c64b76, #44233f); }
.cover-violet { background: linear-gradient(145deg, #7862d9, #2c305c); }
.cover-slate { background: linear-gradient(145deg, #64748b, #17202b); }
.cover-green { background: linear-gradient(145deg, #249667, #193b32); }
.cover-lime { background: linear-gradient(145deg, #6f9d33, #26371f); }
.cover-blue { background: linear-gradient(145deg, #2c7edb, #19345b); }
.cover-indigo { background: linear-gradient(145deg, #4a6acb, #1e2857); }
.cover-ice { background: linear-gradient(145deg, #4aaac2, #29415a); }
.cover-red { background: linear-gradient(145deg, #c34433, #4b1f22); }

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.book-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 7px;
  overflow: hidden;
}

.book-card-body {
  padding: 14px;
}

.book-card h2 {
  margin-bottom: 8px;
}

.book-card p:not(.meta-line) {
  margin: 12px 0 14px;
  line-height: 1.7;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-actions button,
.secondary-action,
.detail-actions button {
  color: var(--brand);
  background: #fff;
}

.filter-block {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 18px 0 0;
}

.filter-block strong {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: var(--heading);
}

.category-stats,
.search-summary {
  margin: 20px 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.category-stats span,
.search-summary {
  min-height: 32px;
  align-items: center;
}

.category-stats span {
  display: inline-flex;
  padding: 0 10px;
  background: var(--soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.detail-hero {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.detail-main {
  min-width: 0;
}

.detail-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-title-line h1 {
  margin: 0;
  color: var(--heading);
  font-size: 32px;
  line-height: 1.2;
}

.detail-summary {
  max-width: 720px;
  margin: 18px 0;
  color: #3f4852;
  line-height: 1.85;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-columns {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 34px;
  padding-top: 28px;
}

.detail-columns h2 {
  margin: 0 0 16px;
  color: var(--heading);
  font-size: 20px;
}

.info-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.info-grid div {
  min-height: 58px;
  padding: 9px 12px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.info-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.info-grid dd {
  margin: 4px 0 0;
  color: var(--heading);
  font-weight: 800;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.chapter-grid a {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.chapter-grid a:hover {
  color: var(--brand);
  background: #f7fbfc;
}

.history-list {
  display: grid;
}

.history-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.history-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

.danger-btn {
  min-height: 40px;
  padding: 0 16px;
  color: var(--danger);
  background: #fff;
  border: 1px solid #f3c8c2;
  border-radius: 6px;
  font-weight: 800;
}

.update-list {
  margin-top: 18px;
  display: grid;
}

.update-row {
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) 112px 90px;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}

.update-row a:first-child {
  color: var(--heading);
  font-weight: 800;
}

.update-row span,
.update-row time {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reader-shell {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 48px 42px;
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.reader-paper {
  color: #373126;
  background: #f7f0df;
}

.reader-night {
  color: #c9d1d9;
  background: #161b22;
}

.reader-topbar,
.reader-pager {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.reader-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  color: inherit;
  opacity: 0.84;
}

.reader-topbar a {
  white-space: nowrap;
}

.reader-topbar span {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reader-title {
  padding: 34px 0 18px;
  text-align: center;
}

.reader-title h1 {
  margin: 0 0 10px;
  color: inherit;
  font-size: 30px;
  line-height: 1.25;
}

.reader-title p {
  margin: 0;
  opacity: 0.7;
}

.reader-tools {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 18px;
}

.reader-tools button {
  min-height: 34px;
  padding: 0 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(120, 120, 120, 0.35);
  border-radius: 999px;
}

.reader-tools button.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.reader-content {
  font-size: var(--reader-size);
  line-height: 2.05;
}

.reader-content p {
  margin: 0 0 1.2em;
  text-indent: 2em;
}

.reader-pager {
  display: flex;
  padding-top: 22px;
  border-top: 1px solid rgba(120, 120, 120, 0.28);
}

.reader-pager a,
.reader-pager span {
  min-width: 92px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(120, 120, 120, 0.34);
  border-radius: 6px;
}

.reader-pager span {
  opacity: 0.45;
}

.empty-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #cfd6dd;
  border-radius: 8px;
  background: #fbfcfd;
}

.empty-state strong {
  color: var(--heading);
  font-size: 20px;
}

.empty-state p {
  margin: 0;
}

.site-footer {
  padding: 28px 20px 34px;
  color: #666;
  background: #fff;
  text-align: center;
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 18px;
}

.site-footer p {
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

.source-notice {
  min-height: 180px;
  padding: 20px;
  background: #f7fbfc;
  border: 1px solid #d9e8ed;
  border-radius: 7px;
}

.source-notice strong {
  color: var(--heading);
  font-size: 18px;
}

.source-notice p {
  margin: 12px 0 16px;
  line-height: 1.8;
}

.source-notice a {
  color: var(--brand);
  font-weight: 800;
}

.source-books {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.source-books-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.source-books-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: 21px;
}

.source-books-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.source-books-head > a {
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

.source-book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.source-book-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 7px;
}

.source-book-grid h3 {
  margin: 12px 0 6px;
  color: var(--heading);
  font-size: 16px;
  line-height: 1.35;
}

.source-book-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 900px) {
  .site-header {
    height: auto;
  }

  .header-inner {
    width: calc(100% - 28px);
    min-height: 66px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
  }

  .brand-text {
    font-size: 24px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 5px;
    background: transparent;
  }

  .menu-toggle span {
    width: 20px;
    height: 2px;
    background: #fff;
  }

  .top-nav {
    width: 100%;
    order: 5;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 8px 0 14px;
  }

  .top-nav.open {
    display: grid;
  }

  .top-nav a {
    padding: 11px 0;
  }

  .header-tools {
    gap: 10px;
  }

  .home-panel,
  .content-panel {
    width: calc(100% - 24px);
  }

  .home-panel {
    min-height: 0;
    padding: 46px 24px 34px;
  }

  .content-panel {
    padding: 28px 24px 34px;
  }

  .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 42px;
  }

  .rank-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .section-head {
    display: grid;
  }

  .compact-search {
    width: 100%;
  }

  .book-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .book-row-side {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
  }

  .update-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 12px 0;
  }

  .reader-shell {
    width: calc(100% - 24px);
    padding: 24px 24px 34px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding-top: 12px;
  }

  .home-panel,
  .content-panel {
    padding: 38px 16px 28px;
  }

  .logo-wrap {
    margin-bottom: 38px;
  }

  .logo-number {
    font-size: 54px;
  }

  .logo-name {
    font-size: 38px;
  }

  .logo-domain {
    font-size: 14px;
  }

  .search-box {
    margin-bottom: 42px;
  }

  .quick-links,
  .book-grid,
  .info-grid,
  .chapter-grid,
  .source-book-grid {
    grid-template-columns: 1fr;
  }

  .quick-links {
    gap: 12px;
  }

  .rank-card li a {
    grid-template-columns: 24px minmax(0, 1fr) 40px;
  }

  .book-row,
  .history-row {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
  }

  .book-row .book-cover,
  .history-row .book-cover {
    width: 68px;
    height: 94px;
  }

  .book-row-side,
  .history-row .text-link {
    grid-column: 1 / -1;
  }

  .book-row-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-block {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    display: grid;
  }

  .cover-large {
    width: 138px;
    min-width: 138px;
    height: 188px;
  }

  .detail-title-line h1 {
    font-size: 26px;
  }

  .source-books-head {
    align-items: flex-start;
  }

  .reader-shell {
    padding: 20px 16px 30px;
  }

  .reader-title h1 {
    font-size: 24px;
  }

  .reader-pager {
    gap: 8px;
  }

  .reader-pager a,
  .reader-pager span {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
  }
}
