/* The Library needs the same top padding every other page has. main.css sets
   `#page-community .page-inner { padding-top: 0 }`, which suited the old feed
   (the compose box sat flush at the top) but leaves the Library jammed under the
   topbar. Scoped to this view so the media-detail and profile views, which lead
   with the back-button chrome, are unchanged. */
#comm-view-library { padding-top: 28px; }

/* ═══════════════════════════════════════════════════════════════════════════
   library.css — the Library view (the old Community feed's replacement).

   Scoped to `lb-` and loaded after home-v2.css, so it can reuse the `hv-` shelf
   header and accent tokens. Media detail and profile views are untouched and
   keep their `comm-` styles from main.css.
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.lb-title { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.lb-count { font-size: 13px; color: var(--text-3); font-weight: 600; padding-bottom: 3px; }
.lb-count b { color: var(--accent); }
.lb-sec { margin-top: 36px; }

/* ── who's here ─────────────────────────────────────────────────────────────
   14 people fit on one row. A feed never made profiles findable; this does. */
.lb-people { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; }
.lb-people::-webkit-scrollbar { height: 6px; }
.lb-people::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; }
.lb-person {
  flex: none; width: 132px; padding: 13px 11px; border-radius: 12px; text-align: center;
  background: var(--hv-panel, #14141d); border: 1px solid var(--border);
  transition: .17s; cursor: pointer; text-decoration: none; color: inherit;
}
.lb-person:hover { transform: translateY(-3px); border-color: var(--hv-a-55); box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.lb-p-av, .lb-p-ph { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 8px; display: block; object-fit: cover; background: #2b2b3a; }
.lb-p-ph { display: grid; place-items: center; font-weight: 700; font-size: 16px;
  background: linear-gradient(135deg, #3b3b52, #252533); color: var(--text-2); }
.lb-p-name { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-p-lv { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-top: 2px; }
.lb-p-into { font-size: 10.5px; color: var(--text-3); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── reviews: a shelf, not a river ── */
.lb-compose-slot { margin-bottom: 14px; }
.lb-reviews { display: flex; gap: 13px; overflow-x: auto; padding: 4px 2px 12px; }
.lb-reviews::-webkit-scrollbar { height: 6px; }
.lb-reviews::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; }
.lb-review {
  flex: none; width: 290px; padding: 14px; border-radius: 12px; display: flex; gap: 12px;
  background: var(--hv-panel, #14141d); border: 1px solid var(--border);
  transition: .17s; cursor: pointer; text-decoration: none; color: inherit;
}
.lb-review:hover { transform: translateY(-3px); border-color: var(--hv-a-55); }
.lb-r-art { width: 52px; height: 74px; border-radius: 6px; flex: none; overflow: hidden; background: linear-gradient(155deg,#1f1f2b,#13131b); }
.lb-r-art img { width: 100%; height: 100%; object-fit: cover; }
.lb-r-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-r-who { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.lb-r-who img, .lb-r-who span.ph {
  width: 18px; height: 18px; border-radius: 50%; object-fit: cover; background: #2f2f3d;
  display: grid; place-items: center; font-size: 8px; font-weight: 700; color: var(--text-2);
}
.lb-r-user { font-size: 11.5px; font-weight: 650; }
.lb-r-stars { font-size: 10.5px; color: var(--gold); margin-left: auto; letter-spacing: -.5px; }
.lb-r-title { font-size: 12px; font-weight: 650; color: var(--accent); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-r-text { font-size: 12px; color: var(--text-2); line-height: 1.42;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lb-r-date { font-size: 10.5px; color: var(--text-3); margin-top: auto; padding-top: 6px; }
.lb-empty { padding: 22px; text-align: center; color: var(--text-3); font-size: 13px;
  border: 1px dashed var(--border); border-radius: 12px; }

/* ── type tabs + sort ── */
.lb-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 3px 0 10px; scrollbar-width: none; margin-bottom: 6px; }
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tab {
  display: flex; align-items: center; gap: 7px; flex: none; padding: 8px 14px; border-radius: 9px;
  font: inherit; font-size: 13px; font-weight: 650; color: var(--text-2); cursor: pointer; transition: .15s;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); white-space: nowrap;
}
.lb-tab:hover { background: rgba(255,255,255,.08); color: var(--text); }
.lb-tab.on { color: #fff; background: var(--accent-dim); border-color: var(--hv-a-55); }
.lb-tab .n { font-size: 11px; color: var(--text-3); font-weight: 600; }
.lb-tab.on .n { color: var(--accent); }
.lb-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.lb-sort { display: flex; gap: 3px; margin-left: auto; flex-wrap: wrap; }
.lb-sort button {
  padding: 6px 11px; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 600;
  color: var(--text-3); background: none; border: 1px solid transparent; cursor: pointer; transition: .15s;
}
.lb-sort button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.lb-sort button.on { color: var(--accent); border-color: var(--hv-a-28); background: var(--accent-dim); }

/* ── the browse grid ── */
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px; }
.lb-card {
  border-radius: 11px; overflow: hidden; background: var(--hv-panel, #14141d);
  border: 1px solid var(--border); transition: .18s; cursor: pointer; text-decoration: none; color: inherit; display: block;
}
.lb-card:hover { transform: translateY(-4px); border-color: var(--hv-a-55); box-shadow: 0 14px 32px rgba(0,0,0,.55); }
.lb-c-art { aspect-ratio: 2/3; position: relative; overflow: hidden; background: linear-gradient(155deg,#1f1f2b,#13131b); }
.lb-c-art img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; transition: .4s; }
.lb-card:hover .lb-c-art img { transform: scale(1.05); }
.lb-c-fb { position: absolute; inset: 0; display: grid; place-items: center; padding: 11px; text-align: center;
  font-size: 11px; font-weight: 650; color: var(--text-3); z-index: 0; }
.lb-c-shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(0deg, rgba(10,10,14,.86), transparent 44%); }
.lb-c-pip {
  position: absolute; top: 7px; left: 7px; z-index: 3; font-size: 9px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; padding: 3px 6px; border-radius: 5px; background: rgba(10,10,14,.78);
  border: 1px solid rgba(255,255,255,.16); color: var(--text-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lb-c-rate {
  position: absolute; top: 7px; right: 7px; z-index: 3; font-size: 10px; font-weight: 800; padding: 3px 6px;
  border-radius: 5px; background: rgba(10,10,14,.8); border: 1px solid rgba(245,197,24,.4);
  color: var(--gold); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
/* "who's on this" — the ambient social signal that works at 14 users when a feed doesn't */
.lb-c-who { position: absolute; left: 8px; bottom: 8px; z-index: 3; display: flex; align-items: center; }
.lb-c-who img, .lb-c-who span.ph {
  width: 20px; height: 20px; border-radius: 50%; margin-left: -7px; border: 2px solid rgba(10,10,14,.92);
  object-fit: cover; background: #2f2f3d; display: grid; place-items: center;
  font-size: 8px; font-weight: 700; color: var(--text-2);
}
.lb-c-who :first-child { margin-left: 0; }
.lb-c-body { padding: 10px 11px 12px; }
.lb-c-name { font-size: 12.5px; font-weight: 650; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 33px; }
.lb-c-meta { font-size: 10.5px; color: var(--text-3); margin-top: 5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lb-c-meta .sep { opacity: .4; }
.lb-c-you { font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 5px; border-radius: 4px; background: rgba(74,222,128,.16); color: #86efac; border: 1px solid rgba(74,222,128,.3); }

.lb-more { display: flex; justify-content: center; margin-top: 26px; }
.lb-more button {
  padding: 11px 26px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 650;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-strong); color: var(--text-2);
  cursor: pointer; transition: .15s;
}
.lb-more button:hover { background: rgba(255,255,255,.1); color: var(--text); }
.lb-skel { border-radius: 11px; aspect-ratio: 2/3.35; }

@media (max-width: 900px) {
  .lb-title { font-size: 24px; }
  .lb-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
  .lb-sort { margin-left: 0; }
}

/* The comics count is series (911), not issues (4,758) — the Library browses
   titles, so say so rather than leave a number that reads as issue count. */
.lb-tab .lb-unit { font-size: 10.5px; color: var(--text-3); font-weight: 600; margin-left: -3px; }
.lb-tab.on .lb-unit { color: color-mix(in srgb, var(--accent) 75%, transparent); }
