.model-directory-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.directory-model{position:relative;border:1px solid var(--bs-border-color,#e1e7ef);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--bs-body-bg,#fff);min-width:0;transition:border-color .15s,box-shadow .15s}
.directory-model:hover{border-color:#8ca1ef;box-shadow:0 2px 10px #3255a310}
.directory-model.downloaded{background:#f4fbf7;border-color:#c1dfce}
.directory-model.selected{border-color:#405de6;box-shadow:0 0 0 2px #405de624}
.directory-model-heading{display:flex;gap:8px;align-items:center;min-width:0;padding-right:34px}
.directory-model-heading img{width:30px;height:30px;flex-shrink:0}
.directory-model-title{min-width:0;flex:1}
.directory-model-heading strong,.directory-model-heading small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.directory-model-heading strong{font-size:.86rem;line-height:1.4}
.directory-model-heading small{font-size:.7rem;line-height:1.4;color:var(--bs-secondary-color,#718096)}
.directory-model-meta{display:flex;gap:4px;flex-wrap:wrap;align-items:center;font-size:.7rem;line-height:1.4;color:var(--bs-secondary-color,#718096)}
.directory-model-meta span{background:var(--bs-tertiary-bg,#f3f6fb);border-radius:4px;padding:2px 5px;max-width:100%;overflow-wrap:anywhere}
.directory-model-meta .directory-download-status{background:#edf0f4;color:#687385}
.directory-model.downloaded .directory-download-status{background:#dcefe3;color:#237448;font-weight:600}
.directory-model .directory-model-choose{position:absolute;top:10px;right:10px;margin:0;width:28px;height:28px;min-width:28px;min-height:28px;padding:4px;display:inline-flex;align-items:center;justify-content:center}
.directory-model .directory-model-choose svg{width:15px;height:15px}
.directory-empty{grid-column:1/-1;padding:24px;text-align:center;background:var(--bs-tertiary-bg,#f4f6fb);border-radius:10px;color:var(--bs-secondary-color,#718096)}
@media(min-width:1600px){.model-directory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){.model-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.model-directory-grid{grid-template-columns:minmax(0,1fr)}}
