/* ============================================================
   §9 — Biblioteca de ejercicios (Workstream A · ws-catalogo.css)
   Catálogo free-exercise-db: buscador, chips por músculo, cards,
   ficha con imagen animada + tabs, picker reutilizable.
   Reusa los tokens/componentes de app.css (.list-row, .segmented,
   .stat-grid, .badge…). Prefijos: .exl- lista · .exf- ficha · .exp- picker.
   ============================================================ */

/* ---------- buscador ---------- */
.exl-search { position: relative; margin: 8px 0 10px; }
.exl-search > .ic {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.exl-search input {
  width: 100%; height: 48px;
  background: var(--card); border: 1px solid var(--hair);
  border-radius: var(--r-sm); padding: 0 14px 0 42px;
  font-size: 16px; color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.exl-search input:focus { outline: none; border-color: var(--accent); }
.exl-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- chips de músculo (scroll horizontal) ---------- */
.exl-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 2px 12px; margin: 0 -2px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.exl-chips::-webkit-scrollbar { display: none; }
.exl-chip {
  flex: 0 0 auto; min-height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: transform .12s var(--ease);
}
.exl-chip:active { transform: scale(.95); }
.exl-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.exl-count {
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--accent-soft); color: var(--accent);
  border-radius: var(--r-pill); padding: 2px 7px;
}
.exl-chip.active .exl-count { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- filas de resultado ---------- */
.exl-row { min-height: 68px; }
.exl-thumb {
  width: 54px; height: 54px; flex: 0 0 auto;
  border-radius: 12px; overflow: hidden;
  background: #fff; border: 1px solid var(--hair);
  display: grid; place-items: center; color: var(--text-3);
}
.exl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.exl-more {
  text-align: center; font-size: 13px; color: var(--text-3);
  padding: 14px 0 4px;
}

/* ---------- ficha (sheet) ---------- */
.exf-hero {
  position: relative; width: 100%; aspect-ratio: 5 / 3;
  border-radius: var(--r); overflow: hidden;
  background: #fff; border: 1px solid var(--hair);
}
.exf-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; transition: opacity .28s var(--ease);
}
.exf-hero img.on { opacity: 1; }
.exf-sub { margin-top: 10px; font-size: 13px; color: var(--text-3); }
.exf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.exf-chip {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: var(--card-2); border: 1px solid var(--hair);
  padding: 5px 11px; border-radius: var(--r-pill);
  text-transform: capitalize;
}
.exf-tabs { margin-bottom: 14px; }
.exf-tabs button { min-height: 40px; }

.exf-steps {
  padding-left: 22px; margin: 4px 0 0; list-style: decimal;
  display: grid; gap: 11px; font-size: 15px; line-height: 1.5; color: var(--text);
}
.exf-steps li::marker { color: var(--accent); font-weight: 700; }
.exf-sec {
  margin-top: 16px; display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--text-2);
}
.exf-sec .ic { flex: 0 0 auto; color: var(--text-3); }

.exf-chart { margin-bottom: 12px; }
.exf-sets { border-top: 1px solid var(--hair); }
.exf-set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 46px; border-bottom: 1px solid var(--hair);
  font-size: 14.5px;
}
.exf-set-date { color: var(--text-2); flex: 0 0 auto; }
.exf-set-val { font-weight: 600; }
.exf-note { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }

.exf-obj {
  margin-top: 14px; display: flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: var(--r-sm); padding: 11px 13px;
  font-size: 14px; font-weight: 600;
}
.exf-obj .ic { flex: 0 0 auto; }

/* ---------- picker (sheet reutilizable) ---------- */
.exp-list .list-row { min-height: 64px; }
