/* Teacher resource library: compact browsing, explicit actions and keyboard access. */
.library-ux { min-height: 0; background: #f8faf8; }
.library-ux .ant-layout { min-height: 0 !important; }
.library-ux .ant-layout-content { padding: 12px !important; }
.library-ux .lesson-library-content { padding: 20px; border-radius: 12px; box-shadow: 0 4px 18px #29423208; }
.library-ux .lesson-library-topbar { padding: 10px 18px; border-radius: 12px; margin-bottom: 10px; box-shadow: none; }
.library-ux .lesson-library-topbar::after { display: none; }
.library-ux .lesson-library-topbar .ant-breadcrumb { margin-bottom: 0 !important; }
.library-ux-home .lesson-library-topbar { display: none; }
.library-overview { margin-bottom: 14px; }
.library-overview__heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.library-overview__heading h1 { margin: 0 0 5px; font: 700 clamp(22px, 2.4vw, 29px)/1.2 var(--mw-font-display, Georgia, serif); color: #263e33; }
.library-overview__heading p { margin: 0; color: #607168; font-size: 13px; line-height: 1.5; }
.library-overview__heading > .ant-btn { flex-shrink: 0; }
.library-overview__filters { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, 1fr) minmax(160px, .8fr); gap: 12px; padding: 14px; background: #f3f7f4; border: 1px solid #e1e9e3; border-radius: 10px; }
.library-overview__filters > div { min-width: 0; }
.library-overview__filters label { display: block; margin-bottom: 5px; color: #415b4c; font-size: 12px; font-weight: 600; }
.library-overview__filters .ant-select { width: 100%; }
.library-overview__filters .ant-input-affix-wrapper, .library-overview__filters .ant-select-selector { min-height: 40px; align-items: center; }
.library-overview__results { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.library-overview__results p { margin: 0; color: #53675c; font-size: 12px; }
.library-overview__results .ant-btn { height: 34px; font-size: 12px; }
.library-no-results { padding: 36px 16px; text-align: center; border: 1px dashed #cbd9cf; border-radius: 12px; background: #fbfcfb; }
.library-no-results h2 { margin: 0 0 8px; font-size: 18px; color: #304b3b; }
.library-no-results p { margin: 0 0 18px; color: #66786d; font-size: 13px; }
.library-workspace-summary { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: #607168; font-size: 12px; }
.library-workspace-summary strong { margin-right: 3px; color: #294a37; font-size: 15px; }
.library-ux .lesson-workspace-card__art { height: 96px; }
.library-ux .lesson-workspace-card__body { padding: 13px 14px; }
.library-ux .lesson-workspace-card__title { min-height: 0; margin-bottom: 7px; font-size: 18px; }
.library-ux .lesson-workspace-card__footer { margin-top: 12px; padding-top: 10px; }
.library-ux .lesson-workspace-card__counts { display: grid; gap: 3px; font-size: 11px; }
.library-ux .lesson-workspace-card__count strong { font-size: 13px; }
.library-ux .lesson-workspace-card__art .lesson-subject-art__icon { width: 50px; height: 50px; top: 20px; right: 20px; font-size: 25px; }
.library-ux .lesson-subject-art__halo { width: 120px; height: 120px; }
.lesson-card-actions { display: flex; align-items: center; gap: 4px; }
.library-ux .lesson-card-open { min-height: 40px; color: #345e47; border-color: #b7cdbf; background: #f7fbf8; font-weight: 600; }
.library-ux .lesson-card-open:hover { background: #eaf5ee !important; border-color: #659879 !important; }
.library-ux .lesson-card-open:focus-visible, .library-ux .ant-btn:focus-visible, .library-ux [role=button]:focus-visible { outline: 3px solid #2c8062 !important; outline-offset: 3px; }
.library-ux .lesson-workspace-card__footer .ant-btn-text, .library-ux .lesson-folder-card .ant-btn-text { min-width: 40px; min-height: 40px; }
.library-ux .lesson-folder-card .ant-card-body { padding: 14px; }
.library-ux .lesson-folder-card__description { margin: 8px 0; color: #64776b; font-size: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.library-ux .lesson-folder-card__index { width: 34px; height: 42px; font-size: 16px; }
.library-ux .lesson-folder-card__index::before { margin-top: -45px; }
.library-ux .mw-page-header { gap: 12px; margin-bottom: 14px; }
.library-ux .mw-page-header__title { font-size: clamp(20px, 2vw, 25px); line-height: 1.25; }
.library-ux .mw-page-header__subtitle { font-size: 12px; margin-top: 4px; }
.library-resource-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #e6ece8; }
.library-resource-toolbar > .ant-typography { color: #576e5f; font-size: 12px; }
.library-resource-toolbar .ant-btn { min-height: 38px; }
.library-ux .library-resource-organizer.is-organizing { border: 1px solid #c4d9cb; background: #f6faf7; border-radius: 10px; padding: 12px; }
.library-ux .lesson-resource-list-row h4 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.library-ux .lesson-resource-list-row > .ant-btn { min-width: 40px; min-height: 40px; flex-shrink: 0; }
@media(max-width: 767px) {
 .library-ux .ant-layout-content { padding: 6px 0 !important; }
 .library-ux .lesson-library-content { padding: 14px 12px; }
 .library-ux .lesson-library-topbar { padding: 8px 12px; }
 .library-overview__heading { align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
 .library-overview__heading h1 { font-size: 23px; }
 .library-overview__heading p { font-size: 12px; }
 .library-overview__heading > .ant-btn { min-height: 42px; height: auto; font-size: 13px; padding: 6px 12px; }
 .library-overview__filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 10px; }
 .library-overview__search { grid-column: 1 / -1; }
 .library-overview__filters .ant-input-affix-wrapper, .library-overview__filters .ant-select-selector { min-height: 42px; }
 .library-overview__filters input { font-size: 16px; }
 .library-overview__filters .ant-select-selection-item { font-size: 12px; }
 .library-ux .lesson-workspace-card__art { height: 76px; }
 .library-ux .lesson-workspace-card__body { padding: 12px; }
 .library-ux .lesson-workspace-card__title { font-size: 17px; }
 .library-ux .lesson-workspace-card__meta { font-size: 12px; }
 .library-ux .lesson-card-open { min-height: 44px; padding-inline: 14px; }
 .library-ux .mw-page-header { flex-wrap: wrap; margin-bottom: 12px; }
 .library-ux .mw-page-header > div:last-child > .ant-space { flex-wrap: wrap; }
 .library-ux .lesson-resource-list-row { gap: 8px; padding: 10px !important; }
 .library-ux .lesson-resource-list-row__icon { width: 36px; height: 42px; flex-basis: 36px; font-size: 21px; }
 .library-resource-toolbar { align-items: flex-start; }
 .library-resource-toolbar .ant-space { gap: 6px !important; }
 .library-resource-toolbar .ant-btn { min-height: 42px; padding-inline: 10px; font-size: 12px; }
 .library-ux .lesson-folder-card__index { display: none; }
}

.library-material-filters { min-width: 170px; color: #4b6655; }
.library-material-filters summary { display: list-item; cursor: pointer; min-height: 40px; padding: 10px 12px; border: 1px solid #cbdacf; border-radius: 8px; font-size: 12px; background: #f8fbf9; }
.library-material-filters summary:focus-visible { outline: 3px solid #2c8062; outline-offset: 3px; }
.library-material-filters summary span { font-weight: 700; color: #315f45; }
.library-material-filters__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; padding: 10px; background: #f6faf7; border-radius: 8px; }
.library-material-filters__body .ant-select { width: 100% !important; }
.library-material-filters__body > .ant-space { grid-column: 1 / -1; }
@media(max-width:767px) { .library-material-filters { flex: 1; } .library-material-filters summary { min-height: 42px; } }
