.model-library { --library-panel: var(--customer-panel, #151519); --library-border: var(--customer-border, #3f3f46); --library-muted: var(--customer-muted, #b4b4bd); --library-accent: var(--customer-accent, #a6ceb2); max-width: 1280px; margin: 0 auto; padding: 52px 32px 64px; }
.library-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; }
.library-eyebrow { margin: 0 0 8px; color: var(--library-accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.library-heading h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.12; margin: 0; }
.library-intro { max-width: 670px; margin: 14px 0 0; color: var(--library-muted); font-size: 16px; line-height: 1.7; }
.library-button { display: inline-flex; min-height: 46px; justify-content: center; align-items: center; gap: 9px; padding: 10px 18px; border: 1px solid var(--library-accent); border-radius: 10px; background: var(--library-accent); color: #18271e; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; cursor: pointer; }
.library-button:hover { background: #bfdfc6; border-color: #bfdfc6; }
.library-button-secondary { background: transparent; color: var(--library-accent); }
.library-button-secondary:hover { background: rgb(166 206 178 / .1); }
.model-library :is(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--library-accent); outline-offset: 4px; }
.library-filters { display: flex; align-items: flex-end; gap: 14px; padding: 20px; border: 1px solid var(--library-border); border-radius: 16px; background: var(--library-panel); }
.library-search-field { flex: 1 1 250px; }
.library-category-field { flex: 0 1 220px; }
.model-library label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.model-library :is(input, select, textarea) { width: 100%; border-radius: 8px; padding: 11px 12px; font-size: 14px; min-height: 46px; }
.library-search-input { position: relative; }
.library-search-input i { position: absolute; top: 16px; left: 14px; color: var(--library-muted); pointer-events: none; font-size: 14px; }
.library-search-input input { padding-left: 39px; }
.library-clear { display: inline-flex; min-height: 46px; align-items: center; color: var(--library-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.library-result-count { margin: 24px 0 16px; color: var(--library-muted); font-size: 13px; }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.library-card { overflow: hidden; border-radius: 18px; border: 1px solid var(--library-border); background: var(--library-panel); transition: border-color .2s, transform .2s; }
.library-card:hover, .library-card:focus-within { border-color: var(--library-accent); transform: translateY(-3px); }
.library-card-link { height: 100%; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.library-thumbnail { position: relative; aspect-ratio: 1; overflow: hidden; background: #292f2b; }
.library-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.library-category-tag { position: absolute; top: 14px; left: 14px; max-width: calc(100% - 28px); border: 1px solid rgb(255 255 255 / .16); border-radius: 7px; padding: 5px 9px; background: rgb(18 24 20 / .86); color: #e9f1eb; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.library-view-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 7px 12px; border-radius: 20px; background: rgb(18 24 20 / .86); color: #e9f1eb; font-size: 12px; }
.library-card-copy { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.library-card-copy h2 { font-size: 21px; line-height: 1.25; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.library-card-copy > p { margin: 9px 0 0; font-size: 14px; color: var(--library-muted); line-height: 1.6; overflow-wrap: anywhere; }
.library-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: auto; padding-top: 22px; font-size: 13px; font-weight: 700; color: var(--library-accent); }
.library-empty { text-align: center; padding: 64px 20px; }
.library-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 18px; background: var(--library-panel); color: var(--library-accent); font-size: 25px; margin-bottom: 18px; }
.library-empty h2 { margin: 0; font-size: 25px; font-weight: 700; }
.library-empty p { margin: 10px 0 22px; color: var(--library-muted); font-size: 14px; }
.library-how-it-works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--library-border); }
.library-how-it-works > div { display: flex; gap: 13px; align-items: flex-start; }
.library-how-it-works i { margin-top: 4px; color: var(--library-accent); font-size: 20px; }
.library-how-it-works p { margin: 0; }
.library-how-it-works strong { display: block; font-size: 14px; font-weight: 700; }
.library-how-it-works span { display: block; margin-top: 3px; font-size: 13px; color: var(--library-muted); }
.model-library-admin { padding-top: 32px; }
.library-admin-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.library-editor { padding: 24px; border: 1px solid var(--library-border); border-radius: 16px; background: var(--library-panel); }
.library-editor h2, .library-list-heading h2 { margin: 0; font-size: 21px; font-weight: 700; }
.library-editor > p { margin: 8px 0 22px; font-size: 14px; color: var(--library-muted); line-height: 1.65; }
.library-editor-form { display: flex; flex-direction: column; gap: 18px; }
.library-editor-form textarea { resize: vertical; }
.library-editor-form input[type=file] { font-size: 12px; }
.library-draft-preview { margin: 0; }
.library-draft-preview img { width: 160px; height: 160px; object-fit: contain; background: #292f2b; border-radius: 10px; }
.library-draft-preview figcaption { margin-top: 7px; font-size: 12px; color: var(--library-muted); }
.library-auto-preview { min-width: 0; }
.library-auto-preview [hidden] { display: none !important; }
.library-model-viewer { width: min(100%, 360px); aspect-ratio: 1; overflow: hidden; border: 1px solid var(--library-border); border-radius: 12px; background: #292f2b; touch-action: none; }
.library-model-viewer canvas { display: block; width: 100%; height: 100%; }
.library-preview-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.library-preview-actions .library-button { min-height: 40px; padding: 8px 12px; font-size: 12px; }
.library-preview-actions .library-button:disabled, .library-editor-form > .library-button:disabled { opacity: .55; cursor: wait; }
.library-auto-preview [data-library-preview-status][data-error=true] { color: #fca5a5; }
.library-field-help { margin: 8px 0 0; font-size: 12px; color: var(--library-muted); line-height: 1.65; }
.library-field-help a { color: var(--library-accent); text-decoration: underline; text-underline-offset: 3px; }
.library-publish-note { margin: 0; padding: 12px; border-radius: 8px; background: rgb(166 206 178 / .08); color: var(--library-muted); font-size: 12px; line-height: 1.65; }
.library-publish-note i { color: var(--library-accent); margin-right: 5px; }
.library-notice { margin: 0 0 22px; padding: 14px 18px; border: 1px solid rgb(166 206 178 / .4); border-radius: 10px; color: #c9e6d1; background: rgb(166 206 178 / .08); font-size: 14px; }
.library-error { border-color: rgb(248 113 113 / .4); color: #fecaca; background: rgb(248 113 113 / .08); }
.library-list-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.library-list-heading > span { border-radius: 20px; padding: 3px 9px; background: var(--library-panel); color: var(--library-muted); font-size: 12px; }
.library-admin-card { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 16px; padding: 18px; border: 1px solid var(--library-border); border-radius: 14px; background: var(--library-panel); }
.library-admin-card > img { width: 100px; height: 100px; object-fit: contain; border-radius: 9px; background: #292f2b; flex: 0 0 100px; }
.library-admin-card-copy { min-width: 0; flex: 1; }
.library-admin-card h3 { margin: 0; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.library-admin-category { margin: 0 0 4px; color: var(--library-accent); font-size: 11px; font-weight: 700; }
.library-admin-run { margin: 5px 0 0; color: var(--library-muted); font-size: 12px; }
.library-admin-description { margin: 8px 0 0; color: var(--library-muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.library-entry-actions { display: flex; align-items: center; flex-wrap: wrap; column-gap: 16px; row-gap: 3px; margin-top: 12px; }
.library-entry-actions :is(a, button) { display: inline-flex; align-items: center; min-height: 36px; font-size: 12px; font-weight: 700; color: var(--library-accent); text-decoration: underline; text-underline-offset: 3px; }
.library-entry-actions button { color: #fca5a5; background: none; border: 0; padding: 0; cursor: pointer; }
.library-status-unavailable { margin: 10px 0 0; color: #fcd99a; font-size: 12px; line-height: 1.6; }
.library-status-unavailable i { margin-right: 5px; }
.library-admin-empty { text-align: center; border: 1px dashed var(--library-border); border-radius: 14px; padding: 42px 24px; }
.library-admin-empty > i { color: var(--library-accent); font-size: 28px; }
.library-admin-empty h3 { margin: 14px 0 7px; font-size: 18px; font-weight: 700; }
.library-admin-empty p { margin: 0; color: var(--library-muted); font-size: 13px; }
@media (max-width: 1000px) { .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .library-admin-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .model-library { padding: 32px 18px 44px; } .library-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 24px; } .library-intro { font-size: 14px; } .library-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 16px; gap: 12px; } .library-search-field { grid-column: 1 / -1; } .library-filters > .library-clear { min-height: 30px; } .library-grid { gap: 16px; } .library-card-copy { padding: 16px; } .library-card-copy h2 { font-size: 18px; } .library-card-copy > p { font-size: 13px; } .library-category-tag { top: 10px; left: 10px; font-size: 10px; } .library-view-hint { font-size: 10px; bottom: 10px; padding: 5px 8px; } .library-how-it-works { grid-template-columns: 1fr; gap: 20px; margin-top: 34px; } .library-editor { padding: 20px; } }
@media (max-width: 440px) { .library-grid { grid-template-columns: 1fr; } .library-thumbnail { aspect-ratio: 1.1; } .library-card-copy h2 { font-size: 22px; } .library-admin-card { gap: 12px; padding: 14px; } .library-admin-card > img { width: 76px; height: 76px; flex-basis: 76px; } }
@media (prefers-reduced-motion: reduce) { .library-card { transition: none; } .library-card:hover, .library-card:focus-within { transform: none; } }
