/* ════════════════════════════════════════════════════════════════════════
   home.css — 在线读书首页
   首页只保留刊头、馆藏概览、我的阅读、最近更新。
   好书 / 新书已是独立页面，不再堆进首页。
   ════════════════════════════════════════════════════════════════════════ */

.rh-main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 88px;
}

/* ── 刊头 ────────────────────────────────────────────────────────────── */
.rh-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  align-items: center;
  gap: clamp(44px, 6vw, 82px);
  padding: clamp(42px, 5.4vw, 66px) 0 clamp(36px, 4.4vw, 54px);
  border-bottom: 1px solid var(--ink);
}
.rh-mast-copy { max-width: 720px; }
.rh-mast-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
}
.rh-mast-meta span + span {
  padding-left: 18px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  letter-spacing: .08em;
}
.rh-masthead h1 {
  margin-top: 20px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(42px, 4.7vw, 60px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .005em;
  text-wrap: balance;
}
.rh-masthead h1 em {
  color: var(--green);
  font-style: normal;
}
.rh-lede {
  max-width: 46ch;
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 2.02;
}
.rh-mast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.rh-mast-actions .btn { min-height: 44px; padding-inline: 18px; }
.rh-mast-foot {
  display: flex;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--c-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
}
.rh-mast-foot span + span { margin-left: 20px; }
.rh-mast-foot span + span::before {
  content: "·";
  margin-right: 20px;
  color: var(--line-strong);
}

/* 读者手记 */
.rh-note {
  position: relative;
  align-self: center;
  min-width: 0;
  padding: 4px 0 2px 26px;
  border-left: 1px solid var(--ink);
}
.rh-note::before {
  content: "“";
  position: absolute;
  top: -28px;
  left: 14px;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 66px;
  line-height: 1;
  opacity: .16;
}
.rh-note-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
}
.rh-note-head span:last-child { color: var(--c-faint); }
.rh-note blockquote {
  margin: 18px 0 0;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rh-note-stars {
  margin-top: 12px;
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .16em;
}
.rh-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 9px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11.5px;
}
.rh-note-meta span + span { color: var(--c-faint); }
.rh-note-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--green);
  font-family: var(--font-body);
  font-size: 12px;
  text-decoration: none;
}
.rh-note-link:hover { color: var(--ink); }

/* ── 馆藏概览 ────────────────────────────────────────────────────────── */
.rh-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 22px 0;
  border-bottom: 1px solid var(--ink);
}
.rh-stat {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  padding: 0 24px;
  border-left: 1px solid var(--line-soft);
}
.rh-stat:first-child { padding-left: 0; border-left: 0; }
.rh-stat > span {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: var(--c-faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
}
.rh-stat strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.rh-stat small {
  padding: 0 0 3px 7px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

/* ── 区块头 ──────────────────────────────────────────────────────────── */
.rh-section { margin-top: clamp(56px, 6vw, 78px); }
.rh-section-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: end;
  gap: 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}
.rh-sec-no {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  align-self: start;
  padding-top: 8px;
}
.rh-sec-copy h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .01em;
}
.rh-sec-copy p {
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.7;
}
.rh-sec-hint {
  color: var(--c-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
}
.rh-sec-link {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.rh-sec-link span { color: var(--green); }
.rh-sec-link:hover { color: var(--green); }

/* ── 我的阅读 ────────────────────────────────────────────────────────── */
.rh-desk {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: start;
  padding-top: 6px;
}
.rh-desk.is-single { grid-template-columns: 1fr; }
.rh-pane {
  min-width: 0;
  padding: 14px 0 4px;
  border-top: 1px solid var(--line);
}
.rh-pane + .rh-pane {
  padding-left: 32px;
  border-left: 1px solid var(--line-soft);
}
.rh-pane-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 9px;
}
.rh-pane-head > span:first-child {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}
.rh-pane-head > span:last-child {
  margin-left: auto;
  color: var(--c-faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .06em;
}
.rh-read-list { display: grid; }
.rh-read-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  text-decoration: none;
}
.rh-read-card:last-child { border-bottom: 0; }
.rh-read-art {
  width: 42px;
  height: 58px;
  flex: none;
  overflow: hidden;
  padding: 3px;
  background: var(--paper-3);
  border: 1px solid var(--line);
}
.rh-read-art img { width: 100%; height: 100%; object-fit: cover; }
.rh-read-art .card-fallback { font-size: 17px; }
.rh-read-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rh-read-title {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rh-read-meta {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rh-read-bar {
  height: 2px;
  margin-top: 8px;
  background: var(--line-soft);
}
.rh-read-bar i {
  display: block;
  height: 100%;
  background: var(--green);
}
.rh-read-arrow {
  flex: none;
  color: var(--c-faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ── 最近更新 ────────────────────────────────────────────────────────── */
.rh-update-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  padding-top: 4px;
}
.rh-update-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  text-decoration: none;
}
.rh-update-cover {
  width: 58px;
  height: 80px;
  overflow: hidden;
  padding: 4px;
  background: var(--paper-3);
  border: 1px solid var(--line);
}
.rh-update-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rh-update-cover .card-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 20px;
}
.rh-update-body { display: flex; flex-direction: column; min-width: 0; }
.rh-update-title {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rh-update-meta {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rh-update-tail {
  color: var(--c-faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.rh-update-item:hover .rh-update-title { color: var(--green); }

/* ── 页脚 ────────────────────────────────────────────────────────────── */
.reading-home .bk-footer { max-width: 1180px; padding-inline: 28px; }

/* ── 响应式 ──────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .rh-masthead { grid-template-columns: minmax(0, 1fr) 282px; gap: 44px; }
}

@media (max-width: 900px) {
  .rh-main { padding-inline: 20px; }
  .rh-masthead { grid-template-columns: 1fr; gap: 34px; padding-top: 38px; }
  .rh-mast-copy { max-width: none; }
  .rh-masthead h1 { font-size: clamp(42px, 7vw, 54px); }
  .rh-note {
    max-width: 540px;
    padding: 22px 0 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }
  .rh-note::before { top: -14px; left: 0; }
  .rh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
  .rh-stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .rh-desk { grid-template-columns: 1fr; gap: 24px; }
  .rh-pane + .rh-pane {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .rh-update-list { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 640px) {
  .rh-main { padding-inline: 20px; padding-bottom: 64px; }
  .rh-mast-meta { font-size: 9.5px; gap: 10px; }
  .rh-mast-meta span + span { padding-left: 10px; }
  .rh-masthead h1 { font-size: 40px; line-height: 1.22; }
  .rh-lede { font-size: 15.5px; line-height: 1.95; }
  .rh-mast-foot { margin-top: 30px; font-size: 9px; }
  .rh-stats { padding: 18px 0; }
  .rh-stat { padding-inline: 16px; }
  .rh-stat strong { font-size: 25px; }
  .rh-section { margin-top: 50px; }
  .rh-section-head {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0 10px;
  }
  .rh-sec-copy h2 { font-size: 26px; }
  .rh-sec-copy p { font-size: 12px; }
  .rh-sec-link { grid-column: 2; margin-top: 6px; justify-self: start; }
  .rh-sec-hint { display: none; }
  .rh-update-item { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  .rh-update-cover { width: 48px; height: 66px; }
  .rh-update-tail { display: none; }
  .rh-update-title { font-size: 15.5px; }
  .reading-home .bk-footer { padding-inline: 20px; }
}
