/* StoryMint Library page (WS4). The layout, shelves and typeset covers live in /marketing-v2.css (.mk-lib*,
   .mk-shelf*, .mk-typeset); the cards are the shared /sm-book-card.css. This file keeps only what is specific
   to library cards: two-line titles on the shelves and a steady card height while covers load. */
.mk-lib .mk-shelf-row .sm-book-card { height: 100%; }
.mk-lib .mk-shelf-row .sm-book-card-title { font-size: .92rem; }
/* one line of chips: the format chip always shows in full; a secondary chip (the theme) that does not fit wraps
   onto a second line, which is clipped, so it disappears whole instead of reading "Colorin… Ani…" */
.mk-lib .sm-book-card-meta { flex-wrap: wrap; align-items: flex-start; row-gap: 12px; max-height: 22px; overflow: hidden; }
.mk-lib .sm-book-card-meta > * { flex: 0 0 auto; max-width: 100%; line-height: 18px; }
.mk-lib .sm-book-card-meta > .sm-book-card-badge { overflow: hidden; text-overflow: ellipsis; }
.mk-lib .sm-book-card-meta > .sm-book-card-date { padding: 2px 0; font-size: 12px; }
/* "En inglés" on the Spanish site sits on the cover, so it never competes with the format chip */
.mk-lib .sm-book-card-cover { position: relative; }
.mk-lib .mk-lib-lang { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 2px 8px; border-radius: var(--sm-r-pill, 999px); background: rgba(255, 255, 255, .94); color: var(--sm-ink, #17201a); font: 700 11px/16px var(--sm-font-body, system-ui, sans-serif); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); pointer-events: none; }
.mk-lib .sm-book-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
@media (max-width: 639.98px) {
  .mk-lib .sm-book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-lib .mk-shelf-row { grid-auto-columns: minmax(136px, 44vw); }
}
/* skeleton and real cards share one height, so filling a shelf never moves the page */
.mk-lib .sm-book-card-body { height: 104px; box-sizing: border-box; overflow: hidden; }
.mk-lib .sm-book-card-title { min-height: 2.6em; }
/* Beta novel covers (/library/novel-cover.js): the pipeline's cover is the same dark-green type block for every
   novel, so novels get a drawn cover instead. Palette per book (--nc-*), title sized off the cover width (cqi) so
   it stays readable from a 136 px shelf card to the 480-960 px showcase renders; nothing on it is under 10 px. */
.sm-novel-cover {
  position: absolute; inset: 0; z-index: 0; container-type: inline-size; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  padding: 11% 10% 9% 15%;
  background: radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--nc-accent) 22%, transparent), transparent 60%), var(--nc-bg, #3b2350);
  color: var(--nc-fg, #fbeee0);
}
.sm-novel-cover::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 6.5%; background: color-mix(in srgb, var(--nc-bg) 70%, #000); box-shadow: inset -1px 0 0 color-mix(in srgb, var(--nc-accent) 45%, transparent); }
.sm-novel-cover[data-frame="1"]::after { content: ""; position: absolute; inset: 5% 5% 5% 11%; border: 1px solid color-mix(in srgb, var(--nc-accent) 55%, transparent); border-radius: 3px; pointer-events: none; }
.sm-novel-cover > * { position: relative; }
.sm-novel-cover-kicker { font: 700 10px/1.2 var(--sm-font-body, system-ui, sans-serif); font-size: max(10px, 6.4cqi); letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--nc-fg) 82%, var(--nc-bg)); }
.sm-novel-cover > .sm-novel-cover-wash { position: absolute; top: -10%; right: -22%; width: 86%; aspect-ratio: 1; color: var(--nc-accent); opacity: .13; pointer-events: none; }
.sm-novel-cover-motif { display: block; flex: 0 1 auto; min-height: 0; height: 28cqi; aspect-ratio: 1; margin: auto 0 8%; padding: 5cqi; box-sizing: content-box; border: 1.5px solid color-mix(in srgb, var(--nc-accent) 55%, transparent); border-radius: 50%; color: var(--nc-accent); }
.sm-novel-cover-wash svg, .sm-novel-cover-motif svg { display: block; width: 100%; height: 100%; }
.sm-novel-cover-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
  font-family: "Fraunces", Georgia, "Iowan Old Style", "Times New Roman", "DejaVu Serif", serif; font-weight: 700;
  font-size: 15px; font-size: clamp(15px, 13.5cqi, 96px); line-height: 1.08; letter-spacing: -.01em;
  overflow-wrap: break-word; hyphens: auto; text-wrap: balance;
}
.sm-novel-cover-foot { margin-top: 7%; padding-top: 5%; min-width: 34%; border-top: 2px solid var(--nc-accent); font: 700 10px/1.2 var(--sm-font-body, system-ui, sans-serif); font-size: max(10px, 5.6cqi); letter-spacing: .08em; color: color-mix(in srgb, var(--nc-fg) 82%, var(--nc-bg)); }
