/* ==========================================================================
   急診熊書架（首頁 Bookshelf 區）— 一排封面、可橫向捲動、底下一條書架線
   ========================================================================== */
.shelf {
  font-family: var(--font-body-zh, "Noto Sans TC", system-ui, sans-serif);
  color: var(--color-ink, #0b121a);
  margin: 0 0 var(--space-lg, 3rem);
}
.shelf__note {
  margin: 0 0 1.1rem;
  font-family: var(--font-display, serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-ink-3, #6c7278);
}
.shelf__track {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.25rem 1.25rem;
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(11, 18, 26, 0.18) transparent;
  /* 書架線：封面下緣那條 */
  background:
    linear-gradient(to right, rgba(11, 18, 26, 0.16), rgba(11, 18, 26, 0.16)) left calc(0.5rem + 186px) / 100% 2px no-repeat,
    linear-gradient(to right, rgba(11, 18, 26, 0.05), transparent) left calc(0.5rem + 188px) / 100% 10px no-repeat;
}
.shelf__item { flex: 0 0 auto; width: 132px; scroll-snap-align: start; margin: 0; }
.shelf__link { display: grid; gap: 0.3rem; color: inherit; text-decoration: none; border-bottom: 0; padding-bottom: 0; }
.shelf__cover {
  display: block;
  width: 120px;
  height: 180px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--color-paper-2, #f3eee6);
  box-shadow: 0 10px 18px -8px rgba(11, 18, 26, 0.35), 0 0 0 1px rgba(11, 18, 26, 0.08);
  transform-origin: bottom center;
  transition: transform 180ms var(--ease-out, ease), box-shadow 180ms ease;
}
.shelf__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shelf__link:hover .shelf__cover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 0 18px 26px -10px rgba(11, 18, 26, 0.4), 0 0 0 1px rgba(11, 18, 26, 0.1); }
.shelf__title {
  margin-top: 0.75rem;
  font-family: var(--font-display-zh, serif);
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shelf__link:hover .shelf__title { color: var(--color-accent-ink, #b22800); }
.shelf__author { font-size: 0.72rem; color: var(--color-ink-3, #6c7278); }
.shelf__blurb {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--color-ink-2, #353b42);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 640px) {
  .shelf__track { gap: 1rem; }
  .shelf__item { width: 112px; }
  .shelf__cover { width: 104px; height: 156px; }
  .shelf__track { background-position: left calc(0.5rem + 162px), left calc(0.5rem + 164px); }
  .shelf__blurb { display: none; }
}
@media print { .shelf { display: none; } }
