/* Library triage (P2.3): ratings, keep/reject, tags, collections. */
.preview-head { flex-wrap: wrap; }
.lib-bar {
  flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding-top: 8px; border-top: 1px solid var(--hairline);
}
.lib-rate { display: flex; gap: 0; }
.lib-rate .ic-btn { padding: 4px; min-width: 0; }
.lib-star { width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.lib-star.on { fill: var(--lab-time); stroke: var(--lab-time); }
.lib-decide { display: flex; gap: 4px; }
.lib-decide button { font-size: 13px; }
.lib-keep-btn.on { color: var(--lab-shape); box-shadow: inset 0 -2px 0 var(--lab-shape); }
.lib-reject-btn.on { color: var(--lab-post); box-shadow: inset 0 -2px 0 var(--lab-post); }
.lib-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.lib-editor input {
  width: 150px; height: 28px; padding: 0 8px; font: inherit; font-size: 13px;
  color: var(--ink); background: var(--well); border: 1px solid var(--hairline-2); border-radius: 4px;
}
.lib-editor input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.lib-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px;
  font-size: 12.5px; background: transparent; border: 1px solid var(--hairline-2); border-radius: 4px;
  box-shadow: none; cursor: pointer;
}
.lib-chip .ic { width: 10px; height: 10px; opacity: .7; }
.lib-chip:hover .ic, .lib-chip:focus-visible .ic { opacity: 1; }
.lib-chip.lib-tag { color: var(--lab-seed); }
.lib-chip.lib-coll { color: var(--lab-shape); }

/* cards */
.lib-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 11.5px; line-height: 16px; min-width: 0; }
.lib-stars { display: inline-flex; }
.lib-stars .lib-star { width: 11px; height: 11px; }
.lib-status.keep { color: var(--lab-shape); font-weight: 600; }
.lib-status.reject { color: var(--lab-post); font-weight: 600; }
.lib-tag { color: var(--lab-seed); }
.lib-coll { color: var(--lab-shape); }
.card.lib-reject .thumb { opacity: .45; }
.card.lib-reject .card-title { text-decoration: line-through; text-decoration-color: var(--ink-3); }

/* sidebar tools */
.lib-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); }
.lib-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.lib-check input { accent-color: var(--accent); margin: 0; }
.lib-trash { color: var(--lab-post); font-size: 12.5px; }

@media (max-width: 767px) {
  .lib-bar { gap: 8px; }
  .lib-rate .ic-btn { min-width: 40px; min-height: 40px; }
  .lib-editor { flex: 1 1 100%; }
  .lib-editor input { flex: 1; min-width: 0; height: 40px; }
  .lib-decide button { min-height: 40px; }
}

/* Take groups (P2.4) */
.lib-take { color: var(--lab-sample); font-weight: 600; }
.take-group {
  display: grid; gap: 1px; padding: 2px 0 4px; border-left: 2px solid var(--hairline-2);
}
.take-group.open { border-left-color: var(--lab-sample); }
.take-head { display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.take-head button { font-size: 12.5px; gap: 4px; }
.take-head .take-compare { margin-left: auto; }
.take-toggle .ic { transform: rotate(-90deg); transition: transform var(--dur-1, .12s) var(--ease, ease); }
.take-toggle[aria-expanded="true"] .ic { transform: none; }
.take-group.open .card-slot:not(.take-cover) { margin-left: 8px; }

@media (max-width: 767px) {
  .take-group { border-left: 0; border-top: 2px solid var(--hairline-2); gap: 8px; }
  .take-group.open { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .take-group.open .take-head { grid-column: 1 / -1; }
  .take-group.open .card-slot:not(.take-cover) { margin-left: 0; }
  .take-head { flex-wrap: wrap; padding: 0; }
  .take-head button { min-height: 40px; }
  .take-head .take-compare { margin-left: 0; }
}
