.speech-library { margin-block: 18px; padding-block: 16px; border-block: 1px solid var(--line); color: var(--text); }
.speech-library[hidden], .speech-library [hidden] { display: none !important; }
.speech-library-head, .speech-library-footer, .speech-library-pages { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.speech-library-head h3 { margin:0; font-size:17px; }
.speech-library-filters { display:grid; grid-template-columns:minmax(160px,1fr) 150px auto; align-items:end; gap:12px; margin-block:16px; }
.speech-library .field { min-width:0; margin:0 0 12px; }
.speech-library-filters .field { margin:0; }
.speech-library .field > span, .speech-library h4, .speech-library-word strong { color:var(--text); }
.speech-library .icon-btn { flex:0 0 44px; width:44px; height:44px; }
.speech-library-row { display:grid; grid-template-columns:28px 44px minmax(0,1fr) minmax(0,1fr) 44px; gap:10px; align-items:center; padding-block:10px; border-bottom:1px solid var(--line); }
.speech-library-select { display:flex; align-items:center; justify-content:center; min-height:44px; cursor:pointer; }
.speech-library-select input { width:20px; height:20px; accent-color:var(--primary); }
.speech-library-word, .speech-library-translation { min-width:0; overflow-wrap:anywhere; }
.speech-library small { display:block; color:var(--muted); font-size:12px; }
.speech-library-pages { justify-content:center; margin-block:14px; }
.speech-library-footer { margin-top:14px; flex-wrap:wrap; }
.speech-library-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.speech-library input[type=file] { max-width:100%; }
@media(max-width:600px) {
  .speech-library-filters { grid-template-columns:minmax(0,1fr); }
  .speech-library-filters .btn, .speech-library-footer .btn { min-height:44px; width:100%; }
  .speech-library-row { grid-template-columns:24px 44px minmax(0,1fr) 44px; gap:6px; }
  .speech-library-translation { grid-column:3; padding-bottom:4px; }
  .speech-library-row > [data-library-edit] { grid-column:4; grid-row:1 / span 2; }
  .speech-library-fields { grid-template-columns:minmax(0,1fr); gap:0; }
}
