.library-header {
  padding: 16px 16px 12px;
  padding-top: max(16px, env(safe-area-inset-top, 16px));
  background: var(--wq-bg-card);
  border-bottom: 1px solid var(--wq-border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.library-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.library-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--wq-text-primary);
}

.library-filters {
  display: flex;
  gap: 8px;
}

.filter-chip {
  padding: 6px 16px;
  border-radius: var(--wq-radius-full);
  border: none;
  background: var(--wq-neutral-100);
  color: var(--wq-text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
}

.filter-chip.active {
  background: var(--wq-primary);
  color: var(--wq-text-inverse);
}

.library-main {
  flex: 1;
  padding: 12px 16px 80px;
  overflow-y: auto;
}

.library-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-item {
  background: var(--wq-bg-card);
  border: 1px solid var(--wq-border);
  border-radius: var(--wq-radius-lg);
  padding: 12px;
  text-align: center;
}

.stat-item .stat-value {
  display: block;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--wq-text-primary);
  margin-bottom: 2px;
}

.stat-item .stat-label {
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
}
