/* ════════════════════════════════════════════════════════════════════════
   shelf.css — 我的书架
   ════════════════════════════════════════════════════════════════════════ */
.reading-shelf { background: var(--paper); }

.sh-main {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 72px;
}
.reading-shelf .bk-footer { max-width: 1240px; }

.sh-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  padding: 48px 0 30px;
  border-bottom: 1px solid var(--ink);
}
.sh-kicker {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
}
.sh-head h1 {
  margin-top: 12px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(42px, 4.3vw, 58px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
}
.sh-head-copy p {
  max-width: 54ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.85;
}
.sh-figures {
  display: flex;
  align-items: end;
  gap: 26px;
  padding-bottom: 4px;
}
.sh-figures > div { display: grid; justify-items: end; }
.sh-figures strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
}
.sh-figures small {
  margin-top: 5px;
  color: var(--c-faint);
  font-size: 10px;
  white-space: nowrap;
}

.sh-gate {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 52px 0 24px;
  padding: 26px 28px;
  border: 1px solid var(--ink);
  background: var(--paper-2);
}
.sh-gate-no {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
}
.sh-gate-copy { flex: 1; }
.sh-gate-copy h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}
.sh-gate-copy p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.sh-section { margin-top: 44px; }
.sh-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}
.sh-sec-no {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
}
.sh-section-head h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
}
.sh-sec-hint {
  color: var(--c-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
}
.sh-sec-rule { flex: 1; }
.sh-filter {
  width: 116px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 12px;
}

.sh-continue-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
  margin-top: 6px;
}
.sh-now {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  text-decoration: none;
}
.sh-now:hover { background: var(--paper-2); }
.sh-now-art {
  flex: 0 0 52px;
  width: 52px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-3);
}
.sh-now-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sh-now-body {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 3px;
}
.sh-now-title {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sh-now-meta {
  color: var(--muted);
  font-size: 11.5px;
}
.sh-now-bar {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 5px;
  background: var(--line-soft);
}
.sh-now-bar i {
  display: block;
  height: 100%;
  background: var(--green);
}
.sh-now-arrow {
  flex: none;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
}

.sh-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 24px;
  margin-top: 22px;
}
.sh-book {
  position: relative;
  min-width: 0;
}
.sh-book-cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-3);
  box-shadow: 5px 5px 0 var(--paper-3);
  transition: transform .18s ease, box-shadow .18s ease;
}
.sh-book-cover:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--paper-3);
}
.sh-book-art, .sh-book-art img {
  display: block;
  width: 100%;
  height: 100%;
}
.sh-book-art img { object-fit: cover; }
.sh-book .card-fallback { font-size: 40px; }
.sh-book-body { padding-top: 11px; }
.sh-book-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sh-book-title:hover { color: var(--green); }
.sh-book-author {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}
.sh-book-meta {
  margin-top: 6px;
  color: var(--c-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
}
.sh-book-bar {
  height: 2px;
  margin-top: 7px;
  background: var(--line-soft);
}
.sh-book-bar i {
  display: block;
  height: 100%;
  background: var(--green);
}
.sh-book-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, .9);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease;
}
.sh-book:hover .sh-book-remove, .sh-book-remove:focus-visible { opacity: 1; }
.sh-book-remove:hover { border-color: var(--orange); color: var(--orange); }
.sh-book-remove:disabled { opacity: .4; cursor: wait; }

.sh-empty {
  margin: 22px 0 4px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 13px;
  line-height: 1.8;
}
.sh-empty a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1120px) {
  .sh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sh-main { padding-inline: 20px; }
  .sh-head { grid-template-columns: 1fr; gap: 24px; padding-top: 38px; }
  .sh-figures { justify-content: flex-start; }
  .sh-figures > div { justify-items: start; }
  .sh-continue-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sh-main { padding-inline: 16px; }
  .sh-head h1 { font-size: 38px; }
  .sh-figures { gap: 18px; }
  .sh-figures strong { font-size: 26px; }
  .sh-gate { align-items: flex-start; flex-direction: column; padding: 20px; }
  .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .sh-book-remove { opacity: 1; }
  .sh-book-title { font-size: 15px; }
}
