.shelf {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  transition: max-height 0.25s ease;
}

.shelfCollapsed {
  max-height: 52px;
}

.shelfExpanded {
  max-height: min(42vh, 320px);
}

.shelfHandle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  background: #fafafa;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.shelfHandle:hover {
  background: #f3f4f6;
}

.shelfHandleTitle {
  font-weight: 700;
  font-size: 14px;
  color: #1f2937;
}

.shelfHandleCount {
  font-size: 13px;
  color: #6b7280;
  flex: 1;
}

.shelfChevron {
  font-size: 14px;
  color: #9333ea;
  font-weight: 700;
}

.shelfBody {
  overflow-y: auto;
  max-height: calc(min(42vh, 320px) - 52px);
  padding: 12px 16px 16px;
  border-top: 1px solid #f3f4f6;
}

.shelfGrid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.shelfCard {
  flex: 0 0 120px;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: transform 0.15s, box-shadow 0.15s;
}

.shelfCard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shelfCover {
  position: relative;
  height: 160px;
  background: #f0f0f0;
}

.shelfCover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shelfCoverPlaceholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 32px;
}

.shelfBadge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #f3e8ff;
  color: #9333ea;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.shelfMeta {
  padding: 8px;
}

.shelfTitle {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelfAuthor {
  margin: 2px 0 0;
  font-size: 11px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
