/* 文章库 / 查看原文：对齐 miniprogram-native/pages/articles 与 pages/webview，rpx÷2 */

.lib-page { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
.lib-page button { margin: 0; border: 0; background: transparent; padding: 0; color: inherit; cursor: pointer; }

.lib-head { margin: 0 0 2px; }
.lib-page .headline {
  display: block;
  margin: 0;
  color: #29231e;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
.lib-page .lead { display: block; margin: 4px 0 0; color: #8c8073; font-size: 12px; line-height: 1.45; }

.lib-page .time-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 11px;
  margin: 5px 0 7px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(187, 164, 127, 0.35);
}
.lib-page .time-tab {
  padding: 3px 0 6px;
  color: #8c8073;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.lib-page .time-tab.active { color: #29231e; box-shadow: inset 0 -2px 0 #29231e; }

.lib-page .tool-row { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.lib-page .domain-chip {
  flex: 0 1 110px;
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #e3d5c4;
  background: #fffdf8;
}
.lib-page .domain-k,
.lib-page .domain-arrow { flex: 0 0 auto; color: #8c8073; font-size: 11px; }
.lib-page .domain-v {
  min-width: 0;
  overflow: hidden;
  color: #29231e;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lib-page .search-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: inset 0 0 0 1px #e3d5c4;
  color: #29231e;
  font-size: 12px;
}
.lib-page .search-btn { flex: 0 0 auto; color: #8c8073; font-size: 12px; font-weight: 700; }

.lib-page .sort-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 1px 6px; }
.lib-page .sort-label,
.lib-page .sort-total,
.lib-page .sort-btn { color: #8c8073; font-size: 11px; }
.lib-page .sort-btn.active { color: #29231e; text-decoration: underline; text-underline-offset: 3px; }
.lib-page .sort-total { margin-left: auto; }

.lib-page .empty { display: block; padding: 8px 4px 4px; color: #8c8073; font-size: 11px; text-align: center; }
.lib-page .empty-login {
  display: inline-block;
  margin-top: 8px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: #29231e;
  color: #fffdf8;
  font-size: 12px;
  font-weight: 800;
  line-height: 32px;
}

.lib-page .art-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px 110px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 6px;
  row-gap: 5px;
  width: 100%;
  margin: 0 0 6px;
  padding: 8px 8px 8px 11px;
  border-radius: 4px 12px 12px 4px;
  border: 1px solid #e3d5c4;
  background: linear-gradient(180deg, #fffef9 0%, #fbf6ee 100%);
  box-shadow: 0 4px 10px rgba(78, 55, 33, 0.06);
  text-align: left;
}
.lib-page .art-card::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #c4553a, #d9a08f);
}
.lib-page .rank {
  grid-column: 1;
  grid-row: 1 / span 2;
  padding-top: 2px;
  color: #8c7058;
  font-size: 14px;
  font-weight: 800;
}
.lib-page .rank.hot1 { color: #c4553a; }
.lib-page .rank.hot2 { color: #d4893a; }
.lib-page .rank.hot3 { color: #8c7058; }
.lib-page .cover {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  width: 110px;
  min-height: 110px;
  overflow: hidden;
  border-radius: 8px;
  background: #efe6d8;
}
.lib-page .cover-img { width: 110px; height: 100%; min-height: 110px; object-fit: cover; }
.lib-page .cover-ph {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 110px;
  align-items: center;
  justify-content: center;
  color: #1a6f68;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
}
.lib-page .body { grid-column: 3; grid-row: 1; min-width: 0; }
.lib-page .title {
  display: -webkit-box;
  overflow: hidden;
  color: #29231e;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lib-page .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lib-page .tag {
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px #e3d5c4;
  color: #29231e;
  font-size: 10px;
}
.lib-page .meta-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 3px; }
.lib-page .meta,
.lib-page .rewrite { min-width: 0; color: #8c8073; font-size: 10px; line-height: 1.4; }
.lib-page .rewrite { flex: 0 0 auto; color: #5f554b; font-weight: 700; }
.lib-page .actions { grid-column: 3; grid-row: 2; display: flex; align-items: center; gap: 6px; }
.lib-page .link,
.lib-page .put {
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.lib-page .link { border: 1px solid #e3d5c4; background: #fffdf8; color: #29231e; }
.lib-page .put { background: #29231e; color: #fffdf8; font-weight: 800; }

.lib-page .origin-mark { position: relative; width: 11px; height: 11px; flex-shrink: 0; }
.lib-page .origin-page-ico { position: absolute; left: 0; top: 1px; width: 8px; height: 9px; border: 1px solid #c4a574; border-radius: 2px 3px 2px 2px; background: rgba(255, 253, 248, 0.85); }
.lib-page .origin-fold { position: absolute; right: 2px; top: 1px; width: 4px; height: 4px; border-top: 1px solid #c4a574; border-right: 1px solid #c4a574; }
.lib-page .origin-arrow { position: absolute; right: 0; bottom: 0; width: 5px; height: 5px; border-right: 1px solid #5c4630; border-bottom: 1px solid #5c4630; transform: rotate(-45deg); }

.lib-page .mask { position: fixed; inset: 0; z-index: 1100; background: rgba(41, 35, 30, 0.32); }
.lib-page .drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1101;
  display: flex;
  flex-direction: column;
  height: 72vh;
  padding: 6px 14px calc(14px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: #fbf8f2;
  border-top: 1px dashed rgba(187, 164, 127, 0.72);
}
.lib-page .drawer-handle { width: 36px; height: 4px; margin: 2px auto 9px; border-radius: 999px; background: #d8c6b1; }
.lib-page .drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.lib-page .drawer-copy { flex: 1; min-width: 0; }
.lib-page .detail-kicker-row { display: flex; align-items: flex-start; gap: 6px; }
.lib-page .lib-mark { flex: 0 0 auto; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.lib-page .drawer-kicker { display: block; color: #8c7058; font-size: 9px; font-weight: 800; letter-spacing: 2px; }
.lib-page .drawer-title { display: block; margin-top: 3px; color: #29231e; font-size: 18px; font-weight: 800; line-height: 1.35; }
.lib-page .drawer-sub { display: block; margin-top: 4px; color: #8c8073; font-size: 11px; line-height: 1.45; }
.lib-page .drawer-close {
  flex: 0 0 auto;
  min-width: 44px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #e3d5c4;
  background: #fffdf8;
  color: #29231e;
  font-size: 12px;
  font-weight: 700;
}
.lib-page .drawer-body { flex: 1; min-height: 0; overflow: auto; }
.lib-page .domain-grid { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; }
.lib-page .domain-item {
  width: calc(50% - 3px);
  min-height: 44px;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1px solid #eadccb;
  background: #fffdf8;
  color: #29231e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}
.lib-page .domain-item.is-active { border-color: #c4a574; background: linear-gradient(180deg, #f7efe2 0%, #f4ead8 100%); }
.lib-page .detail-body { display: block; color: #29231e; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.lib-page .drawer .actions { display: flex; margin-top: 8px; }

@media (min-width: 768px) {
  .lib-page { padding-bottom: 32px; }
  .lib-page .headline { font-size: 24px; line-height: 1.3; }
  .lib-page .lead { font-size: 13px; }
  .lib-page .time-tabs { gap: 18px; margin: 8px 0 12px; }
  .lib-page .time-tab { padding: 4px 0 8px; font-size: 14px; }
  .lib-page .tool-row { gap: 10px; margin-bottom: 10px; }
  .lib-page .domain-chip { flex: 0 0 160px; height: 36px; padding: 0 12px; }
  .lib-page .domain-k,
  .lib-page .domain-arrow,
  .lib-page .search-btn,
  .lib-page .sort-label,
  .lib-page .sort-total,
  .lib-page .sort-btn { font-size: 13px; }
  .lib-page .domain-v,
  .lib-page .search-input { font-size: 13px; }
  .lib-page .search-input { height: 36px; padding: 0 12px; }
  .lib-page .sort-row { gap: 12px; margin-bottom: 14px; }
  .lib-page .art-card {
    grid-template-columns: 36px 96px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 8px;
    margin-bottom: 12px;
    padding: 14px 16px 14px 18px;
    border-radius: 4px 14px 14px 4px;
  }
  .lib-page .rank { font-size: 16px; }
  .lib-page .cover,
  .lib-page .cover-img,
  .lib-page .cover-ph { width: 96px; min-width: 96px; height: 96px; min-height: 96px; border-radius: 10px; }
  .lib-page .cover-ph { font-size: 36px; }
  .lib-page .title { font-size: 16px; }
  .lib-page .tag,
  .lib-page .meta,
  .lib-page .rewrite { font-size: 12px; }
  .lib-page .actions { gap: 8px; }
  .lib-page .link,
  .lib-page .put { height: 32px; font-size: 12px; }
  .lib-page.is-pc .drawer {
    left: 196px;
    right: 24px;
    top: 56px;
    bottom: 24px;
    width: auto;
    max-width: 640px;
    height: auto;
    margin: 0 auto;
    padding: 16px 18px 18px;
    border-radius: 16px;
  }
  .lib-page.is-pc .detail-drawer { max-width: 720px; }
  .lib-page.is-pc .drawer-handle { display: none; }
  .lib-page.is-pc .drawer-title { font-size: 18px; }
  .lib-page.is-pc .drawer-kicker { font-size: 11px; }
  .lib-page.is-pc .drawer-sub { font-size: 12px; }
  .lib-page.is-pc .drawer-close { height: 32px; min-width: 44px; padding: 0 12px; font-size: 12px; }
  .lib-page.is-pc .domain-item { width: calc(25% - 8px); min-height: 40px; padding: 8px 10px; font-size: 13px; }
}

.origin-page { padding-bottom: calc(24px + env(safe-area-inset-bottom)); background: #eee7dc; }
.origin-page button { margin: 0; border: 0; background: transparent; padding: 0; color: inherit; cursor: pointer; }
.origin-page .back-chip {
  height: 32px;
  margin: 4px 0 9px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #e3d5c4;
  background: rgba(255, 253, 248, 0.92);
  color: #29231e;
  font-size: 12px;
  font-weight: 700;
}
.origin-page .kicker { display: block; color: #8c8073; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.origin-page .headline {
  display: block;
  margin: 5px 0 0;
  color: #29231e;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}
.origin-page .headline.is-folded {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.origin-page .lead { display: block; margin: 5px 0 9px; color: #8c8073; font-size: 12px; line-height: 1.5; }
.origin-page .error { display: block; color: #c4553a; font-size: 13px; }
.origin-page .body { display: block; margin: 0; color: #29231e; font-size: 15px; line-height: 1.8; white-space: pre-wrap; background: transparent; }
.origin-page .fold-btn { display: inline-block; margin: 6px 0 0; color: #1a6f68; font-size: 14px; font-weight: 800; }
.origin-page .open-btn {
  display: block;
  width: 100%;
  margin: 12px 0 4px;
  min-height: 44px;
  border-radius: 999px;
  background: #29231e;
  color: #fffdf8;
  font-size: 14px;
  font-weight: 800;
}

@media (min-width: 768px) {
  .origin-page { padding-bottom: 32px; }
  .origin-page .back-chip { height: 36px; margin: 4px 0 16px; padding: 0 16px; font-size: 14px; }
  .origin-page .kicker { font-size: 12px; }
  .origin-page .headline { margin-top: 8px; font-size: 22px; }
  .origin-page .lead { margin: 8px 0 16px; font-size: 13px; }
  .origin-page .body { font-size: 16px; }
}
