.library-page { --sample-blue: #e7effb; --sample-sand: #f4ece0; --sample-green: #e4efeb; }
.library-page [hidden] { display: none !important; }
:root:not(.js) [data-favorites-only="true"] .library-grid,
:root:not(.js) [data-favorites-only="true"] .collection-toolbar p,
:root:not(.js) [data-favorites-only="true"] .collection-end { display: none; }
.library-language { display: flex; align-items: center; gap: 6px; }
.library-language select { min-height: 42px; width: 64px; padding: 6px 8px; color: var(--header-text); background: #172840; border: 1px solid var(--header-line); border-radius: 10px; font: inherit; font-size: 12px; }
.language-apply { color: var(--header-text); background: #172840; border: 1px solid var(--header-line); border-radius: 8px; padding: 8px; }
.library-search-form { width: min(100%, 360px); min-width: 0; }
.library-search-form .library-search { width: 100%; max-width: none; padding: 5px; gap: 6px; cursor: auto; }
.library-search-form input[type="search"] { min-width: 0; width: 100%; padding: 8px; cursor: text; }
.library-search-form button { min-height: 38px; padding: 8px 14px; background: var(--action); color: #fff; border: 1px solid var(--accent); border-radius: 8px; font: inherit; font-size: 12px; font-weight: 700; }
.library-search-form small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.library-intro-actions .library-upload { flex-shrink: 0; }
.library-search-summary { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.library-search-summary a { color: var(--accent); text-decoration: underline; }
.library-local-notice { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 12px 0; }
.library-storage-notice { margin: 16px 24px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.library-favorite { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--bg); font: inherit; font-size: 12px; font-weight: 650; }
.library-favorite svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; flex-shrink: 0; }
.library-favorite[aria-pressed="true"] { background: var(--surface-soft); color: var(--accent); border-color: var(--accent); }
.library-favorite[aria-pressed="true"] svg { fill: currentColor; }
.library-favorite:hover { border-color: var(--accent); color: var(--accent); }
.library-card > .library-favorite { margin: 0 16px 14px; align-self: flex-start; }
.model-detail-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
html { scrollbar-gutter: stable; }
.library-page .bar, .library-page .footer-content, .library-main.library-index { width: calc(100% - 40px); max-width: none; }
:root[data-theme="dark"] .library-page { --sample-blue: #22344e; --sample-sand: #3b342d; --sample-green: #243c38; }
.library-nav a[aria-current] { color: #fff; text-decoration: underline; text-decoration-color: #9fc4ff; text-underline-offset: 9px; text-decoration-thickness: 2px; }
.js .library-page .nav-toggle { display: none !important; }
.library-main { padding-bottom: 56px; }
.library-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 25px; color: var(--muted); font-size: 12px; }
.library-breadcrumb a:hover, .library-back:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.library-intro { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; gap: 25px; }
.library-intro h1 { font-size: clamp(26px,2.2vw,34px); line-height: 1.2; letter-spacing: -.8px; margin: 0 0 8px; font-weight: 760; }
.library-intro p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.7; }
.sample-notice { display: flex; align-items: center; gap: 13px; padding: 12px 15px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; }
.sample-notice p { font-size: 12px; color: var(--muted); margin: 0; flex: 1; }
.sample-notice strong { color: var(--ink); font-weight: 700; }
.sample-notice-icon { width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid var(--accent); color: var(--accent); border-radius: 50%; font-weight: 750; font-size: 13px; flex-shrink: 0; }
.sample-pill { display: inline-flex; background: var(--surface-soft); color: var(--accent); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; font-weight: 750; letter-spacing: .2px; padding: 5px 9px; white-space: nowrap; }
.library-workspace { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 24px; margin-top: 20px; align-items: start; }
.library-content { min-width: 0; border: 1px solid var(--line); border-radius: 24px; padding: 24px 28px 28px; }
.library-sidebar { position: sticky; top: 96px; max-height: calc(100dvh - 116px); min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.library-filter-toggle { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; flex-shrink: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 650; }
.library-filter-toggle[hidden] { display: none; }
.library-filter-toggle:hover { border-color: var(--accent); color: var(--accent); }
.library-filter-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.library-filter-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.library-sidebar h2 { flex-shrink: 0; color: var(--ink); font-size: 13px; margin: 0; padding: 18px 18px 10px; }
.category-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 10px; scrollbar-width: none; -ms-overflow-style: none; scroll-padding-block: 10px; }
.category-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.category-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 10px; }
.category-nav { display: grid; gap: 5px; }
.category-link { display: flex; align-items: center; gap: 10px; border: 1px solid transparent; min-height: 45px; border-radius: 9px; padding: 10px 11px; font-size: 12px; color: var(--muted); }
.category-symbol { display: grid; place-items: center; width: 21px; height: 22px; flex-shrink: 0; color: inherit; }
.category-symbol svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.category-label { min-width: 0; line-height: 1.45; }
.category-count { margin-left: auto; font-size: 11px; min-width: 20px; text-align: center; }
.category-link:hover { background: var(--surface-soft); color: var(--ink); }
.category-link.selected { color: var(--accent); background: var(--surface-soft); border-color: var(--line); font-weight: 750; }
.category-link.selected .category-symbol { color: var(--accent); }
.library-sidebar-note { margin-top: 30px; padding: 21px 15px; border-top: 1px solid var(--line); }
.library-sidebar-note .kicker { font-size: 9px; }
.library-sidebar-note p { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 10px 0 15px; }
.library-sidebar-note a { color: var(--accent); font-size: 11px; font-weight: 700; }
.library-workspace[data-filters-collapsed="true"] { grid-template-columns: 68px minmax(0,1fr); }
[data-filters-collapsed="true"] .library-sidebar h2, [data-filters-collapsed="true"] .category-label, [data-filters-collapsed="true"] .category-count, [data-filters-collapsed="true"] .library-sidebar-note, [data-filters-collapsed="true"] [data-filter-label] { display: none; }
[data-filters-collapsed="true"] .library-filter-toggle svg { transform: rotate(180deg); }
[data-filters-collapsed="true"] .category-scroll { padding: 8px; }
[data-filters-collapsed="true"] .category-link { justify-content: center; padding: 10px 0; min-height: 46px; }
[data-filters-collapsed="true"] .category-group-label { height: 10px; margin: 4px 8px; padding: 0; border-top: 1px solid var(--line); font-size: 0; }
.category-tooltip { position: fixed; z-index: 90; max-width: min(260px,calc(100vw - 16px)); padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 8px 24px #0002; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 650; pointer-events: none; }
.library-intro-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-shrink: 0; min-width: 0; }
.library-upload { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 650; cursor: not-allowed; }
.library-upload small { display: block; font-size: 9px; font-weight: 400; margin-top: 2px; }
.library-upload svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.library-collection { min-width: 0; }
.collection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 0 16px; }
.collection-toolbar h2 { font-size: 18px; letter-spacing: -.4px; line-height: 1.25; margin: 0; }
.collection-toolbar p { margin: 0; font-size: 12px; color: var(--muted); }
.library-search { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; min-height: 44px; max-width: 300px; cursor: not-allowed; }
.library-search svg { fill: none; stroke: var(--muted); stroke-width: 1.6; width: 19px; flex-shrink: 0; }
.library-search input { font-size: 12px; min-width: 0; width: 115px; padding: 0; color: var(--muted); background: none; border: 0; cursor: not-allowed; opacity: 1; }
.library-intro .library-search { flex-shrink: 0; }
.library-search input::placeholder { color: var(--muted); opacity: 1; }
.library-search span { font-size: 9px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 9px; }
.library-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.library-card { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; overflow: hidden; min-width: 0; transition: border-color .18s, transform .18s; }
.library-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.library-card:focus-within { outline: 3px solid var(--focus); outline-offset: 4px; }
.library-card-link { display: flex; flex-direction: column; height: 100%; }
.library-card-link:focus-visible { outline: none; }
.library-card-art { position: relative; aspect-ratio: 480/340; display: grid; place-items: center; overflow: hidden; }
[data-category="organizacion"] { background: var(--sample-blue); }
[data-category="hogar"] { background: var(--sample-sand); }
[data-category="accesorios"] { background: var(--sample-green); }
.library-card-art img { display: block; width: 100%; height: auto; }
.art-label { position: absolute; z-index: 1; left: 13px; top: 12px; background: var(--surface); color: var(--muted); font-size: 9px; font-weight: 650; padding: 4px 8px; border-radius: 5px; border: 1px solid var(--line); }
.art-open { position: absolute; right: 12px; bottom: 12px; width: 26px; height: 26px; display: grid; place-items: center; background: var(--surface); color: var(--accent); border: 1px solid var(--line); border-radius: 50%; font-size: 16px; }
.library-card-copy { padding: 17px 16px 14px; display: flex; flex: 1; flex-direction: column; }
.library-card-category { text-transform: uppercase; color: var(--accent); font-size: 9px; font-weight: 750; letter-spacing: .8px; }
.library-card h3 { font-size: 16px; line-height: 1.3; letter-spacing: -.3px; margin: 7px 0; }
.library-card p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0 0 18px; }
/* The card introduces the model. Provenance, validation and actions live in its sheet. */
.library-card-simple { position: relative; overflow: visible; border-color: transparent; border-radius: 14px; background: transparent; padding-bottom: 8px; }
.library-card-simple:hover { transform: none; border-color: var(--line); background: var(--surface); }
.library-card-simple .library-card-link { height: auto; }
.library-card-simple .library-card-art { border: 1px solid var(--line); border-radius: 13px; }
.library-card-simple .library-card-copy { flex-direction: row; align-items: flex-start; gap: 8px; padding: 11px 8px 5px; }
.library-card-simple h3 { margin: 0; flex: 1; font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.library-card-simple .model-format { flex-shrink: 0; font-size: 9px; margin: 2px 0 0; }
.library-card-simple > .library-favorite { position: absolute; z-index: 2; top: 10px; right: 10px; margin: 0; width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 0 2px 10px #0002; }
.library-card-simple > .library-favorite span { display: none; }
.library-card-simple > .library-favorite[aria-pressed="true"] { color: var(--accent); }
.library-card-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; padding: 0 8px; min-height: 28px; }
.card-credit { font-size: 10px; color: var(--muted); line-height: 1.6; padding: 6px 0; }
.card-credit:hover { text-decoration: underline; color: var(--accent); }
.library-card-simple .accounts-stats { border: 0; padding: 0; gap: 10px; font-size: 11px; }
.library-card-simple .accounts-stats button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; padding: 6px 3px; min-height: 32px; gap: 4px; }
.library-card-simple .accounts-stats button:hover, .library-card-simple .accounts-stats button[aria-pressed="true"] { color: var(--accent); }
.library-card-simple .accounts-stats svg { width: 14px; height: 14px; }
.library-card-simple .accounts-downloads { gap: 4px; }
@media (hover: hover) and (pointer: fine) {
  .library-card-simple > .library-favorite { opacity: 0; pointer-events: none; }
  .library-card-simple:hover > .library-favorite, .library-card-simple:focus-within > .library-favorite, .library-card-simple > .library-favorite[aria-pressed="true"] { opacity: 1; pointer-events: auto; }
}
.category-row { display: flex; align-items: center; }
.category-row .category-link { flex: 1; min-width: 0; gap: 8px; padding-right: 2px; }
.subcategory-toggle { display: grid; place-items: center; flex: 0 0 32px; min-height: 40px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.subcategory-toggle:hover { color: var(--accent); background: var(--surface-soft); }
.subcategory-toggle svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.subcategory-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.subcategory-links { margin: 2px 6px 9px 21px; padding-left: 9px; border-left: 1px solid var(--line); }
.subcategory-link { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 8px; color: var(--muted); border-radius: 7px; font-size: 11px; line-height: 1.4; }
.subcategory-link:hover, .subcategory-link.selected { color: var(--accent); background: var(--surface-soft); }
.subcategory-link.selected { font-weight: 700; }
[data-filters-collapsed="true"] .subcategory-toggle, [data-filters-collapsed="true"] .subcategory-links { display: none; }
[data-filters-collapsed="true"] .category-row .category-link { padding: 10px 0; }
.library-card-bottom { display: flex; align-items: center; gap: 6px; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; margin-top: auto; }
.card-view { color: var(--accent); font-weight: 700; white-space: nowrap; }
.collection-end { text-align: center; font-size: 11px; color: var(--muted); margin: 26px 0 0; }
.library-empty { grid-column: 1/-1; display: flex; align-items: center; flex-direction: column; text-align: center; min-height: 365px; justify-content: center; border: 1px dashed var(--line); background: var(--surface); border-radius: 15px; padding: 30px; }
.empty-symbol { font-size: 48px; line-height: 1; color: var(--accent); margin-bottom: 16px; }
.library-empty h3 { font-size: 23px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.5px; }
.library-empty p { color: var(--muted); font-size: 13px; margin: 0 0 25px; }
.library-footer { border-top: 1px solid var(--line); padding: 25px 0; }
.library-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 12px; font-weight: 650; margin: 12px 0 15px; }
.library-detail { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); align-items: start; gap: 42px; }
.detail-visual { margin: 0; min-width: 0; }
.detail-art { position: relative; border-radius: 20px; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 1.15; display: grid; place-items: center; }
.detail-art img { width: 100%; height: auto; }
.detail-art .art-label { top: 18px; left: 18px; }
.detail-visual figcaption { color: var(--muted); font-size: 11px; padding: 12px 3px; }
.detail-summary { padding-top: 6px; }
.detail-category { display: inline-flex; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--accent); font-weight: 750; }
.detail-summary .detail-title { font-size: clamp(29px,3vw,42px); line-height: 1.15; letter-spacing: -1.2px; margin: 14px 0 13px; }
.detail-lead { font-size: 15px; color: var(--muted); line-height: 1.7; margin: 0 0 19px; }
.detail-demo-note { margin-top: 23px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.detail-demo-note strong { font-size: 13px; }
.detail-demo-note p { font-size: 12px; color: var(--muted); margin: 6px 0 0; line-height: 1.7; }
.detail-facts { margin: 22px 0 0; font-size: 12px; }
.detail-facts > div { display: grid; grid-template-columns: 135px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; font-weight: 600; }
.detail-description { margin-top: 36px; padding: 31px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 42px; }
.detail-description h2 { font-size: 24px; letter-spacing: -.5px; margin: 8px 0 12px; }
.detail-description p { font-size: 14px; color: var(--muted); line-height: 1.85; margin: 0; max-width: 650px; }
.detail-ideas { padding: 10px 0; }
.detail-ideas h3 { font-size: 14px; margin: 0 0 14px; }
.detail-ideas ul { padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.8; margin: 0; }
.detail-ideas li { padding-left: 4px; margin: 7px 0; }
.detail-ideas li::marker { color: var(--accent); }
.detail-related { margin-top: 32px; }
.detail-related h2 { margin: 5px 0 0; font-size: 23px; letter-spacing: -.5px; }
.related-card { display: flex; align-items: center; gap: 20px; max-width: 630px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; padding-right: 20px; }
.related-card:hover { border-color: var(--accent); }
.related-card img { width: 150px; height: auto; background: var(--surface-soft); }
.related-card > span:not(.related-arrow) { display: grid; gap: 5px; }
.related-card small { color: var(--accent); font-size: 10px; }
.related-card strong { font-size: 15px; }
.related-card span span { color: var(--muted); font-size: 11px; }
.related-arrow { color: var(--accent); font-size: 20px; margin-left: auto; }
/* Native dialog retains keyboard containment and an inert background. */
.library-modal-open { overflow: hidden; }
.library-modal { width: calc(100% - 64px); max-width: 1480px; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--bg); box-shadow: 0 24px 90px #0006; }
.library-modal:not([open]) { display: none; }
.library-modal[open] { display: flex; flex-direction: column; }
.library-modal::backdrop { background: #030a16ad; backdrop-filter: blur(6px); }
.library-modal-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 20px; min-height: 58px; padding: 6px 16px 6px 32px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 650; }
.library-modal-close { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--bg); }
.library-modal-close:hover { border-color: var(--accent); background: var(--surface-soft); }
.library-modal-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.library-modal-content { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 24px 32px 32px; }
.library-modal .detail-title { font-size: clamp(27px,2.4vw,36px); }
@media (min-width: 1600px) {
  .library-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 1180px) {
  .js .library-page .nav-toggle { display: inline-flex !important; }
  .library-workspace { grid-template-columns: 220px minmax(0,1fr); gap: 20px; }
  .library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .library-detail, .detail-description { gap: 28px; }
  .library-content { padding: 22px; }
  .library-intro { align-items: flex-start; flex-direction: column; gap: 16px; }
  .library-intro-actions { justify-content: flex-start; flex-wrap: wrap; width: 100%; }
}
@media (max-width: 820px) {
  .library-workspace { grid-template-columns: 1fr; gap: 14px; }
  .library-sidebar { position: static; max-height: 340px; }
  .library-workspace[data-filters-collapsed="true"] { grid-template-columns: 58px minmax(0,1fr); gap: 12px; }
  [data-filters-collapsed="true"] .library-sidebar { position: sticky; top: 96px; max-height: calc(100dvh - 116px); }
  [data-filters-collapsed="true"] .category-scroll { padding: 6px; }
  .library-sidebar-note { display: none; }
  .library-detail, .detail-description { grid-template-columns: 1fr; gap: 18px; }
  .detail-art { aspect-ratio: 1.5; }
  .detail-art img { max-width: 560px; }
  .detail-summary { padding-top: 4px; }
  .detail-description { margin-top: 28px; }
  .library-modal { width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .library-modal-header { padding-left: 20px; }
  .library-modal-content { padding: 20px; }
}
@media (max-width: 550px) {
  .library-page .bar, .library-page .footer-content, .library-main.library-index { width: calc(100% - 28px); }
  .library-intro { padding-bottom: 18px; }
  .library-intro h1 { font-size: 28px; letter-spacing: -.7px; }
  .library-intro p { font-size: 13px; }
  .library-content { padding: 18px 14px; border-radius: 18px; }
  .sample-notice { align-items: flex-start; padding: 14px 12px; gap: 10px; }
  .sample-notice > .sample-pill { display: none; }
  .sample-notice p { font-size: 11px; }
  .sample-notice strong { display: block; margin-bottom: 3px; }
  .library-workspace { margin-top: 20px; }
  .collection-toolbar { flex-wrap: wrap; gap: 8px; }
  .library-search { max-width: none; width: 100%; }
  .library-search input { flex: 1; width: 100%; }
  .library-grid { grid-template-columns: 1fr; gap: 18px; }
  .library-card-art { aspect-ratio: 1.65; }
  .library-card-art img { max-height: 100%; width: auto; max-width: 100%; }
  .library-card h3 { font-size: 19px; }
  .library-card-copy { padding: 18px; }
  .library-card p { font-size: 13px; }
  .library-card-bottom { font-size: 10px; }
  .library-footer .footer-content { flex-direction: column; align-items: flex-start; gap: 10px; }
  .detail-summary .detail-title { font-size: 30px; }
  .library-modal .detail-title { font-size: 28px; }
  .detail-facts > div { grid-template-columns: 115px 1fr; }
  .detail-art { aspect-ratio: 1.2; }
  .related-card { gap: 12px; padding-right: 12px; }
  .related-card img { width: 100px; }
  .related-card span span { display: none; }
  .library-empty { min-height: 320px; padding: 24px 18px; }
}
:root:not(.js) .library-nav { display: flex; position: static; box-shadow: none; flex-wrap: wrap; flex-direction: row; flex: 1 1 100%; min-width: 0; margin: 0; padding: 0; gap: 8px 20px; }
:root:not(.js) .library-nav .coming-soon { flex-basis: 100%; min-width: 0; }
:root:not(.js) .library-nav .tooltip { position: static; display: block; width: auto; max-width: 100%; visibility: visible; opacity: 1; padding: 6px 0; background: transparent; border: 0; box-shadow: none; color: var(--header-text); }
:root:not(.js) .library-page .bar { flex-wrap: wrap; }
:root:not(.js) .library-page .nav-toggle { display: none; }
@media (prefers-reduced-motion: reduce) { .library-card { transition: none; } .library-card:hover { transform: none; } }

/* Consultation-only repairs: identity, variants and evidence stay separate. */
.library-sections { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.library-sections a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 650; }
.library-sections a span { min-width: 22px; padding: 2px 6px; text-align: center; border-radius: 5px; background: var(--surface-soft); font-size: 10px; }
.library-sections a[aria-current] { color: var(--accent); background: var(--surface-soft); border-color: var(--accent); }
.library-sections a:hover { border-color: var(--accent); }
.category-group-label { color: var(--muted); font-size: 10px; font-weight: 750; padding: 15px 11px 5px; }
[data-category="vehiculos"] { background: var(--sample-blue); }
[data-category="electrodomesticos"] { background: var(--sample-green); }
[data-category="hogar-mobiliario"] { background: var(--sample-sand); }
[data-category="herramientas-equipos"] { background: #ebe7f3; }
:root[data-theme="dark"] [data-category="herramientas-equipos"] { background: #343049; }
.card-equipment { margin: 0 0 10px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 11px; }
.card-equipment div { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 7px; padding: 3px 0; }
.card-equipment dt { color: var(--muted); }
.card-equipment dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.compatibility-badge { align-self: flex-start; color: var(--accent); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 5px; padding: 4px 7px; margin-bottom: 16px; font-size: 9px; line-height: 1.5; }
.detail-facts dd { overflow-wrap: anywhere; }
/* Dedicated thumbnails show the full mesh; credit stays in HTML below the image. */
.library-card-art[data-real-model], .detail-art[data-real-model] { aspect-ratio: 4 / 3; background: #f4f6fa; }
:root[data-theme="dark"] [data-real-model] { background: #101a28; }
.library-card-art[data-real-model] img, .detail-art[data-real-model] img { width: 100%; height: auto; max-width: none; max-height: none; object-fit: contain; }
/* Midpoint between the previous cover framing and the enlarged thumbnails. */
.library-card-link[data-library-item="flexi-rex"] .library-card-art { --thumbnail-width: 83.202856%; }
.library-card-link[data-library-item="funny-flexi-octopus"] .library-card-art { --thumbnail-width: 79.276272%; }
.library-card-art[data-real-model] .model-render { width: var(--thumbnail-width, 100%); }
.library-page .model-render-dark { display: none; }
:root[data-theme="dark"] .library-page .model-render-light { display: none; }
:root[data-theme="dark"] .library-page .model-render-dark { display: block; }
.library-real-card { display: flex; flex-direction: column; }
.library-real-card .library-card-link { height: auto; flex: 1; }
.library-card .card-attribution { display: block; padding: 10px 16px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.library-real-card .library-card-copy { padding-top: 12px; }
.library-real-card:not(.library-card-simple) h3 { margin-bottom: 16px; }
.model-byline a, .detail-facts a, .model-provenance a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.model-byline { color: var(--muted); font-size: 13px; margin: -5px 0 16px; }
.model-source { gap: 9px; margin-bottom: 0; }
.model-format { display: inline-flex; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .4px; }
.library-card-category .model-format { margin-left: 7px; }
.model-download-block { margin-top: 23px; }
.model-download { display: flex; justify-content: center; gap: 10px; width: 100%; min-height: 48px; font-size: 14px; }
.model-download svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.model-download-note { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.model-download-package { display: flex; width: 100%; min-height: 44px; margin-top: 14px; }
.related-empty { border: 1px dashed var(--line); border-radius: 14px; background: var(--surface); padding: 20px 22px; }
.related-empty p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.related-empty strong { color: var(--ink); }
.related-card + .related-card { margin-top: 14px; }
.related-card .related-render { display: block; flex: 0 0 150px; }
.related-render .model-render { width: 100%; height: auto; }
@media (max-width: 550px) { .related-card .related-render { flex-basis: 100px; } .related-render .model-render { width: 100%; } }
.detail-description .model-validation { margin-top: 16px; }
.model-provenance { padding-top: 30px; max-width: 960px; }
.model-provenance h2 { margin: 7px 0 18px; font-size: 24px; letter-spacing: -.5px; }
.model-provenance p { font-size: 13px; line-height: 1.8; color: var(--muted); overflow-wrap: anywhere; }
.model-authors { display: flex; flex-wrap: wrap; gap: 18px 48px; margin: 0 0 22px; }
.model-authors dt { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.model-authors dd { font-size: 14px; font-weight: 650; margin: 0; }
.repair-compatibility { margin-top: 32px; padding-top: 30px; border-top: 1px solid var(--line); min-width: 0; }
.repair-compatibility h2 { margin: 6px 0 0; font-size: clamp(22px,2.3vw,29px); line-height: 1.25; letter-spacing: -.6px; }
.compatibility-intro { color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 850px; margin: 0 0 20px; }
.repair-evidence { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0 0 22px; }
.repair-evidence > div { padding: 17px 19px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.repair-evidence dt { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.repair-evidence dd { margin: 0; font-size: 14px; font-weight: 700; }
.compatibility-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.compatibility-table { width: 100%; min-width: 710px; border-collapse: collapse; text-align: left; font-size: 12px; line-height: 1.65; }
.compatibility-table caption { text-align: left; padding: 14px 17px; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--line); }
.compatibility-table thead { background: var(--surface-soft); }
.compatibility-table th, .compatibility-table td { padding: 14px 17px; vertical-align: top; }
.compatibility-table th[scope="col"] { font-size: 11px; font-weight: 750; }
.compatibility-table th[scope="row"] { min-width: 140px; font-weight: 650; }
.compatibility-table td:nth-child(2) { min-width: 175px; }
.compatibility-table td:last-child { color: var(--muted); }
.compatibility-table tbody tr + tr { border-top: 1px solid var(--line); }
.compatibility-state { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--accent); background: var(--surface-soft); font-size: 10px; font-weight: 650; white-space: nowrap; }
.compatibility-state[data-state="unconfirmed"] { color: var(--muted); background: var(--bg); }
.compatibility-scroll-hint { display: none; color: var(--muted); font-size: 11px; }
@media (max-width: 820px) {
  .category-group-label { flex-basis: 100%; padding: 8px 0 3px; }
  .compatibility-scroll-hint { display: block; }
}
@media (max-width: 550px) {
  .library-sections { gap: 8px; }
  .library-sections a { font-size: 11px; padding: 9px 12px; }
  .repair-evidence { grid-template-columns: 1fr; gap: 8px; }
  .repair-evidence > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; }
  .repair-evidence dt { margin: 0; }
  .repair-evidence dd { font-size: 12px; }
  .card-equipment { font-size: 12px; }
}
