.url-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.url-row .text-input {
  flex: 1;
}

.btn.big {
  padding: 12px 26px;
  font-size: 16px;
  white-space: nowrap;
}

.library-head {
  margin-bottom: 14px;
}

.storage-notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 12px;
  background: rgba(120, 53, 15, 0.18);
  color: #8d5800;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.storage-notice[hidden] {
  display: none;
}

.section-title.no-margin {
  margin: 0;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.class-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: var(--edt-radius-m);
  padding: 16px;
}

.class-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-meta {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

.class-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.class-more summary {
  width: fit-content;
  padding: 6px 0;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
}
.class-extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}
.source-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.source-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: #ffffff;
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.source-tab.active {
  border-color: #167351;
  background: #e7f3ec;
  color: var(--text);
}

.local-source-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.local-source-panel[hidden],
.recovery-card[hidden] {
  display: none;
}

.source-status {
  min-width: 0;
  flex: 1;
  color: var(--text-dim);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recovery-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(120, 53, 15, 0.16);
}

.recovery-copy {
  min-width: 0;
}

.library-tools {
  margin: -4px 0 14px;
}

.no-margin {
  margin: 0;
}

@media (max-width: 650px) {
  .local-source-panel,
  .recovery-card {
    align-items: stretch;
    flex-direction: column;
  }

  .local-source-panel .btn,
  .recovery-card .btn {
    width: 100%;
  }

  .source-status {
    white-space: normal;
  }
}

.saved-notice {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.class-card.just-saved {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}
