/* Library — Home (Figma 22316:129380), Book List (22316:129856 / 22316:129958) and My Books (22316:129565 / 129662 / 129759).
   Reuses .search (search pill), .m-chip (chips), .n-tabs/.n-tab (tabs), .n-empty, .hscroll. Prefix lh-. */
.screen.lh { background: var(--goku); }
.lh [hidden] { display: none !important; }

/* ---------- Header ---------- */
.lh-page { display: flex; flex-direction: column; gap: 24px; padding: calc(var(--sb-dash) + 24px) 20px 120px; }
.lh-head { display: flex; align-items: center; gap: 8px; height: 40px; }
.lh-head h1 { flex: 1; min-width: 0; }
.lh-back { flex: none; width: 31.69px; height: 31.69px; display: grid; place-items: center; border-radius: 6px; }
.lh-back img { width: 31.69px; height: 31.69px; }
.lh-icon-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; }
.lh-search-btn { width: 32px; height: 32px; }
.lh-back:hover, .lh-icon-btn:hover { background: var(--heles); }
.lh-search input { font-weight: 700; }

/* ---------- Cover tile (120×184) ---------- */
.lh-tile { position: relative; flex: none; width: 120px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.lh-cover {
  display: block; width: 120px; height: 184px; border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.25); background: var(--gohan);
  box-shadow: 0 6px 6px -6px rgba(0, 0, 0, 0.64), 0 0 1px rgba(0, 0, 0, 0.56);
}
.lh-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lh-tile:hover .lh-cover { filter: brightness(0.96); }
.lh-new {
  position: absolute; top: 4px; left: 4px; padding: 0 8px; border-radius: 8px; background: var(--zeno);
  font: 400 10px/16px var(--font); color: var(--gohan);
}
.lh-tile-text { display: flex; flex-direction: column; width: 100%; padding: 0 4px; min-width: 0; }
.lh-tile-title, .lh-tile-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-tile-title { font: 700 12px/16px var(--font); color: var(--bulma); }
.lh-tile-sub { font: 400 10px/16px var(--font); color: var(--trunks); }
.lh-tile-sub.is-m { font-size: 12px; }
.lh-tile-sub.is-red { color: var(--dodoria); }
.lh-tile-sub.is-green { color: var(--roshi); }

/* ---------- Home sections ---------- */
.lh-sections { display: flex; flex-direction: column; gap: 24px; }
.lh-results { display: flex; flex-direction: column; gap: 4px; }
.lh-hrow { gap: 8px; margin: 0 -20px; padding: 0 20px 4px; scroll-padding: 0 20px; scroll-snap-type: none; }
.lh-more { flex: none; display: flex; padding: 4px; border-radius: 8px; background: var(--beerus); }
.lh-mine { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 16px; background: var(--gohan); }
.lh-mine-head { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.lh-mine-title { flex: 1; min-width: 0; font: 700 20px/32px var(--font); color: var(--bulma); }
.lh-hrow-mine { gap: 12px; margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; }
.lh-hrow-mine .lh-tile { gap: 8px; }
.lh-mine-empty { font: 400 14px/20px var(--font); color: var(--trunks); }
.lh-section { display: flex; flex-direction: column; gap: 8px; }
.lh-sec-head { display: flex; align-items: center; gap: 28px; width: 100%; text-align: left; }
.lh-sec-title { flex: 1; min-width: 0; font: 700 18px/28px var(--font); color: var(--bulma); }
.lh-sec-plain { display: flex; align-items: center; height: 32px; }
.lh-mine-head:hover .lh-more, .lh-sec-head:hover .lh-more { background: #D6D6D6; }
.lh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lh-grid .lh-tile { width: auto; min-width: 0; }
.lh-grid .lh-cover { width: 100%; }
.lh-viewall {
  display: flex; align-items: center; gap: 24px; width: 100%; padding: 12px 16px;
  border: 1px solid var(--beerus); border-radius: 8px; background: var(--gohan);
  font: 400 16px/24px var(--font); color: var(--bulma); text-align: left;
}
.lh-viewall span { flex: 1; }
.lh-viewall:hover { background: #FAFAFA; }

/* ---------- Book row (Book List / My Books / search results) ---------- */
.lh-row {
  display: flex; align-items: flex-start; gap: 16px; width: 100%; padding: 12px 16px;
  border-radius: 16.261px; background: var(--gohan); text-align: left; overflow: hidden;
}
.lh-row:hover { background: #FCFCFC; }
.lh-row-cover {
  flex: none; width: 52px; height: 80px; border-radius: 4px; overflow: hidden; background: var(--gohan);
  border: 1px solid rgba(0, 0, 0, 0.25); box-shadow: 0 6px 6px -6px rgba(0, 0, 0, 0.64), 0 0 1px rgba(0, 0, 0, 0.56);
}
.lh-row-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lh-row-text { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.lh-row-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lh-row-title {
  font: 700 14px/20px var(--font); color: var(--bulma);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lh-row-author { font: 400 14px/20px var(--font); color: var(--trunks); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-row-status { font: 400 12px/16px var(--font); color: var(--trunks); }
.lh-row-status.is-green { color: var(--roshi); }
.lh-row-status.is-red { color: var(--dodoria); }
.lh-row-status.is-zeno { color: var(--zeno); }
.lh-row.is-faded .lh-row-title, .lh-row.is-faded .lh-row-author, .lh-row.is-faded .lh-row-status.is-muted { color: rgba(0, 0, 0, 0.25); }
.lh-row.is-faded .lh-row-cover img { opacity: 0.55; }
.lh-empty { padding: 32px 16px; }

/* ---------- Book List ---------- */
.lh-page-list { gap: 16px; padding-bottom: 110px; }
.lh-body { display: flex; flex-direction: column; gap: 24px; padding-top: 0; }
.lh-list { display: flex; flex-direction: column; gap: 4px; }
.lh-chip { border-color: transparent; }
.lh-chip.menu img { flex: none; }
.lh-chip.is-open { border-color: var(--piccolo); background: var(--gohan); color: var(--bulma); }
.lh-chip.is-sel, .lh-chip.is-sel.is-open { border-color: var(--piccolo); background: var(--piccolo); color: var(--gohan); }
.lh-chip.is-sel img { filter: brightness(0) invert(1); }

/* ---------- My Books ---------- */
.lh-my { padding-bottom: 110px; }
.lh-my-top { background: var(--gohan); padding-top: var(--sb-dash); }
.lh-my-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px 4px; }
.lh-my-search { flex: 1; min-width: 0; background: var(--goku); }
.lh-my-search input { font-weight: 700; }
.lh-my-list { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px 0; }
