/* Warm library canvas and flowing gradient model covers. */
.atoms-library .library-focus-slot:empty { display: none; }
.atoms-library .library-focus-card {
  display: block;
  margin: 8px 0 24px;
  padding: 25px 23px 20px;
  border: 1px solid #e9e2e3;
  border-radius: 26px;
  background: radial-gradient(ellipse at 100% 0%, rgba(215, 0, 80, .10) 0%, rgba(215, 0, 80, .025) 32%, transparent 65%), radial-gradient(ellipse at 96% 12%, #f0e5f1 0%, transparent 47%), radial-gradient(ellipse at 76% 0%, #fff0d9 0%, transparent 57%), #f8f7f3;
  color: #272722;
  font-family: var(--font-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif);
  text-decoration: none;
}
.atoms-library .library-focus-card h2 {
  margin: 0;
  font-family: inherit;
  font-size: var(--text-page-title);
  line-height: var(--leading-page-title);
  font-weight: var(--weight-heading);
  letter-spacing: 0;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.library-focus-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.library-focus-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.library-focus-tags > span { padding: 5px 10px; border-radius: 999px; background: #4237430d; color: #625761; font-size: 11px; line-height: 1.3; }
.library-focus-tags > span:first-child { background: #42374319; color: #4d434c; font-size: 12px; }
.library-focus-new { flex: 0 0 auto; padding: 5px 12px; border-radius: 999px; background: #D70050; color: #fff; font-size: 13px; line-height: 1.35; font-weight: 550; }
.atoms-library .library-focus-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 10px 0 20px;
  color: #69615d;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.library-focus-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.library-focus-action strong { font-size: 13px; font-weight: 600; }
.library-focus-action > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #3c332a12; }
.library-focus-action svg { width: 24px; height: 24px; }
.atoms-library .thinking-library { min-width: 0; gap: 0; }
.atoms-library .thinking-curation { padding: 0 0 38px; }
.atoms-library .model-shelves { display: grid; gap: 28px; margin-top: 20px; }
.model-shelf { min-width: 0; }
.model-shelf-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; }
.atoms-library .model-shelf-heading h2 { display: flex; align-items: center; gap: 9px; min-width: 0; margin: 0; color: #272722; font-family: var(--font-ui); font-size: var(--text-page-title); line-height: var(--leading-page-title); font-weight: var(--weight-heading); letter-spacing: 0; overflow-wrap: anywhere; }
.model-shelf-heading h2 > span { display: flex; flex: 0 0 auto; }
.atoms-library .model-shelf-heading h2 svg { width: 24px; height: 24px; }
.model-shelf-heading button { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; min-height: 44px; padding: 0; border: 0; background: transparent; color: #6a675f; font-size: 13px; font-weight: 550; }
.model-shelf-heading button svg { width: 18px; height: 18px; }
.model-shelf-track { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 2px; padding: 2px 0 9px; scrollbar-width: thin; scrollbar-color: #d2cec4 transparent; }
/* Shared cover for both the category shelves and the collection page. */
.atoms-library .model-cover-card {
  --cover-base: #d4dcfa;
  --cover-glow: #efebff;
  --cover-ribbon: #aaa1ee;
  --cover-edge: #81c6e3;
  position: relative; display: block; flex: 0 0 232px; width: 232px;
  min-height: 224px; padding: 0; border: 1px solid rgba(39, 39, 34, .12);
  border-radius: 20px; overflow: hidden; text-align: left;
  background:
    linear-gradient(0deg, #f8f7f3 0%, rgba(248,247,243,.94) 17%, transparent 76%),
    linear-gradient(115deg, transparent 12%, var(--cover-glow) 30%, transparent 53%),
    radial-gradient(ellipse at 105% 25%, var(--cover-edge), transparent 63%),
    linear-gradient(125deg, var(--cover-ribbon), var(--cover-base) 62%);
  color: #272722; scroll-snap-align: start; cursor: pointer;
  transition: transform 160ms ease;
}
.atoms-library .model-cover-mint { --cover-base: #b7e9df; --cover-glow: #d1f2d6; --cover-ribbon: #76cba2; --cover-edge: #7bd5ef; }
.atoms-library .model-cover-amber { --cover-base: #f4d59c; --cover-glow: #fff0c9; --cover-ribbon: #edb14e; --cover-edge: #ed9b63; }
.atoms-library .model-cover-rose { --cover-base: #cad3f4; --cover-glow: #f4dafa; --cover-ribbon: #dba6e6; --cover-edge: #92b9ed; }
.model-cover-copy {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 224px; height: 100%; box-sizing: border-box; padding: 20px 18px;
  font-family: var(--font-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif);
}
.model-cover-title { display: block; align-self: flex-start; max-width: 100%; font-family: inherit; font-size: var(--text-cover-title); font-weight: var(--weight-cover-title); line-height: var(--leading-cover-title); letter-spacing: 0; text-align: left; }
.model-cover-title-line { display: block; overflow-wrap: anywhere; text-wrap: pretty; }
.model-cover-title::after { content: ""; display: block; width: 6em; max-width: 100%; height: 1px; margin-top: 14px; background: currentColor; opacity: .55; }
.model-cover-summary { display: block; margin-top: 24px; padding-right: 48px; font-family: inherit; font-size: var(--text-ui-body); font-weight: 400; line-height: var(--leading-ui-body); letter-spacing: 0; color: #484841; overflow-wrap: anywhere; }
.model-cover-arrow { position: absolute; right: 14px; bottom: 16px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(39,39,34,.12); border-radius: 50%; color: #272722; background: #fffdf9; }
.model-cover-arrow svg { width: 20px; height: 20px; }
.model-cover-card:active { transform: scale(.98); }
.model-cover-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr)); gap: 16px; }
.atoms-library .model-cover-grid .model-cover-card { width: 100%; min-width: 0; }
.model-cover-grid .model-cover-copy { padding: 20px 18px; }
/* Reuse the shared title roles across the three library catalogs. */
.atoms-library .category-collection > header .collection-title-row h2 {
  font-family: var(--font-ui); font-size: var(--text-page-title); line-height: var(--leading-page-title);
  font-weight: var(--weight-heading); letter-spacing: 0; overflow-wrap: anywhere;
}
.atoms-library .collection-title-row { flex-wrap: wrap; gap: 8px 16px; }
.atoms-library .bookshelf-section .book-card { align-self: start; }
.atoms-library .bookshelf-section .book-card h3 {
  display: block; overflow: visible; white-space: normal; text-overflow: clip; -webkit-line-clamp: unset;
  font-family: var(--font-ui); font-size: var(--text-card-title); line-height: var(--leading-card-title);
  font-weight: var(--weight-card-title); letter-spacing: 0; text-wrap: pretty; overflow-wrap: anywhere;
}
.atoms-library .course-list-title {
  display: block; overflow: visible; -webkit-line-clamp: unset;
  font-family: var(--font-ui); font-size: var(--text-section-title); line-height: var(--leading-section-title);
  font-weight: var(--weight-heading); letter-spacing: 0; text-wrap: pretty; overflow-wrap: anywhere;
}
.model-cover-card:focus-visible, .model-shelf-track:focus-visible, .library-focus-card:focus-visible, .model-shelf-heading button:focus-visible { outline: 3px solid #a51c50; outline-offset: 3px; }
.library-focus-card::selection, .model-shelf-heading ::selection { color: #272722; background: #efd5df; }
@media (hover: hover) {
  .library-focus-card:hover { border-color: #cdbdc5; }
  .model-shelf-heading button:hover { color: #272722; }
}
@media (max-width: 360px) {
  .atoms-library .model-shelf-heading h2 { gap: 6px; }
  .atoms-library .library-focus-card { padding: 22px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) { .atoms-library .model-cover-card { transition: none; } }
